Recherche avancée

Médias (3)

Mot : - Tags -/plugin

Autres articles (35)

  • Ajouter notes et légendes aux images

    7 février 2011, par

    Pour pouvoir ajouter notes et légendes aux images, la première étape est d’installer le plugin "Légendes".
    Une fois le plugin activé, vous pouvez le configurer dans l’espace de configuration afin de modifier les droits de création / modification et de suppression des notes. Par défaut seuls les administrateurs du site peuvent ajouter des notes aux images.
    Modification lors de l’ajout d’un média
    Lors de l’ajout d’un média de type "image" un nouveau bouton apparait au dessus de la prévisualisation (...)

  • Librairies et logiciels spécifiques aux médias

    10 décembre 2010, par

    Pour un fonctionnement correct et optimal, plusieurs choses sont à prendre en considération.
    Il est important, après avoir installé apache2, mysql et php5, d’installer d’autres logiciels nécessaires dont les installations sont décrites dans les liens afférants. Un ensemble de librairies multimedias (x264, libtheora, libvpx) utilisées pour l’encodage et le décodage des vidéos et sons afin de supporter le plus grand nombre de fichiers possibles. Cf. : ce tutoriel ; FFMpeg avec le maximum de décodeurs et (...)

  • Use, discuss, criticize

    13 avril 2011, par

    Talk to people directly involved in MediaSPIP’s development, or to people around you who could use MediaSPIP to share, enhance or develop their creative projects.
    The bigger the community, the more MediaSPIP’s potential will be explored and the faster the software will evolve.
    A discussion list is available for all exchanges between users.

