Recherche avancée

Médias (0)

Mot : - Tags -/xmlrpc

Aucun média correspondant à vos critères n’est disponible sur le site.

Autres articles (57)

  • La file d’attente de SPIPmotion

    28 novembre 2010, par

    Une file d’attente stockée dans la base de donnée
    Lors de son installation, SPIPmotion crée une nouvelle table dans la base de donnée intitulée spip_spipmotion_attentes.
    Cette nouvelle table est constituée des champs suivants : id_spipmotion_attente, l’identifiant numérique unique de la tâche à traiter ; id_document, l’identifiant numérique du document original à encoder ; id_objet l’identifiant unique de l’objet auquel le document encodé devra être attaché automatiquement ; objet, le type d’objet auquel (...)

  • Les vidéos

    21 avril 2011, par

    Comme les documents de type "audio", Mediaspip affiche dans la mesure du possible les vidéos grâce à la balise html5 .
    Un des inconvénients de cette balise est qu’elle n’est pas reconnue correctement par certains navigateurs (Internet Explorer pour ne pas le nommer) et que chaque navigateur ne gère en natif que certains formats de vidéos.
    Son avantage principal quant à lui est de bénéficier de la prise en charge native de vidéos dans les navigateur et donc de se passer de l’utilisation de Flash et (...)

  • Encoding and processing into web-friendly formats

    13 avril 2011, par

    MediaSPIP automatically converts uploaded files to internet-compatible formats.
    Video files are encoded in MP4, Ogv and WebM (supported by HTML5) and MP4 (supported by Flash).
    Audio files are encoded in MP3 and Ogg (supported by HTML5) and MP3 (supported by Flash).
    Where possible, text is analyzed in order to retrieve the data needed for search engine detection, and then exported as a series of image files.
    All uploaded files are stored online in their original format, so you can (...)