Sur d’autres sites (7578)

  • Audio/Video encoding with ffmpeg

    16 mars 2017, par Vroz

    Audio/Video encoding with ffmpeg :

    I am trying to create an avi file with encoded video and audio, using ffmpeg.

    First, I create the file :

               //define BITRATE 10000000
               //define GOP 300
               //define FPS 60
               //define VIDEOTYPE "avi"

               if (!encoder_->createFile(QFileInfo(*(videoFile_.data())).absoluteFilePath(), targetRect.width(), targetRect.height(), BITRATE*(1000 / FPS), GOP, 1000))    

    The buffers are initialized as :

               audio_outbuf_size = 44100 * 0.005 * 16; //5ms of audio should be encoded, each time this function is called
               audio_outbuf = new uint8_t[audio_outbuf_size];

               outbuf_size = getWidth()*getHeight() * 3;        
               outbuf = new uint8_t[outbuf_size];

    Then add audio and video streams (audio : CODEC_ID_PCM_S16LE, 16000 kb/s and 44100 Hz, video : PIX_FMT_YUV420P)

               void MediaMuxer::addAudioStream(QString fileName, ffmpeg::CodecID codec_id)
               {
                   // Add the audio stream
                   ffmpeg::AVCodec *encoder = avcodec_find_encoder(codec_id);
                   pAudioStream_ = ffmpeg::av_new_stream(pOutputFormatCtx_, 0);
                   if (!pAudioStream_) {
                       printf("Could not allocate stream\n");
                       return;
                   }

                   pAudioCodecCtx_ = pAudioStream_->codec;
                   pAudioCodecCtx_->codec_id = codec_id;
                   pAudioCodecCtx_->codec_type = ffmpeg::AVMEDIA_TYPE_AUDIO;
                   pAudioCodecCtx_->sample_fmt = ffmpeg::AV_SAMPLE_FMT_S16;
                   pAudioCodecCtx_->sample_fmt = encoder->sample_fmts[0];
                   pAudioCodecCtx_->bit_rate = 16000;
                   //pAudioCodecCtx_->bit_rate = 64000;
                   pAudioCodecCtx_->sample_rate = N;
                   pAudioCodecCtx_->channels = 1;

                   pAudioCodecCtx_->time_base.den = FPS;
                   pAudioCodecCtx_->time_base.num = 1;

                   avcodec_thread_init(pAudioCodecCtx_, 10);

                   // some formats want stream headers to be separate
                   if (pOutputFormatCtx_->oformat->flags & AVFMT_GLOBALHEADER)
                       pAudioCodecCtx_->flags |= CODEC_FLAG_GLOBAL_HEADER;

                   if (av_set_parameters(pOutputFormatCtx_, NULL) < 0)
                   {
                       printf("Invalid output format parameters\n");
                       return;
                   }

                   //ffmpeg::dump_format(pOutputFormatCtx_, 0, fileName.toStdString().c_str(), 1);

                   // open_video
                   // find the audio encoder
                   pAudioCodec_ = avcodec_find_encoder(pAudioCodecCtx_->codec_id);
                   if (!pAudioCodec_)
                   {
                       printf("codec not found\n");
                       return;
                   }
                   // open the codec
                   if (avcodec_open(pAudioCodecCtx_, pAudioCodec_) < 0)
                   {
                       printf("could not open codec\n");
                       return;
                   }

                   // Allocate memory for output
                   if (!initAudioOutputBuf())
                   {
                       printf("Can't allocate memory for audio output bitstream\n");
                       return;
                   }

                   // Allocate the audio frame
                   if (!initAudioFrame())
                   {
                       printf("Can't init audio frame\n");
                       return;
                   }

                   if (url_fopen(&pOutputFormatCtx_->pb, fileName.toStdString().c_str(), URL_WRONLY) < 0)
                   {
                       printf("Could not open '%s'\n", fileName.toStdString().c_str());
                       return;
                   }
                   av_write_header(pOutputFormatCtx_);
               }

               void MediaMuxer::addVideoStream(QString fileName)
               {
                   // Add the video stream
                   pVideoStream_ = ffmpeg::av_new_stream(pOutputFormatCtx_, 0);
                   if (!pVideoStream_)
                   {
                       printf("Could not allocate stream\n");
                       return;
                   }

                   pVideoCodecCtx_ = pVideoStream_->codec;
                   pVideoCodecCtx_->codec_id = pOutputFormat_->video_codec;
                   pVideoCodecCtx_->codec_type = ffmpeg::AVMEDIA_TYPE_VIDEO;

                   pVideoCodecCtx_->bit_rate = Bitrate;
                   pVideoCodecCtx_->width = getWidth();
                   pVideoCodecCtx_->height = getHeight();
                   pVideoCodecCtx_->time_base.den = FPS;
                   pVideoCodecCtx_->time_base.num = 1;
                   pVideoCodecCtx_->gop_size = Gop;
                   pVideoCodecCtx_->pix_fmt = ffmpeg::PIX_FMT_YUV420P;

                   avcodec_thread_init(pVideoCodecCtx_, 10);

                   // some formats want stream headers to be separate
                   if (pOutputFormatCtx_->oformat->flags & AVFMT_GLOBALHEADER)
                       pVideoCodecCtx_->flags |= CODEC_FLAG_GLOBAL_HEADER;


                   if (av_set_parameters(pOutputFormatCtx_, NULL) < 0)
                   {
                       printf("Invalid output format parameters\n");
                       return;
                   }

                   //ffmpeg::dump_format(pOutputFormatCtx_, 0, fileName.toStdString().c_str(), 1);

                   // open_video
                   // find the video encoder
                   pVideoCodec_ = avcodec_find_encoder(pVideoCodecCtx_->codec_id);
                   if (!pVideoCodec_)
                   {
                       printf("codec not found\n");
                       return;
                   }
                   // open the codec
                   if (avcodec_open(pVideoCodecCtx_, pVideoCodec_) < 0)
                   {
                       printf("could not open codec\n");
                       return;
                   }

                   // Allocate memory for output
                   if (!initOutputBuf())
                   {
                       printf("Can't allocate memory for output bitstream\n");
                       return;
                   }

                   // Allocate the YUV frame
                   if (!initFrame())
                   {
                       printf("Can't init frame\n");
                       return;
                   }

                   if (url_fopen(&pOutputFormatCtx_->pb, fileName.toStdString().c_str(), URL_WRONLY) < 0)
                   {
                       printf("Could not open '%s'\n", fileName.toStdString().c_str());
                       return;
                   }
                   av_write_header(pOutputFormatCtx_);
               }

    Finally, I call alternatively encodeVideo/encodeAudio to encode video and PCM audio frames at specific recording times(pts) :

               int MediaMuxer::encodeVideo(const QImage &img, unsigned pts)
               {
                   convertImage_sws(img);     // SWS conversion
                   pVideoCodecCtx_->coded_frame->pts = pts;  // Set the time stamp
                   int out_size = ffmpeg::avcodec_encode_video(pVideoCodecCtx_, outbuf, outbuf_size, ppicture);        
                   pVideoCodecCtx_->coded_frame->pts = pts;  // Set the time stamp

                   if (out_size > 0)
                   {
                       ffmpeg::av_init_packet(&pkt);      
                       if (pVideoCodecCtx_->coded_frame->pts != (0x8000000000000000LL))
                           pkt.pts = av_rescale_q(pVideoCodecCtx_->coded_frame->pts, pVideoCodecCtx_->time_base, pVideoStream_->time_base);
                       if (pVideoCodecCtx_->coded_frame->key_frame)
                           pkt.flags |= AV_PKT_FLAG_KEY;

                       pkt.stream_index = pVideoStream_->index;
                       pkt.data = outbuf;
                       pkt.size = out_size;
                       int ret = ffmpeg::av_interleaved_write_frame(pOutputFormatCtx_, &pkt);      
                       if (ret<0)
                           return -1;

                   }
                   return out_size;
               }

               int MediaMuxer::encodeAudio(unsigned pts)
               {
                   pAudioCodecCtx_->coded_frame->pts = pts;  // Set the time stamp

                   // simple sound encoding    
                   int16_t samples[220] = { 0 }; // buffer
                   int n;                // buffer index
                   double Fs = 44100.0;  // sampling frequency

                   // Generate audio data
                   for (n = 0; n < 220; ++n)   //220 samples (44100*.005sec as the interval between 2 video frames is 10ms)
                       samples[n] = 16383.0 * sin(n*1000.0*2.0*M_PI / Fs); //sine wav

                   int  out_size = ffmpeg::avcodec_encode_audio(pAudioCodecCtx_, audio_outbuf, audio_outbuf_size, (const short*)samples);

                   pAudioCodecCtx_->coded_frame->pts = pts;  // Set the time stamp

                   if (out_size>0)
                   {
                       // Packet
                       ffmpeg::AVPacket pkt = { 0 };
                       av_init_packet(&pkt);
                       pkt.data = NULL; // packet data will be allocated by the encoder
                       pkt.size = 0;
                       if (pAudioCodecCtx_->coded_frame->pts != (0x8000000000000000LL))
                           pkt.pts = av_rescale_q(pAudioCodecCtx_->coded_frame->pts, pAudioCodecCtx_->time_base, pAudioStream_->time_base);
                       if (pAudioCodecCtx_->coded_frame->key_frame)
                           pkt.flags |= AV_PKT_FLAG_KEY;

                       pkt.stream_index = pAudioStream_->index;
                       pkt.data = audio_outbuf;

                       pkt.size = out_size;
                       int ret = av_interleaved_write_frame(pOutputFormatCtx_, &pkt);
                       if (ret<0)
                           return -1;
                       av_free_packet(&pkt);
                   }      
                   //end simple sound encoding

                   return pkt.size;
               }

    The result is a nice video with some audio behind (either a regular beeping sound at regular intervals but ending way earlier than the video or a continuous longer sound that also last shorter than the video).

    I want to generate a beeping sound each time the function encodeAudio() is called - at non-regular intervals. I have tried to modify the sampling rate, the buffer size, the pkt size and the number of samples but without any success. I also tried to set the pts at different times but it did not get me where I want to be. Could someone please help ?

  • libavcodec : ffprobe on file encoded with FFV1 codec reports "read_quant_table error"

    20 novembre 2016, par Ali Alidoust

    I’m using the following code to encode a series of frames into an mkv or avi file with FFV1 encoding :

      HRESULT Session::createContext(LPCSTR filename, UINT width, UINT height, UINT fps_num, UINT fps_den) {
       LOG("Exporting to file: ", filename);

       AVCodecID codecId = AV_CODEC_ID_FFV1;
       this->pixelFormat = AV_PIX_FMT_YUV420P;

       this->codec = avcodec_find_encoder(codecId);
       RET_IF_NULL(this->codec, "Could not create codec", E_FAIL);

       this->oformat = av_guess_format(NULL, filename, NULL);
       RET_IF_NULL(this->oformat, "Could not create format", E_FAIL);
       this->oformat->video_codec = codecId;
       this->width = width;
       this->height = height;
       this->codecContext = avcodec_alloc_context3(this->codec);
       RET_IF_NULL(this->codecContext, "Could not allocate context for the codec", E_FAIL);

       this->codecContext->codec = this->codec;
       this->codecContext->codec_id = codecId;

       this->codecContext->pix_fmt = pixelFormat;
       this->codecContext->width = this->width;
       this->codecContext->height = this->height;
       this->codecContext->time_base.num = fps_den;
       this->codecContext->time_base.den = fps_num;

       this->codecContext->gop_size = 1;


       RET_IF_FAILED_AV(avformat_alloc_output_context2(&fmtContext, this->oformat, NULL, NULL), "Could not allocate format context", E_FAIL);
       RET_IF_NULL(this->fmtContext, "Could not allocate format context", E_FAIL);

       this->fmtContext->oformat = this->oformat;
       this->fmtContext->video_codec_id = codecId;

       this->stream = avformat_new_stream(this->fmtContext, this->codec);
       RET_IF_NULL(this->stream, "Could not create new stream", E_FAIL);
       this->stream->time_base = this->codecContext->time_base;
       RET_IF_FAILED_AV(avcodec_parameters_from_context(this->stream->codecpar, this->codecContext), "Could not convert AVCodecContext to AVParameters", E_FAIL);

       if (this->fmtContext->oformat->flags & AVFMT_GLOBALHEADER)
       {
           this->codecContext->flags |= CODEC_FLAG_GLOBAL_HEADER;
       }

       av_opt_set_int(this->codecContext->priv_data, "coder", 0, 0);
       av_opt_set_int(this->codecContext->priv_data, "context", 1, 0);
       av_opt_set_int(this->codecContext->priv_data, "slicecrc", 1, 0);
       //av_opt_set_int(this->codecContext->priv_data, "slicecrc", 1, 0);
       //av_opt_set_int(this->codecContext->priv_data, "pix_fmt", pixelFormat, 0);

       RET_IF_FAILED_AV(avcodec_open2(this->codecContext, this->codec, NULL), "Could not open codec", E_FAIL);
       RET_IF_FAILED_AV(avio_open(&this->fmtContext->pb, filename, AVIO_FLAG_WRITE), "Could not open output file", E_FAIL);
       RET_IF_NULL(this->fmtContext->pb, "Could not open output file", E_FAIL);
       RET_IF_FAILED_AV(avformat_write_header(this->fmtContext, NULL), "Could not write header", E_FAIL);

       frame = av_frame_alloc();
       RET_IF_NULL(frame, "Could not allocate frame", E_FAIL);
       frame->format = this->codecContext->pix_fmt;
       frame->width = width;
       frame->height = height;
       return S_OK;
    }

    HRESULT Session::writeFrame(IMFSample * pSample) {
       IMFMediaBuffer *mediaBuffer = NULL;
       BYTE *pDataNV12 = NULL;
       DWORD length;

       RET_IF_FAILED(pSample->ConvertToContiguousBuffer(&mediaBuffer), "Could not convert IMFSample to contagiuous buffer", E_FAIL);
       RET_IF_FAILED(mediaBuffer->GetCurrentLength(&length), "Could not get buffer length", E_FAIL);
       RET_IF_FAILED(mediaBuffer->Lock(&pDataNV12, NULL, NULL), "Could not lock the buffer", E_FAIL);
       BYTE *pDataYUV420P = new BYTE[length];
       this->convertNV12toYUV420P(pDataNV12, pDataYUV420P, this->width, this->height);
       RET_IF_FAILED(av_image_fill_arrays(frame->data, frame->linesize, pDataYUV420P, pixelFormat, this->width, this->height, 1), "Could not fill the frame with data from the buffer", E_FAIL);
       LOG_IF_FAILED(mediaBuffer->Unlock(), "Could not unlock the buffer");

       frame->pts = av_rescale_q(this->pts++, this->codecContext->time_base, this->stream->time_base);

       AVPacket pkt;

       av_init_packet(&pkt);
       pkt.data = NULL;
       pkt.size = 0;

       RET_IF_FAILED_AV(avcodec_send_frame(this->codecContext, frame), "Could not send the frame to the encoder", E_FAIL);
       delete[] pDataYUV420P;
       if (SUCCEEDED(avcodec_receive_packet(this->codecContext, &pkt))) {
           RET_IF_FAILED_AV(av_interleaved_write_frame(this->fmtContext, &pkt), "Could not write the received packet.", E_FAIL);
       }

       av_packet_unref(&pkt);

       return S_OK;
    }

    HRESULT Session::endSession() {
       LOG("Ending session...");

       LOG("Closing files...")
       LOG_IF_FAILED_AV(av_write_trailer(this->fmtContext), "Could not finalize the output file.");
       LOG_IF_FAILED_AV(avio_close(this->fmtContext->pb), "Could not close the output file.");
       LOG_IF_FAILED_AV(avcodec_close(this->codecContext), "Could not close the codec.");
       av_free(this->codecContext);
       LOG("Done.")
       return S_OK;
    }

    The problem is that the generated file is not playable in either VLC or MPC-HC. However, MPC-HC reports following info in file properties :

    General
    Unique ID                      : 202978442142665779317960161865934977227 (0x98B439D9BE859109BD5EC00A62A238CB)
    Complete name                  : T:\Test.mkv
    Format                         : Matroska
    Format version                 : Version 4 / Version 2
    File size                      : 24.6 MiB
    Duration                       : 147ms
    Overall bit rate               : 1 401 Mbps
    Writing application            : Lavf57.57.100
    Writing library                : Lavf57.57.100

    Video
    ID                             : 1
    Format                         : FFV1
    Format version                 : Version 0
    Codec ID                       : V_MS/VFW/FOURCC / FFV1
    Duration                       : 147ms
    Width                          : 1 280 pixels
    Height                         : 720 pixels
    Display aspect ratio           : 16:9
    Frame rate mode                : Constant
    Frame rate                     : 1 000.000 fps
    Color space                    : YUV
    Chroma subsampling             : 4:2:0
    Bit depth                      : 8 bits
    Compression mode               : Lossless
    Default                        : Yes
    Forced                         : No
    DURATION                       : 00:00:00.147000000
    coder_type                     : Golomb Rice

    Something to note is that it reports 1000 FPS which is weird since I’ve set AVCodecContext::time_base in the code.

    UPDATE 1 :

    I managed to set the correct fps by setting time_base property of the stream :

    this->stream->time_base.den = fps_num;
    this->stream->time_base.num = fps_den;

    VLC plays the output file but it shows VLC logo instead of the video, as if there is no video stream in the file.

    UPDATE 2 :

    Cleaned up the code. Now if I set codecId = AV_CODEC_ID_MPEG2VIDEO the output file is valid and is played in both VLC and MPC-HC. Using ffprobe on the file with FFV1 encoding yields the following result :

    C:\root\apps\ffmpeg>ffprobe.exe t:\test.avi
    ffprobe version 3.2 Copyright (c) 2007-2016 the FFmpeg developers
     built with gcc 5.4.0 (GCC)
     configuration: --disable-static --enable-shared --enable-gpl --enable-version3 --disable-w32threads --enable-dxva2 --enable-libmfx --enable-nvenc --enable-avisynth --enable-bzlib --enable-libebur128 --enable-fontconfig --enable-frei0r --enable-gnutls --enable-iconv --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libfreetype --enable-libgme --enable-libgsm --enable-libilbc --enable-libmodplug --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenh264 --enable-libopenjpeg --enable-libopus --enable-librtmp --enable-libschroedinger --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxavs --enable-libxvid --enable-libzimg --enable-lzma --enable-decklink --enable-zlib
     libavutil      55. 34.100 / 55. 34.100
     libavcodec     57. 64.100 / 57. 64.100
     libavformat    57. 56.100 / 57. 56.100
     libavdevice    57.  1.100 / 57.  1.100
     libavfilter     6. 65.100 /  6. 65.100
     libswscale      4.  2.100 /  4.  2.100
     libswresample   2.  3.100 /  2.  3.100
     libpostproc    54.  1.100 / 54.  1.100
    [ffv1 @ 00000000006b83a0] read_quant_table error
    Input #0, avi, from 't:\test.avi':
     Metadata:
       encoder         : Lavf57.56.100
     Duration: 00:00:04.94, start: 0.000000, bitrate: 107005 kb/s
       Stream #0:0: Video: ffv1 (FFV1 / 0x31564646), yuv420p, 1280x720, 107717 kb/s, 29.97 fps, 29.97 tbr, 29.97 tbn, 29.97 tbc
  • Problems with ffmpeg command line on android

    17 mai 2017, par user2193172

    I managed to compile the ffmpeg Static build. But when I am trying to call the ffmpeg command line I get a Java IOException : No such file or Directory.

    My code is as follows :

    public void merge_video(View view){

       if(ffmpeg_file.exists()){
             Log.d(null, "ffmpeg exists");
         }else{
             Log.d(null, "Could not locate ffmpeg in the folder");
         }

         File file1 = new File("/mnt/sdcard/com.ffmpeg_test/VID_3_25_2013_12_22.mp4");
         if(file1.exists()){
             Log.d(null,"File 1 exists");
         }
         File file2 = new File("/mnt/sdcard/com.ffmpeg_test/VID_3_25_2013_12_28.mp4");
         if(file2.exists()){
             Log.d(null,"File 2 exists");
         }

         String[] ffmpegCommand = new String[5];
         ffmpegCommand[0] = "/mnt/sdcard/com.ffmpeg_test/ffmpeg";
         ffmpegCommand[1] = "-i";
         ffmpegCommand[2] = "concat:/mnt/sdcard/com.ffmpeg_test/VID_3_25_2013_12_22.mp4|/mnt/sdcard/com.ffmpeg_test/VID_3_25_2013_12_28.mp4";
         ffmpegCommand[3] = "copy";
         ffmpegCommand[4] = "/mnt/sdcard/com.ffmpeg_test/output.mp4";  

         try {
             Process ffmpegProcess = new ProcessBuilder(ffmpegCommand).redirectErrorStream(true).start();

             String line;
             BufferedReader reader = new BufferedReader(new InputStreamReader(ffmpegProcess.getInputStream()));
             Log.d(null, "*******Starting FFMPEG");

             while((line = reader.readLine())!=null){

                 Log.d(null, "***"+line+"***");
             }
             Log.d(null,"****ending FFMPEG****");

       } catch (IOException e) {
           e.printStackTrace();
       }
     }

    The LogCat print is as follows :

    03-27 20:41:10.522: W/System.err(24709): java.io.IOException: Error running exec(). Command: [/mnt/sdcard/com.ffmpeg_test/ffmpeg, -i, concat:/mnt/sdcard/com.ffmpeg_test/VID_3_25_2013_12_22.mp4|/mnt/sdcard/com.ffmpeg_test/VID_3_25_2013_12_28.mp4, copy, /mnt/sdcard/com.ffmpeg_test/output.mp4] Working Directory: null Environment: [ANDROID_SOCKET_zygote=13, TMPDIR=/data/local/tmp, ANDROID_BOOTLOGO=1, EXTERNAL_STORAGE=/mnt/sdcard, ANDROID_ASSETS=/system/app, PATH=/sbin:/vendor/bin:/system/sbin:/system/bin:/system/xbin, ASEC_MOUNTPOINT=/mnt/asec, LOOP_MOUNTPOINT=/mnt/obb, BOOTCLASSPATH=/system/framework/core.jar:/system/framework/bouncycastle.jar:/system/framework/ext.jar:/system/framework/framework.jar:/system/framework/android.policy.jar:/system/framework/services.jar:/system/framework/core-junit.jar, USBHOST_STORAGE=/mnt/sdcard/usbStorage, ANDROID_DATA=/data, LD_LIBRARY_PATH=/vendor/lib:/system/lib, ANDROID_ROOT=/system, ANDROID_PROPERTY_WORKSPACE=12,32768, EXTERNAL_STORAGE2=/mnt/sdcard/external_sd]
    03-27 20:41:10.522: W/System.err(24709):    at java.lang.ProcessManager.exec(ProcessManager.java:224)
    03-27 20:41:10.522: W/System.err(24709):    at java.lang.ProcessBuilder.start(ProcessBuilder.java:202)
    03-27 20:41:10.522: W/System.err(24709):    at com.example.ffmpeg_test.MainActivity.merge_video(MainActivity.java:106)
    03-27 20:41:10.522: W/System.err(24709):    at java.lang.reflect.Method.invokeNative(Native Method)
    03-27 20:41:10.522: W/System.err(24709):    at java.lang.reflect.Method.invoke(Method.java:507)
    03-27 20:41:10.527: W/System.err(24709):    at android.view.View$1.onClick(View.java:2149)
    03-27 20:41:10.527: W/System.err(24709):    at android.view.View.performClick(View.java:2538)
    03-27 20:41:10.527: W/System.err(24709):    at android.view.View$PerformClick.run(View.java:9152)
    03-27 20:41:10.527: W/System.err(24709):    at android.os.Handler.handleCallback(Handler.java:587)
    03-27 20:41:10.527: W/System.err(24709):    at android.os.Handler.dispatchMessage(Handler.java:92)
    03-27 20:41:10.527: W/System.err(24709):    at android.os.Looper.loop(Looper.java:123)
    03-27 20:41:10.527: W/System.err(24709):    at android.app.ActivityThread.main(ActivityThread.java:3691)
    03-27 20:41:10.527: W/System.err(24709):    at java.lang.reflect.Method.invokeNative(Native Method)
    03-27 20:41:10.527: W/System.err(24709):    at java.lang.reflect.Method.invoke(Method.java:507)
    03-27 20:41:10.532: W/System.err(24709):    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:847)
    03-27 20:41:10.532: W/System.err(24709):    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:605)
    03-27 20:41:10.537: W/System.err(24709):    at dalvik.system.NativeStart.main(Native Method)
    03-27 20:41:10.537: W/System.err(24709): Caused by: java.io.IOException: No such file or directory
    03-27 20:41:10.537: W/System.err(24709):    at java.lang.ProcessManager.exec(Native Method)
    03-27 20:41:10.537: W/System.err(24709):    at java.lang.ProcessManager.exec(ProcessManager.java:222)
    03-27 20:41:10.537: W/System.err(24709):    ... 16 more
    03-27 20:41:36.057: W/KeyCharacterMap(24709): No keyboard for id 0
    03-27 20:41:36.057: W/KeyCharacterMap(24709): Using default keymap: /system/usr/keychars/qwerty.kcm.bin