Sur d’autres sites (8756)

  • How can i capture a screenshots from pictureBox1 every X milliseconds ?

    9 avril 2016, par Brubaker Haim

    The way it is now it’s capturing screenshots depending on on what screen I am in.
    For example if i’m in my desktop it will take screenshots of my desktop if I move to the form1 and see the pictureBox1 it will take screenshots of the pictureBox1.

    But how can I get directly screenshots from the pictureBox1 no matter on what screen I am ?

    Bitmap bmp1;
           public static int counter = 0;
           private void timer1_Tick(object sender, EventArgs e)
           {
               counter++;

               Rectangle rect = new Rectangle(0, 0, pictureBox1.ClientSize.Width, pictureBox1.ClientSize.Height);
               bmp1 = new Bitmap(rect.Width, rect.Height, PixelFormat.Format32bppArgb);
               Graphics g = Graphics.FromImage(bmp1);
               g.CopyFromScreen(rect.Left, rect.Top, 0, 0, bmp1.Size, CopyPixelOperation.SourceCopy);
               bmp1.Save(@"e:\screenshots\" + "screenshot" + counter.ToString("D6") + ".bmp", ImageFormat.Bmp);
               bmp1.Dispose();
               g.Dispose();
               if (counter == 500)//1200)
               {
                   timer1.Stop();
                   this.Close();
               }
           }

    The timer1 is set now to 100ms interval in the designer.
    But what is a reasonable speed to take screenshots from animation in the pictureBox1 ? In this case I have a game I show in the pictureBox1 and I want to take a screenshots of each frame from the pictureBox1 and in real time to create mp4 video file on the hard disk from each frame I took.

    So instead saving the bmp1 to the hard disk I need somehow to save each frame I capture in memory and build mp4 video file in real time.

    I created a ffmpeg class for that :

    using System;
    using System.Windows.Forms;
    using System.Collections.Generic;
    using System.Linq;
    using System.Text;
    using System.Threading.Tasks;
    using System.Drawing;
    using System.IO.Pipes;
    using System.Runtime.InteropServices;
    using System.Diagnostics;
    using System.IO;
    using DannyGeneral;

    namespace ffmpeg
    {
       public class Ffmpeg
       {
           NamedPipeServerStream p;
           String pipename = "mytestpipe";
           System.Diagnostics.Process process;
           string ffmpegFileName = "ffmpeg.exe";
           string workingDirectory;

           public Ffmpeg()
           {
               workingDirectory = Path.GetDirectoryName(Application.ExecutablePath);
               Logger.Write("workingDirectory: " + workingDirectory);
               if (!Directory.Exists(workingDirectory))
               {
                   Directory.CreateDirectory(workingDirectory);
               }
               ffmpegFileName = Path.Combine(workingDirectory, ffmpegFileName);
               Logger.Write("FfmpegFilename: " + ffmpegFileName);
           }

           public void Start(string pathFileName, int BitmapRate)
           {
               try
               {

                   string outPath = pathFileName;
                   p = new NamedPipeServerStream(pipename, PipeDirection.Out, 1, PipeTransmissionMode.Byte);
                   ProcessStartInfo psi = new ProcessStartInfo();
                   psi.WindowStyle = ProcessWindowStyle.Hidden;
                   psi.UseShellExecute = false;
                   psi.CreateNoWindow = false;
                   psi.FileName = ffmpegFileName;
                   psi.WorkingDirectory = workingDirectory;
                   psi.Arguments = @"-f rawvideo -pix_fmt bgra -video_size 1920x1080 -i \\.\pipe\mytestpipe -c:v mpeg2video -crf 20 -r " + BitmapRate + " " + outPath;
                   process = Process.Start(psi);
                   process.EnableRaisingEvents = false;
                   psi.RedirectStandardError = true;
                   p.WaitForConnection();
               }
               catch (Exception err)
               {
                   Logger.Write("Exception Error: " + err.ToString());
               }
           }

           public void PushFrame(Bitmap bmp)
           {
               try
               {
                   int length;
                   // Lock the bitmap's bits.
                   //bmp = new Bitmap(1920, 1080);
                   Rectangle rect = new Rectangle(0, 0, bmp.Width, bmp.Height);
                   //Rectangle rect = new Rectangle(0, 0, 1280, 720);
                   System.Drawing.Imaging.BitmapData bmpData =
                       bmp.LockBits(rect, System.Drawing.Imaging.ImageLockMode.ReadOnly,
                       bmp.PixelFormat);

                   int absStride = Math.Abs(bmpData.Stride);
                   // Get the address of the first line.
                   IntPtr ptr = bmpData.Scan0;

                   // Declare an array to hold the bytes of the bitmap.
                   //length = 3 * bmp.Width * bmp.Height;
                   length = absStride * bmpData.Height;
                   byte[] rgbValues = new byte[length];

                   //Marshal.Copy(ptr, rgbValues, 0, length);
                   int j = bmp.Height - 1;
                   for (int i = 0; i < bmp.Height; i++)
                   {
                       IntPtr pointer = new IntPtr(bmpData.Scan0.ToInt32() + (bmpData.Stride * j));
                       System.Runtime.InteropServices.Marshal.Copy(pointer, rgbValues, absStride * (bmp.Height - i - 1), absStride);
                       j--;
                   }
                   p.Write(rgbValues, 0, length);
                   bmp.UnlockBits(bmpData);
               }
               catch(Exception err)
               {
                   Logger.Write("Error: " + err.ToString());
               }

           }

           public void Close()
           {
               p.Close();
           }
       }
    }

    And using the ffmpeg class like this :

    public static Ffmpeg fmpeg;

    Then

    fmpeg = new Ffmpeg();
    fmpeg.Start(@"e:\screenshots\test.mp4", 25);

    And

    fmpeg.PushFrame(_screenShot);

    My main question is first how to get the screenshots(frames) from the pictureBox1 directly no matter what screen i’m in now ?

    And how to use on each frame with the fmpeg to get a fine mp4 speed video file I mean that I will not miss a frame to capture all frames and also that the mp4 video file will when I play it later will not display a fast video or too slow ?

  • Dynamically created QImage frames to ffmpeg stdin using QThread

    11 mai 2021, par musicamante

    I am trying to create video files with ffmpeg using frames dynamically created on a separate thread.

    


    While I can create those frames and store them on disk/memory, I'd like to avoid that passage since the amount/size of the frames can be high and many "jobs" could be created with different format or options. But, also importantly, I'd like to better understand the logic behind this, as I admit I've not a very deep knowledge on how thread/processing actually works.

    


    Right now I'm trying to create the QProcess in the QThread object, and then run the image creation thread as soon as the process is started, but it doesn't seem to work : no file is created, and I don't even get any output from standard error (but I know I should, since I can get it if I don't use the thread).

    


    Unfortunately, due to my little knowledge on how QProcess deals with threads and piping (and, obviously, all possible ffmpeg options), I really don't understand how can achieve this.

    


    Besides obviously getting the output file created, the expected result is to be able to launch the encoding (and possibly queue more encodings in the meantime) while keeping the UI responding and get notifications of the current processing state.

    


    import re&#xA;from PyQt5 import QtCore, QtGui, QtWidgets&#xA;&#xA;logRegExp = r&#x27;(?:(n:\s&#x2B;)(?P\d&#x2B;)\s).*(?:(pts_time:\s*)(?P<time>\d&#x2B;.\d*))&#x27;&#xA;&#xA;class Encoder(QtCore.QThread):&#xA;    completed = QtCore.pyqtSignal()&#xA;    frameDone = QtCore.pyqtSignal(object)&#xA;    def __init__(self, width=1280, height=720, frameCount=100):&#xA;        super().__init__()&#xA;        self.width = width&#xA;        self.height = height&#xA;        self.frameCount = frameCount&#xA;&#xA;    def start(self):&#xA;        self.currentLog = &#x27;&#x27;&#xA;        self.currentData = bytes()&#xA;        self.process = QtCore.QProcess()&#xA;        self.process.setReadChannel(self.process.StandardError)&#xA;        self.process.finished.connect(self.completed)&#xA;        self.process.readyReadStandardError.connect(self.stderr)&#xA;        self.process.started.connect(super().start)&#xA;        self.process.start(&#x27;ffmpeg&#x27;, [&#xA;            &#x27;-y&#x27;, &#xA;            &#x27;-f&#x27;, &#x27;png_pipe&#x27;, &#xA;            &#x27;-i&#x27;, &#x27;-&#x27;, &#xA;            &#x27;-c:v&#x27;, &#x27;libx264&#x27;, &#xA;            &#x27;-b:v&#x27;, &#x27;800k&#x27;, &#xA;            &#x27;-an&#x27;, &#xA;            &#x27;-vf&#x27;, &#x27;showinfo&#x27;,&#xA;            &#x27;/tmp/test.h264&#x27;, &#xA;        ])&#xA;&#xA;    def stderr(self):&#xA;        self.currentLog &#x2B;= str(self.process.readAllStandardError(), &#x27;utf-8&#x27;)&#xA;        *lines, self.currentLog = self.currentLog.split(&#x27;\n&#x27;)&#xA;        for line in lines:&#xA;            print(&#x27;STDERR: {}&#x27;.format(line))&#xA;            match = re.search(logRegExp, line)&#xA;            if match:&#xA;                data = match.groupdict()&#xA;                self.frameDone.emit(int(data[&#x27;frame&#x27;]))&#xA;&#xA;    def run(self):&#xA;        font = QtGui.QFont()&#xA;        font.setPointSize(80)&#xA;        rect = QtCore.QRect(0, 0, self.width, self.height)&#xA;        for frame in range(1, self.frameCount &#x2B; 1):&#xA;            img = QtGui.QImage(QtCore.QSize(self.width, self.height), QtGui.QImage.Format_ARGB32)&#xA;            img.fill(QtCore.Qt.white)&#xA;            qp = QtGui.QPainter(img)&#xA;            qp.setFont(font)&#xA;            qp.setPen(QtCore.Qt.black)&#xA;            qp.drawText(rect, QtCore.Qt.AlignCenter, &#x27;Frame {}&#x27;.format(frame))&#xA;            qp.end()&#xA;            img.save(self.process, &#x27;PNG&#x27;)&#xA;        print(&#x27;frame creation complete&#x27;)&#xA;&#xA;&#xA;class Test(QtWidgets.QWidget):&#xA;    def __init__(self):&#xA;        super().__init__()&#xA;        layout = QtWidgets.QVBoxLayout(self)&#xA;        self.startButton = QtWidgets.QPushButton(&#x27;Start&#x27;)&#xA;        layout.addWidget(self.startButton)&#xA;&#xA;        self.frameLabel = QtWidgets.QLabel()&#xA;        layout.addWidget(self.frameLabel)&#xA;&#xA;        self.process = Encoder()&#xA;        self.process.completed.connect(lambda: self.startButton.setEnabled(True))&#xA;        self.process.frameDone.connect(self.frameLabel.setNum)&#xA;        self.startButton.clicked.connect(self.create)&#xA;&#xA;    def create(self):&#xA;        self.startButton.setEnabled(False)&#xA;        self.process.start()&#xA;&#xA;&#xA;import sys&#xA;app = QtWidgets.QApplication(sys.argv)&#xA;test = Test()&#xA;test.show()&#xA;sys.exit(app.exec_())&#xA;</time>

    &#xA;

    If I add the following lines at the end of run(), then the file is actually created and I get the stderr output, but I can see that it's processed after the completion of the for cycle, which obviously is not the expected result :

    &#xA;

        self.process.closeWriteChannel()&#xA;    self.process.waitForFinished()&#xA;    self.process.terminate()&#xA;

    &#xA;

    Bonus : I'm on Linux, I don't know if it works differently on Windows (and I suppose it would work similarly on MacOS), but in any case I'd like to know if there are differences and how to possibly deal with them.

    &#xA;

  • Error on make VideoLibs while building CSipSimple for android

    26 janvier 2016, par Alex Chengalan

    I have successfully build CSipSimple for android by make command. After that, when I try to build video support libary by calling make VideoLibs command, there is an error appears.

    [armeabi] SharedLibrary  : libpj_video_android.so
    [armeabi-v7a] SharedLibrary  : libpj_video_android.so
    jni/pjsip/android_toolchain/pjmedia/../../sources/pjmedia/src/pjmedia-codec/ffmpeg_vid_codecs.c:1086: error: undefined reference to 'av_strerror'
    jni/pjsip/android_toolchain/pjmedia/../../sources/pjmedia/src/pjmedia-codec/ffmpeg_vid_codecs.c:1324: error: undefined reference to 'avcodec_close'
    jni/pjsip/android_toolchain/pjmedia/../../sources/pjmedia/src/pjmedia-codec/ffmpeg_vid_codecs.c:1325: error: undefined reference to 'av_free'
    jni/pjsip/android_toolchain/pjmedia/../../sources/pjmedia/src/pjmedia-codec/ffmpeg_vid_codecs.c:1328: error: undefined reference to 'avcodec_close'
    jni/pjsip/android_toolchain/pjmedia/../../sources/pjmedia/src/pjmedia-codec/ffmpeg_vid_codecs.c:1329: error: undefined reference to 'av_free'
    jni/pjsip/android_toolchain/pjmedia/../../sources/pjmedia/src/pjmedia-codec/ffmpeg_vid_codecs.c:1430: error: undefined reference to 'avcodec_get_frame_defaults'
    jni/pjsip/android_toolchain/pjmedia/../../sources/pjmedia/src/pjmedia-codec/ffmpeg_vid_codecs.c:1455: error: undefined reference to 'av_init_packet'
    jni/pjsip/android_toolchain/pjmedia/../../sources/pjmedia/src/pjmedia-codec/ffmpeg_vid_codecs.c:1460: error: undefined reference to 'avcodec_encode_video2'
    jni/pjsip/android_toolchain/pjmedia/../../sources/pjmedia/src/pjmedia-codec/ffmpeg_vid_codecs.c:409: error: undefined reference to 'av_opt_set'
    jni/pjsip/android_toolchain/pjmedia/../../sources/pjmedia/src/pjmedia-codec/ffmpeg_vid_codecs.c:427: error: undefined reference to 'av_opt_set_int'
    jni/pjsip/android_toolchain/pjmedia/../../sources/pjmedia/src/pjmedia-codec/ffmpeg_vid_codecs.c:434: error: undefined reference to 'av_opt_set_int'
    jni/pjsip/android_toolchain/pjmedia/../../sources/pjmedia/src/pjmedia-codec/ffmpeg_vid_codecs.c:442: error: undefined reference to 'av_opt_set'
    jni/pjsip/android_toolchain/pjmedia/../../sources/pjmedia/src/pjmedia-codec/ffmpeg_vid_codecs.c:445: error: undefined reference to 'av_opt_set'
    jni/pjsip/android_toolchain/pjmedia/../../sources/pjmedia/src/pjmedia-codec/ffmpeg_vid_codecs.c:1116: error: undefined reference to 'avcodec_alloc_context3'
    jni/pjsip/android_toolchain/pjmedia/../../sources/pjmedia/src/pjmedia-codec/ffmpeg_vid_codecs.c:1125: error: undefined reference to 'avcodec_alloc_context3'
    jni/pjsip/android_toolchain/pjmedia/../../sources/pjmedia/src/pjmedia-codec/ffmpeg_vid_codecs.c:1185: error: undefined reference to 'avcodec_open2'
    jni/pjsip/android_toolchain/pjmedia/../../sources/pjmedia/src/pjmedia-codec/ffmpeg_vid_codecs.c:1200: error: undefined reference to 'avcodec_open2'
    jni/pjsip/android_toolchain/pjmedia/../../sources/pjmedia/src/pjmedia-codec/ffmpeg_vid_codecs.c:1222: error: undefined reference to 'avcodec_close'
    jni/pjsip/android_toolchain/pjmedia/../../sources/pjmedia/src/pjmedia-codec/ffmpeg_vid_codecs.c:1223: error: undefined reference to 'av_free'
    jni/pjsip/android_toolchain/pjmedia/../../sources/pjmedia/src/pjmedia-codec/ffmpeg_vid_codecs.c:1228: error: undefined reference to 'avcodec_close'
    jni/pjsip/android_toolchain/pjmedia/../../sources/pjmedia/src/pjmedia-codec/ffmpeg_vid_codecs.c:1229: error: undefined reference to 'av_free'
    jni/pjsip/android_toolchain/pjmedia/../../sources/pjmedia/src/pjmedia-codec/ffmpeg_vid_codecs.c:1680: error: undefined reference to 'avcodec_get_frame_defaults'
    jni/pjsip/android_toolchain/pjmedia/../../sources/pjmedia/src/pjmedia-codec/ffmpeg_vid_codecs.c:1683: error: undefined reference to 'av_init_packet'
    jni/pjsip/android_toolchain/pjmedia/../../sources/pjmedia/src/pjmedia-codec/ffmpeg_vid_codecs.c:1705: error: undefined reference to 'avcodec_decode_video2'
    jni/pjsip/android_toolchain/pjmedia/../../sources/pjmedia/src/pjmedia-codec/ffmpeg_vid_codecs.c:629: error: undefined reference to 'avcodec_register_all'
    jni/pjsip/android_toolchain/pjmedia/../../sources/pjmedia/src/pjmedia-codec/ffmpeg_vid_codecs.c:632: error: undefined reference to 'av_codec_next'
    jni/pjsip/android_toolchain/pjmedia/../../sources/pjmedia/src/pjmedia/converter_libswscale.c:172: error: undefined reference to 'sws_freeContext'
    jni/pjsip/android_toolchain/pjmedia/../../sources/pjmedia/src/pjmedia/converter_libswscale.c:152: error: undefined reference to 'sws_scale'
    jni/pjsip/android_toolchain/pjmedia/../../sources/pjmedia/src/pjmedia/converter_libswscale.c:112: error: undefined reference to 'sws_getContext'
    jni/pjsip/android_toolchain/pjmedia/../../sources/pjmedia/src/pjmedia/ffmpeg_util.c:113: error: undefined reference to 'av_log_get_level'
    jni/pjsip/android_toolchain/pjmedia/../../sources/pjmedia/src/pjmedia/ffmpeg_util.c:88: error: undefined reference to 'av_log_set_level'
    jni/pjsip/android_toolchain/pjmedia/../../sources/pjmedia/src/pjmedia/ffmpeg_util.c:89: error: undefined reference to 'av_log_set_callback'
    jni/pjsip/android_toolchain/pjmedia/../../sources/pjmedia/src/pjmedia/ffmpeg_util.c:90: error: undefined reference to 'av_register_all'
    collect2: error: ld returned 1 exit status
    make[1]: *** [obj/local/armeabi/libpj_video_android.so] Error 1
    make[1]: *** Waiting for unfinished jobs....
    [armeabi-v7a] Install        : libpjsipjni.so => ./libs/armeabi-v7a/libpjsipjni.so
    jni/pjsip/android_toolchain/pjmedia/../../sources/pjmedia/src/pjmedia-codec/ffmpeg_vid_codecs.c:1086: error: undefined reference to 'av_strerror'
    jni/pjsip/android_toolchain/pjmedia/../../sources/pjmedia/src/pjmedia-codec/ffmpeg_vid_codecs.c:1324: error: undefined reference to 'avcodec_close'
    jni/pjsip/android_toolchain/pjmedia/../../sources/pjmedia/src/pjmedia-codec/ffmpeg_vid_codecs.c:1325: error: undefined reference to 'av_free'
    jni/pjsip/android_toolchain/pjmedia/../../sources/pjmedia/src/pjmedia-codec/ffmpeg_vid_codecs.c:1328: error: undefined reference to 'avcodec_close'
    jni/pjsip/android_toolchain/pjmedia/../../sources/pjmedia/src/pjmedia-codec/ffmpeg_vid_codecs.c:1329: error: undefined reference to 'av_free'
    jni/pjsip/android_toolchain/pjmedia/../../sources/pjmedia/src/pjmedia-codec/ffmpeg_vid_codecs.c:1430: error: undefined reference to 'avcodec_get_frame_defaults'
    jni/pjsip/android_toolchain/pjmedia/../../sources/pjmedia/src/pjmedia-codec/ffmpeg_vid_codecs.c:1455: error: undefined reference to 'av_init_packet'
    jni/pjsip/android_toolchain/pjmedia/../../sources/pjmedia/src/pjmedia-codec/ffmpeg_vid_codecs.c:1460: error: undefined reference to 'avcodec_encode_video2'
    jni/pjsip/android_toolchain/pjmedia/../../sources/pjmedia/src/pjmedia-codec/ffmpeg_vid_codecs.c:409: error: undefined reference to 'av_opt_set'
    jni/pjsip/android_toolchain/pjmedia/../../sources/pjmedia/src/pjmedia-codec/ffmpeg_vid_codecs.c:427: error: undefined reference to 'av_opt_set_int'
    jni/pjsip/android_toolchain/pjmedia/../../sources/pjmedia/src/pjmedia-codec/ffmpeg_vid_codecs.c:434: error: undefined reference to 'av_opt_set_int'
    jni/pjsip/android_toolchain/pjmedia/../../sources/pjmedia/src/pjmedia-codec/ffmpeg_vid_codecs.c:442: error: undefined reference to 'av_opt_set'
    jni/pjsip/android_toolchain/pjmedia/../../sources/pjmedia/src/pjmedia-codec/ffmpeg_vid_codecs.c:445: error: undefined reference to 'av_opt_set'
    jni/pjsip/android_toolchain/pjmedia/../../sources/pjmedia/src/pjmedia-codec/ffmpeg_vid_codecs.c:1116: error: undefined reference to 'avcodec_alloc_context3'
    jni/pjsip/android_toolchain/pjmedia/../../sources/pjmedia/src/pjmedia-codec/ffmpeg_vid_codecs.c:1125: error: undefined reference to 'avcodec_alloc_context3'
    jni/pjsip/android_toolchain/pjmedia/../../sources/pjmedia/src/pjmedia-codec/ffmpeg_vid_codecs.c:1185: error: undefined reference to 'avcodec_open2'
    jni/pjsip/android_toolchain/pjmedia/../../sources/pjmedia/src/pjmedia-codec/ffmpeg_vid_codecs.c:1200: error: undefined reference to 'avcodec_open2'
    jni/pjsip/android_toolchain/pjmedia/../../sources/pjmedia/src/pjmedia-codec/ffmpeg_vid_codecs.c:1222: error: undefined reference to 'avcodec_close'
    jni/pjsip/android_toolchain/pjmedia/../../sources/pjmedia/src/pjmedia-codec/ffmpeg_vid_codecs.c:1223: error: undefined reference to 'av_free'
    jni/pjsip/android_toolchain/pjmedia/../../sources/pjmedia/src/pjmedia-codec/ffmpeg_vid_codecs.c:1228: error: undefined reference to 'avcodec_close'
    jni/pjsip/android_toolchain/pjmedia/../../sources/pjmedia/src/pjmedia-codec/ffmpeg_vid_codecs.c:1229: error: undefined reference to 'av_free'
    jni/pjsip/android_toolchain/pjmedia/../../sources/pjmedia/src/pjmedia-codec/ffmpeg_vid_codecs.c:1680: error: undefined reference to 'avcodec_get_frame_defaults'
    jni/pjsip/android_toolchain/pjmedia/../../sources/pjmedia/src/pjmedia-codec/ffmpeg_vid_codecs.c:1683: error: undefined reference to 'av_init_packet'
    jni/pjsip/android_toolchain/pjmedia/../../sources/pjmedia/src/pjmedia-codec/ffmpeg_vid_codecs.c:1705: error: undefined reference to 'avcodec_decode_video2'
    jni/pjsip/android_toolchain/pjmedia/../../sources/pjmedia/src/pjmedia-codec/ffmpeg_vid_codecs.c:629: error: undefined reference to 'avcodec_register_all'
    jni/pjsip/android_toolchain/pjmedia/../../sources/pjmedia/src/pjmedia-codec/ffmpeg_vid_codecs.c:632: error: undefined reference to 'av_codec_next'
    jni/pjsip/android_toolchain/pjmedia/../../sources/pjmedia/src/pjmedia-codec/ffmpeg_vid_codecs.c:632: error: undefined reference to 'av_codec_next'
    jni/pjsip/android_toolchain/pjmedia/../../sources/pjmedia/src/pjmedia/converter_libswscale.c:172: error: undefined reference to 'sws_freeContext'
    jni/pjsip/android_toolchain/pjmedia/../../sources/pjmedia/src/pjmedia/converter_libswscale.c:152: error: undefined reference to 'sws_scale'
    jni/pjsip/android_toolchain/pjmedia/../../sources/pjmedia/src/pjmedia/converter_libswscale.c:112: error: undefined reference to 'sws_getContext'
    jni/pjsip/android_toolchain/pjmedia/../../sources/pjmedia/src/pjmedia/ffmpeg_util.c:113: error: undefined reference to 'av_log_get_level'
    jni/pjsip/android_toolchain/pjmedia/../../sources/pjmedia/src/pjmedia/ffmpeg_util.c:88: error: undefined reference to 'av_log_set_level'
    jni/pjsip/android_toolchain/pjmedia/../../sources/pjmedia/src/pjmedia/ffmpeg_util.c:89: error: undefined reference to 'av_log_set_callback'
    jni/pjsip/android_toolchain/pjmedia/../../sources/pjmedia/src/pjmedia/ffmpeg_util.c:90: error: undefined reference to 'av_register_all'
    collect2: error: ld returned 1 exit status
    make[1]: *** [obj/local/armeabi-v7a/libpj_video_android.so] Error 1
    make[1]: Leaving directory `/home/alexchengalan/android/files/CSipSimple-trunk/CSipSimple'
    make: *** [VideoLibs] Error 2

    It would be great if anyone can help me out of this problem.