Recherche avancée

Médias (1)

Mot : - Tags -/ticket

Autres articles (44)

  • 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 (...)

  • Websites made ​​with MediaSPIP

    2 mai 2011, par

    This page lists some websites based on MediaSPIP.

Sur d’autres sites (6832)

  • ffmpeg Bmp to yuv : Crash at sws_scale

    28 décembre 2015, par the-owner

    The context :
    I have a succession of continuous bitmap and I want to encode them into a light video format.
    I use ffmpeg version 2.8.3 (the build here), under qt5, qt IDE, and msvc2013 for win32.

    The problem :
    My code crash at sws_scale () (and sometimes at avcodec_encode_video2()). When I explore the stack, the crash event occurs at sws_getCachedContext (). (I can only see the stack with these ffmpeg builds).
    I only use these ffmpeg libraries (from the Qt .pro file) :

    LIBS += -lavcodec -lavformat -lswscale -lavutil

    It’s swscale which bug. And this is the code :

    void newVideo ()
    {
       ULONG_PTR gdiplusToken;
       GdiplusStartupInput gdiplusStartupInput;
       GdiplusStartup(&gdiplusToken, &gdiplusStartupInput, NULL);

       initBitmap (); //init bmp
       int screenWidth =  bmp.bmiHeader.biWidth;
       int screenHeight = bmp.bmiHeader.biHeight;

       AVCodec * codec;
       AVCodecContext * c = NULL;
       uint8_t * outbuf;
       int i, out_size, outbuf_size;


       avcodec_register_all();

       qDebug () << "Video encoding\n";

       // Find the mpeg1 video encoder
       codec = avcodec_find_encoder(AV_CODEC_ID_H264);
       if (!codec)
       {
           qDebug () << "Codec not found\n";
           avcodec_close(c);
           av_free(c);
           return;
       }
       else
           qDebug () << "H264 codec found\n";

       c = avcodec_alloc_context3(codec);

       c->bit_rate = 1000000;
       c->width = 800; // resolution must be a multiple of two (1280x720),(1900x1080),(720x480)
       c->height = 600;
       c->time_base.num = 1; // framerate numerator
       c->time_base.den = 25; // framerate denominator
       c->gop_size = 30; // emit one intra frame every ten frames
       c->max_b_frames = 1; // maximum number of b-frames between non b-frames
       c->pix_fmt = AV_PIX_FMT_YUV420P; //Converstion RGB to YUV ?
       c->codec_id = AV_CODEC_ID_H264;

       struct SwsContext* fooContext = sws_getContext(screenWidth, screenHeight,
                                                      AV_PIX_FMT_RGB32,
                                                      c->width, c->height,
                                                      AV_PIX_FMT_YUV420P,
                                                      SWS_FAST_BILINEAR,
                                                      NULL, NULL, NULL);

       // Open the encoder
       if (avcodec_open2(c, codec, NULL) < 0)
       {
           qDebug () << "Could not open codec\n";
           avcodec_close(c);
           av_free(c);
           return;
       }
       else qDebug () << "H264 codec opened\n";

       outbuf_size = 100000 + c->width*c->height*(32>>3);//*(32>>3); // alloc image and output buffer
       outbuf = static_cast(malloc(outbuf_size));
       qDebug() << "Setting buffer size to: " << outbuf_size << "\n";

       FILE* f = fopen("TEST.mpg","wb");
       if(!f) qDebug() << "x - Cannot open video file for writing\n";
       else qDebug() << "Opened video file for writing\n";

       // encode 5 seconds of video
       for (i = 0; i < STREAM_FRAME_RATE*STREAM_DURATION; i++) //the stop condition i < 5.0*5
       {
           qDebug () << "i = " << i;
           fflush(stdout);

           HBITMAP hBmp;
           if (GetScreen(hBmp) == -1) return;
           BYTE * pPixels;// = new BYTE [bmp.bmiHeader.biSizeImage];
           pPixels = getPixels (hBmp);
           DeleteObject (hBmp);

           int nbytes = avpicture_get_size(AV_PIX_FMT_YUV420P, c->width, c->height);
           uint8_t* outbuffer = (uint8_t*)av_malloc(nbytes*sizeof(uint8_t));
           if(!outbuffer) // check if(outbuf) instead
           {
               qDebug () << "Bytes cannot be allocated";
               return;
           }

           AVFrame* inpic = avcodec_alloc_frame(); //av_frame_alloc () ?
           AVFrame* outpic = avcodec_alloc_frame();

           outpic->pts = (int64_t)((float)i * (1000.0/((float)(c->time_base.den))) * 90);
           if (avpicture_fill((AVPicture*) inpic, (uint8_t*) pPixels, AV_PIX_FMT_RGB32,
                          screenWidth, screenHeight) < 0)
               qDebug () <<  "avpicture_fill Fill picture with image failed"; //Fill picture with image

           if(avpicture_fill((AVPicture*) outpic, outbuffer, AV_PIX_FMT_YUV420P,
                          c->width, c->height) < 0)
               qDebug () <<  "avpicture_fill failed";

           if (av_image_alloc(outpic->data, outpic->linesize, c->width, c->height,
                          c->pix_fmt, 1) < 0)
               qDebug () <<  "av_image_alloc failed";

           inpic->data[0] += inpic->linesize[0]*(screenHeight - 1); // Flipping frame
           inpic->linesize[0] = -inpic->linesize[0]; // Flipping frame

    ////////////////////////////HERE THE BUG////////////////////////////////
           sws_scale(fooContext,
                     inpic->data, inpic->linesize,
                     0, c->height,
                     outpic->data, outpic->linesize); //HERE THE BUG

           av_free_packet((AVPacket *)outbuf);
           // encode the image
           out_size = avcodec_encode_video2 (c, (AVPacket *) outbuf,
                                             (AVFrame *) outbuf_size, (int *) outpic);
    ///////////////////////THE CODE DONT GO BEYOND/////////////////////////////////

           qDebug () << "Encoding frame" << i <<" (size=" << out_size <<"\n";
           fwrite(outbuf, 1, out_size, f);
           delete [] pPixels;
           av_free(outbuffer);
           av_free(inpic);
           av_freep(outpic);
       }

       // get the delayed frames
       for(; out_size; i++)
       {
           fflush(stdout);
           out_size = avcodec_encode_video2 (c, (AVPacket *) outbuf,
                                             (AVFrame *) outbuf_size, NULL);
           qDebug () << "Writing frame" << i <<" (size=" << out_size <<"\n";
           fwrite(outbuf, 1, out_size, f);
       }

       // add sequence end code to have a real mpeg file
       outbuf[0] = 0x00;
       outbuf[1] = 0x00;
       outbuf[2] = 0x01;
       outbuf[3] = 0xb7;
       fwrite(outbuf, 1, 4, f);
       fclose(f);

       avcodec_close(c);
       free(outbuf);
       av_free(c);
       qDebug () << "Closed codec and Freed\n";
    }

    And the output :

    Video encoding

    H264 codec found

    H264 codec opened

    Setting buffer size to:  2020000

    Opened video file for writing

    i =  0
    **CRASH**

    I have thougth that my bitmap wasn’t good so I have crafted a bitmap just for testing, the code was :

       uint8_t* pPixels = new uint8_t[Width * 3 * Height];
       int x = 50;
       for(unsigned int i = 0; i < Width * 3 * Height; i = i + 3) // loop for generating color changing images
       {
           pPixels [i] = x % 255; //R
           pPixels [i + 1] = (x) % 255; //G
           pPixels [i + 2] = (255 - x) % 255; //B
       }

    However the crash continue. Perhaps, it might prove that it’s not the bitmap (pPixels) which has a problem.

    If anyone know, why I get this bug : Maybe don’t I set one parameter well ? Or one ffmpeg deprecated function ? etc.


    EDIT 1 27/12/15

    Thanks to Ronald S. Bultje The function sws_scale () does not crash with this code, however I get an error from it bad dst image pointers. My code :

    //DESTINATION FRAME            
    if (avpicture_alloc ((AVPicture*) dst_frame, AV_PIX_FMT_YUV420P, c->width, c->height) < 0)
               {
                   qDebug () <<  "# avpicture_alloc failed";
                   return;
               }
               if(avpicture_fill((AVPicture*) dst_frame, NULL, AV_PIX_FMT_YUV420P,
                              c->width, c->height) < 0)
                   qDebug () <<  "avpicture_fill failed";
               avcodec_align_dimensions2 (c, &c->width, &c->height, dst_frame->linesize);

    //SOURCE FRAME
               if (avpicture_fill((AVPicture*) src_frame, (uint8_t *) pPixels, AV_PIX_FMT_RGB32,
                                  tmp_screenWidth, tmp_screenHeight) < 0)
                   qDebug () <<  "# avpicture_fill Fill picture with image failed"; //Fill picture with image
               avcodec_align_dimensions2 (c, &tmp_screenWidth, &tmp_screenHeight, src_frame->linesize);

               struct SwsContext* conversionContext = sws_getContext(tmp_screenWidth,tmp_screenHeight,AV_PIX_FMT_RGB32,c->width, c->height, AV_PIX_FMT_YUV420P,SWS_FAST_BILINEAR, NULL, NULL, NULL);

               int output_Height = sws_scale(conversionContext,
                                             src_frame->data, src_frame->linesize,
                                             0, tmp_screenHeight,
                                             dst_frame->data, dst_frame->linesize); //return 0 -> bad dst image pointers error

    EDIT 2 28/12/15

    I have tried to follow the Ronald S. Bultje’s suggestion and now I get a bad src image pointers error, I have investigated and worked many hours but I do not find a solution. Here, there is the new snippet :

    AVFrame* src_frame = av_frame_alloc ();
    AVFrame* dst_frame = av_frame_alloc ();
    AVFrame* tmp_src_frame = av_frame_alloc ();

    /*........I do not use them until this snippet..........*/
    //DESTINATION
    //avpicture_free ((AVPicture*)dst_frame);
    avcodec_align_dimensions2 (c, &c->width, &c->height, dst_frame->linesize);
    if (avpicture_alloc ((AVPicture*) dst_frame, AV_PIX_FMT_YUV420P, c->width, c->height) < 0)
    {
       qDebug () <<  "# avpicture_alloc failed";
       return;
    }

    //SOURCE
    //stride = src_frame->linesize [0] = ((((screenWidth * bitPerPixel) + 31) & ~31) >> 3); do I need to do that ?
    //== stride - I have gotten this formula from : https://msdn.microsoft.com/en-us/library/windows/desktop/dd318229(v=vs.85).aspx
    if (avpicture_fill((AVPicture*) src_frame, (uint8_t *) pPixels, AV_PIX_FMT_RGB32,
                      screenWidth, screenHeight) < 0)
       qDebug () <<  "# avpicture_fill Fill picture with image failed"; //Fill picture with image
    //linesize [0] == 21760 like commented stride

    //Source TO TMP Source
    avcodec_align_dimensions2 (c, &tmp_screenWidth, &tmp_screenHeight, tmp_src_frame->linesize);
    if (avpicture_fill((AVPicture*) tmp_src_frame, NULL, AV_PIX_FMT_RGB32,
                      tmp_screenWidth, tmp_screenHeight) < 0)
       qDebug () <<  "# avpicture_fill Fill picture with image failed"; //Fill picture with image

    av_picture_copy ((AVPicture*) tmp_src_frame, (const AVPicture*) src_frame, AV_PIX_FMT_RGB32,
                    screenWidth, screenHeight);

    struct SwsContext* conversionContext = sws_getContext(tmp_screenWidth, tmp_screenHeight,
                                                         AV_PIX_FMT_RGB32,
                                                         c->width, c->height,
                                                         AV_PIX_FMT_YUV420P,
                                                         SWS_FAST_BILINEAR,
                                                         NULL, NULL, NULL);

    int output_Height = sws_scale(conversionContext,
                                 tmp_src_frame->data, tmp_src_frame->linesize,
                                 0, tmp_screenHeight,
                                 dst_frame->data, dst_frame->linesize);
    //ffmpeg error = bad src image pointers
    // output_Height == 0

    EDIT 3

    For temp Picture I have done an avcode_align_dimension2() then a avpicture_alloc() for allocating memory and avpicture_fill() in order to fill the picture pointer. Below the updated code :

    //DESTINATION
    //avpicture_free ((AVPicture*)dst_frame);
    avcodec_align_dimensions2 (c, &c->width, &c->height, dst_frame->linesize);
    if (avpicture_alloc ((AVPicture*) dst_frame, AV_PIX_FMT_YUV420P, c->width, c->height) < 0)
    {
       qDebug () <<  "# avpicture_alloc failed";
       return;
    }

    //SOURCE
    //src_frame->linesize [0] = ((((screenWidth * bpp) + 31) & ~31) >> 3);
    //src_frame->linesize [0] = stride;
    if (avpicture_fill((AVPicture*) src_frame, (uint8_t *) pPixels, AV_PIX_FMT_RGB32,
                      screenWidth, screenHeight) < 0)
       qDebug () <<  "# avpicture_fill Fill picture with image failed"; //Fill picture with image

    //Source TO TMP Source
    avcodec_align_dimensions2 (c, &tmp_screenWidth, &tmp_screenHeight, tmp_src_frame->linesize);
    if (avpicture_alloc ((AVPicture*) tmp_src_frame, AV_PIX_FMT_RGB32, tmp_screenWidth, tmp_screenHeight) < 0)
    {
       qDebug () <<  "# avpicture_alloc failed";
       return;
    }
    int outbuf_size = tmp_screenWidth*tmp_screenHeight*4;// alloc image and output buffer
    outbuf = static_cast(malloc(outbuf_size));
    if (avpicture_fill((AVPicture*) tmp_src_frame, outbuf, AV_PIX_FMT_RGB32,
                      tmp_screenWidth, tmp_screenHeight) < 0)
       qDebug () <<  "# avpicture_fill Fill picture with image failed"; //Fill picture with image
    av_picture_copy ((AVPicture*) tmp_src_frame, (const AVPicture*) src_frame, AV_PIX_FMT_RGB32,
                    tmp_screenWidth, tmp_screenHeight);

    struct SwsContext* conversionContext = sws_getContext(tmp_screenWidth, tmp_screenHeight,
                                                         AV_PIX_FMT_RGB32,
                                                         c->width, c->height,
                                                         AV_PIX_FMT_YUV420P,
                                                         SWS_FAST_BILINEAR,
                                                         NULL, NULL, NULL);

    int output_Height = sws_scale(conversionContext,
                                 tmp_src_frame->data, tmp_src_frame->linesize,
                                 0, tmp_screenHeight,
                                 dst_frame->data, dst_frame->linesize);

    The call stack is as follow : av_picture_copy() is called then av_image_copy() then _VEC_memcpy() then fastcopy_I() and crash ... The problem is not the dimensions (tmp_screenWidth/Height) ? (With av_picture_copy () could we copy a picture P1 with dim W1xH1 to a picture P2 with dimension W2xH2 ?)

    EDIT 4

    Crash at av_picture_copy() which call _aligned_malloc() then av_image_copy _VEC_memcpy() and fastcopy_I()

    //SOURCE
    if (avpicture_fill((AVPicture*) src_frame, (uint8_t *) pPixels, AV_PIX_FMT_RGB32,
                      screenWidth, screenHeight) < 0)
       qDebug () <<  "# avpicture_fill Fill picture with image failed"; //Fill picture with image

    //Source TO TMP Source
    avcodec_align_dimensions2 (c, &tmp_screenWidth, &tmp_screenHeight, tmp_src_frame->linesize);
    if (avpicture_alloc ((AVPicture*) tmp_src_frame, AV_PIX_FMT_RGB32, tmp_screenWidth, tmp_screenHeight) < 0)
    {
       qDebug () <<  "# avpicture_alloc failed";
       return;
    }
    av_picture_copy ((AVPicture*) tmp_src_frame, (const AVPicture*) src_frame, AV_PIX_FMT_RGB32,
                    tmp_screenWidth, tmp_screenHeight);
  • Android YouTube Live v3 rtmp streaming via ffmpeg won't show preview

    14 décembre 2017, par Ariel Yust

    Hi everyone I’m breaking my head over this issue here,
    I’m developing an Android App for streaming content from the user’s device camera (back/front) to a live streaming on YouTube.

    Problem :
    YouTube Live shows "The health is good." in (Live Streaming->Events) but there’s nothing showing in the preview... in fact when I press play it tells me "An error has occurred, please try again later".

    Why is this happening ? what could be the problem ?

    What I’m doing :
    using google’s Oauth 2.0 and google api for login.
    YouTube V3 data api’s for creating a new broadcast and stream or use an opened stream - I’m using RTMP.

    I’m opening Camera Api1 and capturing the video into a SurfaceTexture, then I encode images and audio (MIC) using Android’s MediaCodec, save a 3+- seconds *.mp4 file locally and then once the muxer is done I stream the file with ffpmeg.

    String[] cmd = {
               "-i", filePath, //local file path (video is playable with vlc)
               "-strict", "experimental",
               "-acodec", "aac",
               "-ac", "1",
               "-ar", "44100",
               "-vcodec", "libx264",
               "-pix_fmt", "yuv420p",
               "-r", "30",
               "-g", "60",
               "-vb", "512k",
               "-profile:v", "main",
               "-preset", "medium",
               "-f", "flv",
               "-s", "1280x720",
               CreateBroadcast.rtmpUrl
           };

    ffmpeg.execute(cmd, responseHandler); //responseHandler notify me to send next file

    //how I set a new rtmpUrl, in CreateBroadcast.java
    rtmpUrl =
       returnedStream.getCdn().getIngestionInfo().getIngestionAddress() +
       File.separator +
       returnedStream.getCdn().getIngestionInfo().getStreamName();

    next file

    Using this ffmpeg library.

    ffmpeg process log :

    10:40:08.967 7..8/c.k.r D/Send: ffmpeg version n3.0.1 Copyright (c) 2000-2016 the FFmpeg developers, built with gcc 4.8 (GCC)
    10:40:08.968 7..8/c.k.r D/Send: configuration: --target-os=linux --cross-prefix=/home/vagrant/SourceCode/ffmpeg-android/toolchain-android/bin/arm-linux-androideabi- --arch=arm --cpu=cortex-a8 --enable-runtime-cpudetect --sysroot=/home/vagrant/SourceCode/ffmpeg-android/toolchain-android/sysroot --enable-pic --enable-libx264 --enable-libass --enable-libfreetype --enable-libfribidi --enable-libmp3lame --enable-fontconfig --enable-pthreads --disable-debug --disable-ffserver --enable-version3 --enable-hardcoded-tables --disable-ffplay --disable-ffprobe --enable-gpl --enable-yasm --disable-doc --disable-shared --enable-static --pkg-config=/home/vagrant/SourceCode/ffmpeg-android/ffmpeg-pkg-config --prefix=/home/vagrant/SourceCode/ffmpeg-android/build/armeabi-v7a --extra-cflags='-I/home/vagrant/SourceCode/ffmpeg-android/toolchain-android/include -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -fno-strict-overflow -fstack-protector-all' --extra-ldflags='-L/home/vagrant/SourceCode/ffmpeg-android/toolchain-android/lib -Wl,-z,relro -Wl,-z,now -pie' --extra-libs='-lpng -lexpat -lm' --extra-cxxflags=
    10:40:08.969 7..8/c.k.r D/Send: onProgress ->   libavutil      55. 17.103 / 55. 17.103
    10:40:08.969 7..8/c.k.r D/Send: onProgress ->   libavcodec     57. 24.102 / 57. 24.102
    10:40:08.969 7..8/c.k.r D/Send: onProgress ->   libavformat    57. 25.100 / 57. 25.100
    10:40:08.970 7..8/c.k.r D/Send: onProgress ->   libavdevice    57.  0.101 / 57.  0.101
    10:40:08.970 7..8/c.k.r D/Send: onProgress ->   libavfilter     6. 31.100 /  6. 31.100
    10:40:08.971 7..8/c.k.r D/Send: onProgress ->   libswscale      4.  0.100 /  4.  0.100
    10:40:08.971 7..8/c.k.r D/Send: onProgress ->   libswresample   2.  0.101 /  2.  0.101
    10:40:08.971 7..8/c.k.r D/Send: onProgress ->   libpostproc    54.  0.100 / 54.  0.100
    10:40:09.202 7..8/c.k.r D/Send: onProgress -> Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '/storage/emulated/0/Movies/realPoll_0.mp4':
    10:40:09.203 7..8/c.k.r D/Send: onProgress ->   Metadata:
    10:40:09.203 7..8/c.k.r D/Send: onProgress ->     major_brand     : mp42
    10:40:09.204 7..8/c.k.r D/Send: onProgress ->     minor_version   : 0
    10:40:09.204 7..8/c.k.r D/Send: onProgress ->     compatible_brands: isommp42
    10:40:09.204 7..8/c.k.r D/Send: onProgress ->     creation_time   : 2017-08:40:08
    10:40:09.205 7..8/c.k.r D/Send: onProgress ->     com.android.version: 6.0.1
    10:40:09.205 7..8/c.k.r D/Send: onProgress ->   Duration: 00:00:02.79, start: 0.000000, bitrate: 4080 kb/s
    10:40:09.206 7..8/c.k.r D/Send: onProgress ->     Stream #0:0(eng): Video: h264 (Constrained Baseline) (avc1 / 0x31637661), yuv420p, 1280x720, 4166 kb/s, SAR 1:1 DAR 16:9, 30.60 fps, 90k tbr, 90k tbn, 180k tbc (default)
    10:40:09.206 7..8/c.k.r D/Send: onProgress ->     Metadata:
    10:40:09.207 7..8/c.k.r D/Send: onProgress ->       creation_time   : 2017-08:40:08
    10:40:09.207 7..8/c.k.r D/Send: onProgress ->       handler_name    : VideoHandle
    10:40:09.208 7..8/c.k.r D/Send: onProgress ->     Stream #0:1(eng): Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, mono, fltp, 59 kb/s (default)
    10:40:09.208 7..8/c.k.r D/Send: onProgress ->     Metadata:
    10:40:09.209 7..8/c.k.r D/Send: onProgress ->       creation_time   : 2017-08:40:08
    10:40:09.209 7..8/c.k.r D/Send: onProgress ->       handler_name    : SoundHandle
    10:40:10.312 7..8/c.k.r D/Send: onProgress -> [libx264 @ 0xb5b84800] using SAR=1/1
    10:40:10.324 7..8/c.k.r D/Send: onProgress -> [libx264 @ 0xb5b84800] using cpu capabilities: none!
    10:40:10.457 7..8/c.k.r D/Send: onProgress -> [libx264 @ 0xb5b84800] profile Main, level 3.1
    10:40:10.458 7..8/c.k.r D/Send: onProgress -> [libx264 @ 0xb5b84800] 264 - core 148 - H.264/MPEG-4 AVC codec - Copyleft 2003-2015 - http://www.videolan.org/x264.html - options: cabac=1 ref=3 deblock=1:0:0 analyse=0x1:0x111 me=hex subme=7 psy=1 psy_rd=1.00:0.00 mixed_ref=1 me_range=16 chroma_me=1 trellis=1 8x8dct=0 cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_offset=-2 threads=6 lookahead_threads=1 sliced_threads=0 nr=0 decimate=1 interlaced=0 bluray_compat=0 constrained_intra=0 bframes=3 b_pyramid=2 b_adapt=1 b_bias=0 direct=1 weightb=1 open_gop=0 weightp=2 keyint=60 keyint_min=6 scenecut=40 intra_refresh=0 rc_lookahead=40 rc=abr mbtree=1 bitrate=512 ratetol=1.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 ip_ratio=1.40 aq=1:1.00
    10:40:10.494 7..8/c.k.r D/Send: onProgress -> Output #0, flv, to 'rtmp://a.rtmp.youtube.com/live2/b2mb-vjew-2205-8w39':
    10:40:10.495 7..8/c.k.r D/Send: onProgress ->   Metadata:
    10:40:10.496 7..8/c.k.r D/Send: onProgress ->     major_brand     : mp42
    10:40:10.499 7..8/c.k.r D/Send: onProgress ->     minor_version   : 0
    10:40:10.500 7..8/c.k.r D/Send: onProgress ->     compatible_brands: isommp42
    10:40:10.502 7..8/c.k.r D/Send: onProgress ->     com.android.version: 6.0.1
    10:40:10.504 7..8/c.k.r D/Send: onProgress ->     encoder         : Lavf57.25.100
    10:40:10.505 7..8/c.k.r D/Send: onProgress ->     Stream #0:0(eng): Video: h264 (libx264) ([7][0][0][0] / 0x0007), yuv420p, 1280x720 [SAR 1:1 DAR 16:9], q=-1--1, 512 kb/s, 30 fps, 1k tbn, 30 tbc (default)
    10:40:10.507 7..8/c.k.r D/Send: onProgress ->     Metadata:
    10:40:10.509 7..8/c.k.r D/Send: onProgress ->       creation_time   : 2017-08:40:08
    10:40:10.510 7..8/c.k.r D/Send: onProgress ->       handler_name    : VideoHandle
    10:40:10.511 7..8/c.k.r D/Send: onProgress ->       encoder         : Lavc57.24.102 libx264
    10:40:10.512 7..8/c.k.r D/Send: onProgress ->     Side data:
    10:40:10.512 7..8/c.k.r D/Send: onProgress ->       unknown side data type 10 (24 bytes)
    10:40:10.514 7..8/c.k.r D/Send: onProgress ->     Stream #0:1(eng): Audio: aac (LC) ([10][0][0][0] / 0x000A), 44100 Hz, mono, fltp, 69 kb/s (default)
    10:40:10.521 7..8/c.k.r D/Send: onProgress ->     Metadata:
    10:40:10.522 7..8/c.k.r D/Send: onProgress ->       creation_time   : 2017-08:40:08
    10:40:10.522 7..8/c.k.r D/Send: onProgress ->       handler_name    : SoundHandle
    10:40:10.522 7..8/c.k.r D/Send: onProgress ->       encoder         : Lavc57.24.102 aac
    10:40:10.523 7..8/c.k.r D/Send: onProgress -> Stream mapping:
    10:40:10.523 7..8/c.k.r D/Send: onProgress ->   Stream #0:0 -> #0:0 (h264 (native) -> h264 (libx264))
    10:40:10.524 7..8/c.k.r D/Send: onProgress ->   Stream #0:1 -> #0:1 (aac (native) -> aac (native))
    10:40:10.524 7..8/c.k.r D/Send: onProgress -> Press [q] to stop, [?] for help
    10:40:11.017 7..8/c.k.r D/Send: onProgress -> frame=    0 fps=0.0 q=0.0 size=       0kB time=00:00:00.92 bitrate=   4.3kbits/s speed=1.82x    
    10:40:11.300 7..8/c.k.r D/Send: onProgress -> Past duration 0.912331 too large
    10:40:11.342 7..8/c.k.r D/Send: onProgress -> Past duration 0.874321 too large
    10:40:11.376 7..8/c.k.r D/Send: onProgress -> Past duration 0.903664 too large
    10:40:11.411 7..8/c.k.r D/Send: onProgress -> Past duration 0.884666 too large
    10:40:11.545 7..8/c.k.r D/Send: onProgress -> frame=   12 fps= 12 q=0.0 size=       0kB time=00:00:01.03 bitrate=   3.9kbits/s dup=0 drop=2 speed=   1x    
    10:40:12.105 7..8/c.k.r D/Send: onProgress -> frame=   25 fps= 16 q=0.0 size=       0kB time=00:00:01.03 bitrate=   3.9kbits/s dup=0 drop=2 speed=0.667x    
                                                                          [ 10:40:12.379   191:  191 E/         ]
                                                                          invalid crash request of size 4 (from pid=7244 uid=0)
    10:40:12.598 7..8/c.k.r D/Send: onProgress -> frame=   32 fps= 15 q=0.0 size=       0kB time=00:00:02.02 bitrate=   2.0kbits/s dup=0 drop=2 speed=0.98x    
    10:40:12.598 7..8/c.k.r D/Send: onProgress -> Past duration 0.792656 too large
    10:40:12.675 7..8/c.k.r D/Send: onProgress -> Past duration 0.710991 too large
    10:40:12.708 7..8/c.k.r D/Send: onProgress -> Past duration 0.688332 too large
    10:40:12.725 7..8/c.k.r D/Send: onProgress -> Past duration 0.710655 too large
    10:40:12.760 7..8/c.k.r D/Send: onProgress -> Past duration 0.716331 too large
    10:40:12.775 7..8/c.k.r D/Send: onProgress -> Past duration 0.713661 too large
    10:40:12.791 7..8/c.k.r D/Send: onProgress -> Past duration 0.688332 too large
    10:40:12.825 7..8/c.k.r D/Send: onProgress -> Past duration 0.633659 too large
    10:40:12.857 7..8/c.k.r D/Send: onProgress -> Past duration 0.661324 too large
    10:40:12.876 7..8/c.k.r D/Send: onProgress -> Past duration 0.670998 too large
    10:40:12.942 7..8/c.k.r D/Send: onProgress -> Past duration 0.640327 too large
    10:40:17.761 7..8/c.k.r D/Send: onProgress -> frame=   47 fps=6.7 q=0.0 size=       0kB time=00:00:02.02 bitrate=   2.0kbits/s dup=0 drop=2 speed=0.288x    
    10:40:17.929 7..8/c.k.r D/Send: onProgress -> Past duration 0.605324 too large
    10:40:17.997 7..8/c.k.r D/Send: onProgress -> Past duration 0.614998 too large
    10:40:18.520 7..8/c.k.r D/Send: onProgress -> frame=   51 fps=6.6 q=42.0 size=       4kB time=00:00:02.02 bitrate=  17.0kbits/s dup=0 drop=2 speed=0.263x    
    10:40:18.520 7..8/c.k.r D/Send: onProgress -> Past duration 0.605995 too large
    10:40:19.607 7..8/c.k.r D/Send: onProgress -> Past duration 0.608986 too large
    10:40:19.843 7..8/c.k.r D/Send: onProgress -> frame=   53 fps=5.8 q=42.0 size=       9kB time=00:00:02.02 bitrate=  34.8kbits/s dup=0 drop=2 speed=0.223x    
    10:40:20.365 7..8/c.k.r D/Send: onProgress -> Past duration 0.614326 too large
    10:40:20.710 7..8/c.k.r D/Send: onProgress -> frame=   56 fps=5.7 q=41.0 size=      16kB time=00:00:02.02 bitrate=  66.2kbits/s dup=0 drop=2 speed=0.206x    
    10:40:21.348 7..8/c.k.r D/Send: onProgress -> frame=   58 fps=5.5 q=41.0 size=      20kB time=00:00:02.02 bitrate=  82.1kbits/s dup=0 drop=2 speed=0.193x    
    10:40:22.419 7..8/c.k.r D/Send: onProgress -> frame=   61 fps=5.2 q=41.0 size=      27kB time=00:00:02.02 bitrate= 108.3kbits/s dup=0 drop=2 speed=0.173x    
    10:40:23.232 7..8/c.k.r D/Send: onProgress -> frame=   64 fps=5.1 q=41.0 size=      33kB time=00:00:02.02 bitrate= 133.1kbits/s dup=0 drop=2 speed=0.161x    
    10:40:24.659 7..8/c.k.r D/Send: onProgress -> frame=   67 fps=4.8 q=40.0 size=      38kB time=00:00:02.02 bitrate= 154.5kbits/s dup=0 drop=2 speed=0.145x    
    10:40:25.591 7..8/c.k.r D/Send: onProgress -> frame=   69 fps=4.7 q=40.0 size=      42kB time=00:00:02.02 bitrate= 169.5kbits/s dup=0 drop=2 speed=0.138x    
    10:40:26.137 7..8/c.k.r D/Send: onProgress -> frame=   71 fps=4.6 q=39.0 size=      45kB time=00:00:02.02 bitrate= 183.6kbits/s dup=0 drop=2 speed=0.132x    
    10:40:26.913 7..8/c.k.r D/Send: onProgress -> frame=   73 fps=4.5 q=39.0 size=      46kB time=00:00:02.02 bitrate= 187.6kbits/s dup=0 drop=2 speed=0.125x    
    10:40:27.234 7..8/c.k.r D/Send: onProgress -> frame=   76 fps=4.5 q=38.0 size=      49kB time=00:00:02.48 bitrate= 162.7kbits/s dup=0 drop=2 speed=0.149x    
    10:40:27.295 7..8/c.k.r D/Send: onProgress -> Past duration 0.686333 too large
    10:40:27.801 7..8/c.k.r D/Send: onProgress -> Past duration 0.840324 too large
    10:40:28.269 7..8/c.k.r D/Send: onProgress -> frame=   78 fps=4.5 q=37.0 size=      53kB time=00:00:02.54 bitrate= 171.5kbits/s dup=0 drop=2 speed=0.147x    
    10:40:28.269 7..8/c.k.r D/Send: onProgress -> Past duration 0.739662 too large
    10:40:28.336 7..8/c.k.r D/Send: onProgress -> Past duration 0.671333 too large
    10:40:28.373 7..8/c.k.r D/Send: onProgress -> frame=   80 fps=4.5 q=37.0 size=      59kB time=00:00:02.54 bitrate= 188.7kbits/s dup=0 drop=2 speed=0.143x    
    10:40:41.320 7..8/c.k.r D/Send: onProgress -> [flv @ 0xb5ba9600] Failed to update header with correct duration.
    10:40:41.321 7..8/c.k.r D/Send: onProgress -> [flv @ 0xb5ba9600] Failed to update header with correct filesize.
    10:40:41.321 7..8/c.k.r D/Send: onProgress -> frame=   80 fps=2.6 q=-1.0 Lsize=     155kB time=00:00:02.70 bitrate= 468.9kbits/s dup=0 drop=2 speed=0.0877x    
    10:40:41.322 7..8/c.k.r D/Send: onProgress -> video:128kB audio:23kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 2.617489%
    10:40:41.332 7..8/c.k.r D/Send: onProgress -> [libx264 @ 0xb5b84800] frame I:2     Avg QP:28.63  size:  3516
    10:40:41.333 7..8/c.k.r D/Send: onProgress -> [libx264 @ 0xb5b84800] frame P:62    Avg QP:28.45  size:  1878
    10:40:41.333 7..8/c.k.r D/Send: onProgress -> [libx264 @ 0xb5b84800] frame B:16    Avg QP:29.68  size:   400
    10:40:41.334 7..8/c.k.r D/Send: onProgress -> [libx264 @ 0xb5b84800] consecutive B-frames: 71.2%  5.0%  3.8% 20.0%
    10:40:41.334 7..8/c.k.r D/Send: onProgress -> [libx264 @ 0xb5b84800] mb I  I16..4: 98.8%  0.0%  1.2%
    10:40:41.334 7..8/c.k.r D/Send: onProgress -> [libx264 @ 0xb5b84800] mb P  I16..4: 17.8%  0.0%  0.1%  P16..4: 17.0%  0.2%  0.7%  0.0%  0.0%    skip:64.2%
    10:40:41.335 7..8/c.k.r D/Send: onProgress -> [libx264 @ 0xb5b84800] mb B  I16..4:  0.1%  0.0%  0.0%  B16..8: 11.9%  0.0%  0.0%  direct: 1.0%  skip:87.0%  L0:16.0% L1:84.0% BI: 0.0%
    10:40:41.335 7..8/c.k.r D/Send: onProgress -> [libx264 @ 0xb5b84800] final ratefactor: 30.20
    10:40:41.336 7..8/c.k.r D/Send: onProgress -> [libx264 @ 0xb5b84800] coded y,uvDC,uvAC intra: 1.4% 20.4% 0.0% inter: 0.4% 14.0% 0.0%
    10:40:41.338 7..8/c.k.r D/Send: onProgress -> [libx264 @ 0xb5b84800] i16 v,h,dc,p: 66% 22%  7%  4%
    10:40:41.339 7..8/c.k.r D/Send: onProgress -> [libx264 @ 0xb5b84800] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu:  7% 19% 53%  4%  4%  3%  5%  2%  2%
    10:40:41.339 7..8/c.k.r D/Send: onProgress -> [libx264 @ 0xb5b84800] i8c dc,h,v,p: 71% 16% 12%  0%
    10:40:41.340 7..8/c.k.r D/Send: onProgress -> [libx264 @ 0xb5b84800] Weighted P-Frames: Y:6.5% UV:6.5%
    10:40:41.340 7..8/c.k.r D/Send: onProgress -> [libx264 @ 0xb5b84800] ref P L0: 85.6%  4.5%  7.7%  2.2%  0.0%
    10:40:41.341 7..8/c.k.r D/Send: onProgress -> [libx264 @ 0xb5b84800] ref B L0: 99.3%  0.7%
    10:40:41.341 7..8/c.k.r D/Send: onProgress -> [libx264 @ 0xb5b84800] ref B L1: 97.0%  3.0%
    10:40:41.342 7..8/c.k.r D/Send: onProgress -> [libx264 @ 0xb5b84800] kb/s:384.88
    10:40:41.421 7..8/c.k.r D/Send: onProgress -> [aac @ 0xb5b85000] Qavg: 1561.786
    10:40:41.423 7..8/c.k.r D/Send: onSuccess -> configuration: --target-os=linux --cross-prefix=/home/vagrant/SourceCode/ffmpeg-android/toolchain-android/bin/arm-linux-androideabi- --arch=arm --cpu=cortex-a8 --enable-runtime-cpudetect --sysroot=/home/vagrant/SourceCode/ffmpeg-android/toolchain-android/sysroot --enable-pic --enable-libx264 --enable-libass --enable-libfreetype --enable-libfribidi --enable-libmp3lame --enable-fontconfig --enable-pthreads --disable-debug --disable-ffserver --enable-version3 --enable-hardcoded-tables --disable-ffplay --disable-ffprobe --enable-gpl --enable-yasm --disable-doc --disable-shared --enable-static --pkg-config=/home/vagrant/SourceCode/ffmpeg-android/ffmpeg-pkg-config --prefix=/home/vagrant/SourceCode/ffmpeg-android/build/armeabi-v7a --extra-cflags='-I/home/vagrant/SourceCode/ffmpeg-android/toolchain-android/include -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -fno-strict-overflow -fstack-protector-all' --extra-ldflags='-L/home/vagrant/SourceCode/ffmpeg-android/toolchain-android/lib -Wl,-z,relro -Wl,-z,now -pie' --extra-libs='-lpng -lexpat -lm' --extra-cxxflags=
    10:40:41.423 7..8/c.k.r D/Send:   libavutil      55. 17.103 / 55. 17.103
    10:40:41.423 7..8/c.k.r D/Send:   libavcodec     57. 24.102 / 57. 24.102
    10:40:41.423 7..8/c.k.r D/Send:   libavformat    57. 25.100 / 57. 25.100
    10:40:41.423 7..8/c.k.r D/Send:   libavdevice    57.  0.101 / 57.  0.101
    10:40:41.424 7..8/c.k.r D/Send:   libavfilter     6. 31.100 /  6. 31.100
    10:40:41.424 7..8/c.k.r D/Send:   libswscale      4.  0.100 /  4.  0.100
    10:40:41.424 7..8/c.k.r D/Send:   libswresample   2.  0.101 /  2.  0.101
    10:40:41.424 7..8/c.k.r D/Send:   libpostproc    54.  0.100 / 54.  0.100
    10:40:41.424 7..8/c.k.r D/Send: Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '/storage/emulated/0/Movies/realPoll_0.mp4':
    10:40:41.424 7..8/c.k.r D/Send:   Metadata:
    10:40:41.424 7..8/c.k.r D/Send:     major_brand     : mp42
    10:40:41.424 7..8/c.k.r D/Send:     minor_version   : 0
    10:40:41.424 7..8/c.k.r D/Send:     compatible_brands: isommp42
    10:40:41.424 7..8/c.k.r D/Send:     creation_time   : 2017-08:40:08
    10:40:41.424 7..8/c.k.r D/Send:     com.android.version: 6.0.1
    10:40:41.424 7..8/c.k.r D/Send:   Duration: 00:00:02.79, start: 0.000000, bitrate: 4080 kb/s
    10:40:41.424 7..8/c.k.r D/Send:     Stream #0:0(eng): Video: h264 (Constrained Baseline) (avc1 / 0x31637661), yuv420p, 1280x720, 4166 kb/s, SAR 1:1 DAR 16:9, 30.60 fps, 90k tbr, 90k tbn, 180k tbc (default)
    10:40:41.424 7..8/c.k.r D/Send:     Metadata:
    10:40:41.424 7..8/c.k.r D/Send:       creation_time   : 2017-08:40:08
    10:40:41.424 7..8/c.k.r D/Send:       handler_name    : VideoHandle
    10:40:41.424 7..8/c.k.r D/Send:     Stream #0:1(eng): Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, mono, fltp, 59 kb/s (default)
    10:40:41.424 7..8/c.k.r D/Send:     Metadata:
    10:40:41.424 7..8/c.k.r D/Send:       creation_time   : 2017-08:40:08
    10:40:41.424 7..8/c.k.r D/Send:       handler_name    : SoundHandle
    10:40:41.425 7..8/c.k.r D/Send: [libx264 @ 0xb5b84800] using SAR=1/1
    10:40:41.425 7..8/c.k.r D/Send: [libx264 @ 0xb5b84800] using cpu capabilities: none!
    10:40:41.425 7..8/c.k.r D/Send: [libx264 @ 0xb5b84800] profile Main, level 3.1
    10:40:41.425 7..8/c.k.r D/Send: [libx264 @ 0xb5b84800] 264 - core 148 - H.264/MPEG-4 AVC codec - Copyleft 2003-2015 - http://www.videolan.org/x264.html - options: cabac=1 ref=3 deblock=1:0:0 analyse=0x1:0x111 me=hex subme=7 psy=1 psy_rd=1.00:0.00 mixed_ref=1 me_range=16 chroma_me=1 trellis=1 8x8dct=0 cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_offset=-2 threads=6 lookahead_threads=1 sliced_threads=0 nr=0 decimate=1 interlaced=0 bluray_compat=0 constrained_intra=0 bframes=3 b_pyramid=2 b_adapt=1 b_bias=0 direct=1 weightb=1 open_gop=0 weightp=2 keyint=60 keyint_min=6 scenecut=40 intra_refresh=0 rc_lookahead=40 rc=abr mbtree=1 bitrate=512 ratetol=1.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 ip_ratio=1.40 aq=1:1.00
    10:40:41.425 7..8/c.k.r D/Send: Output #0, flv, to 'rtmp://a.rtmp.youtube.com/live2/b2mb-vjew-2205-8w39':
    10:40:41.425 7..8/c.k.r D/Send:   Metadata:
    10:40:41.425 7..8/c.k.r D/Send:     major_brand     : mp42
    10:40:41.425 7..8/c.k.r D/Send:     minor_version   : 0
    10:40:41.425 7..8/c.k.r D/Send:     compatible_brands: isommp42
    10:40:41.425 7..8/c.k.r D/Send:     com.android.version: 6.0.1
    10:40:41.425 7..8/c.k.r D/Send:     encoder         : Lavf57.25.100
    10:40:41.425 7..8/c.k.r D/Send:     Stream #0:0(eng): Video: h264 (libx264) ([7][0][0][0] / 0x0007), yuv420p, 1280x720 [SAR 1:1 DAR 16:9], q=-1--1, 512 kb/s, 30 fps, 1k tbn, 30 tbc (default)
    10:40:41.425 7..8/c.k.r D/Send:     Metadata:
    10:40:41.425 7..8/c.k.r D/Send:       creation_time   : 2017-08:40:08
    10:40:41.425 7..8/c.k.r D/Send:       handler_name    : VideoHandle
    10:40:41.425 7..8/c.k.r D/Send:       encoder         : Lavc57.24.102 libx264
    10:40:41.425 7..8/c.k.r D/Send:     Side data:
    10:40:41.425 7..8/c.k.r D/Send:       unknown side data type 10 (24 bytes)
    10:40:41.425 7..8/c.k.r D/Send:     Stream #0:1(eng): Audio: aac (LC) ([10][0][0][0] / 0x000A), 44100 Hz, mono, fltp, 69 kb/s (default)
    10:40:41.426 7..8/c.k.r D/Send:     Metadata:
    10:40:41.426 7..8/c.k.r D/Send:       creation_time   : 2017-08:40:08
    10:40:41.426 7..8/c.k.r D/Send:       handler_name    : SoundHandle
    10:40:41.426 7..8/c.k.r D/Send:       encoder         : Lavc57.24.102 aac
    10:40:41.426 7..8/c.k.r D/Send: Stream mapping:
    10:40:41.426 7..8/c.k.r D/Send:   Stream #0:0 -> #0:0 (h264 (native) -> h264 (libx264))
    10:40:41.427 7..8/c.k.r D/Send:   Stream #0:1 -> #0:1 (aac (native) -> aac (native))
    10:40:41.427 7..8/c.k.r D/Send: Press [q] to stop, [?] for help
    10:40:41.427 7..8/c.k.r D/Send: frame=    0 fps=0.0 q=0.0 size=       0kB time=00:00:00.92 bitrate=   4.3kbits/s speed=1.82x    
    10:40:41.427 7..8/c.k.r D/Send: Past duration 0.912331 too large
    10:40:41.427 7..8/c.k.r D/Send: Past duration 0.874321 too large
    10:40:41.427 7..8/c.k.r D/Send: Past duration 0.903664 too large
    10:40:41.427 7..8/c.k.r D/Send: Past duration 0.884666 too large
    10:40:41.427 7..8/c.k.r D/Send: frame=   12 fps= 12 q=0.0 size=       0kB time=00:00:01.03 bitrate=   3.9kbits/s dup=0 drop=2 speed=   1x    
    10:40:41.427 7..8/c.k.r D/Send: frame=   25 fps= 16 q=0.0 size=       0kB time=00:00:01.03 bitrate=   3.9kbits/s dup=0 drop=2 speed=0.667x    
    10:40:41.427 7..8/c.k.r D/Send: frame=   32 fps= 15 q=0.0 size=       0kB time=00:00:02.02 bitrate=   2.0kbits/s dup=0 drop=2 speed=0.98x    
    10:40:41.427 7..8/c.k.r D/Send: Past duration 0.792656 too large
    10:40:41.427 7..8/c.k.r D/Send: Past duration 0.710991 too large
    10:40:41.427 7..8/c.k.r D/Send: Past duration 0.688332 too large
    10:40:41.427 7..8/c.k.r D/Send: Past duration 0.710655 too large
    10:40:41.427 7..8/c.k.r D/Send: Past duration 0.716331 too large
    10:40:41.427 7..8/c.k.r D/Send: Past duration 0.713661 too large
    10:40:41.427 7..8/c.k.r D/Send: Past duration 0.688332 too large
    10:40:41.427 7..8/c.k.r D/Send: Past duration 0.633659 too large
    10:40:41.427 7..8/c.k.r D/Send: Past duration 0.661324 too large
    10:40:41.427 7..8/c.k.r D/Send: Past duration 0.670998 too large
    10:40:41.427 7..8/c.k.r D/Send: Past duration 0.640327 too large
    10:40:41.427 7..8/c.k.r D/Send: frame=   47 fps=6.7 q=0.0 size=       0kB time=00:00:02.02 bitrate=   2.0kbits/s dup=0 drop=2 speed=0.288x    
    10:40:41.427 7..8/c.k.r D/Send: Past duration 0.605324 too large
    10:40:41.428 7..8/c.k.r D/Send: Past duration 0.614998 too large
    10:40:41.428 7..8/c.k.r D/Send: frame=   51 fps=6.6 q=42.0 size=       4kB time=00:00:02.02 bitrate=  17.0kbits/s dup=0 drop=2 speed=0.263x    
    10:40:41.428 7..8/c.k.r D/Send: Past duration 0.605995 too large
    10:40:41.428 7..8/c.k.r D/Send: Past duration 0.608986 too large
    10:40:41.428 7..8/c.k.r D/Send: frame=   53 fps=5.8 q=42.0 size=       9kB time=00:00:02.02 bitrate=  34.8kbits/s dup=0 drop=2 speed=0.223x    
    10:40:41.428 7..8/c.k.r D/Send: Past duration 0.614326 too large
    10:40:41.428 7..8/c.k.r D/Send: frame=   56 fps=5.7 q=41.0 size=      16kB time=00:00:02.02 bitrate=  66.2kbits/s dup=0 drop=2 speed=0.206x    
    10:40:41.428 7..8/c.k.r D/Send: frame=   58 fps=5.5 q=41.0 size=      20kB time=00:00:02.02 bitrate=  82.1kbits/s dup=0 drop=2 speed=0.193x    
    10:40:41.428 7..8/c.k.r D/Send: frame=   61 fps=5.2 q=41.0 size=      27kB time=00:00:02.02 bitrate= 108.3kbits/s dup=0 drop=2 speed=0.173x    
    10:40:41.428 7..8/c.k.r D/Send: frame=   64 fps=5.1 q=41.0 size=      33kB time=00:00:02.02 bitrate= 133.1kbits/s dup=0 drop=2 speed=0.161x    
    10:40:41.428 7..8/c.k.r D/Send: frame=   67 fps=4.8 q=40.0 size=      38kB time=00:00:02.02 bitrate= 154.5kbits/s dup=0 drop=2 speed=0.145x    
    10:40:41.428 7..8/c.k.r D/Send: frame=   69 fps=4.7 q=40.0 size=      42kB time=00:00:02.02 bitrate= 169.5kbits/s dup=0 drop=2 speed=0.138x    
    10:40:41.428 7..8/c.k.r D/Send: frame=   71 fps=4.6 q=39.0 size=      45kB time=00:00:02.02 bitrate= 183.6kbits/s dup=0 drop=2 speed=0.132x    
    10:40:41.428 7..8/c.k.r D/Send: frame=   73 fps=4.5 q=39.0 size=      46kB time=00:00:02.02 bitrate= 187.6kbits/s dup=0 drop=2 speed=0.125x    
    10:40:41.428 7..8/c.k.r D/Send: frame=   76 fps=4.5 q=38.0 size=      49kB time=00:00:02.48 bitrate= 162.7kbits/s dup=0 drop=2 speed=0.149x    
    10:40:41.428 7..8/c.k.r D/Send: Past duration 0.686333 too large
    10:40:41.428 7..8/c.k.r D/Send: Past duration 0.840324 too large
    10:40:41.428 7..8/c.k.r D/Send: frame=   78 fps=4.5 q=37.0 size=      53kB time=00:00:02.54 bitrate= 171.5kbits/s dup=0 drop=2 speed=0.147x    
    10:40:41.428 7..8/c.k.r D/Send: Past duration 0.739662 too large
    10:40:41.429 7..8/c.k.r D/Send: Past duration 0.671333 too large
    10:40:41.429 7..8/c.k.r D/Send: frame=   80 fps=4.5 q=37.0 size=      59kB time=00:00:02.54 bitrate= 188.7kbits/s dup=0 drop=2 speed=0.143x    
    10:40:41.429 7..8/c.k.r D/Send: [flv @ 0xb5ba9600] Failed to update header with correct duration.
    10:40:41.429 7..8/c.k.r D/Send: [flv @ 0xb5ba9600] Failed to update header with correct filesize.
    10:40:41.429 7..8/c.k.r D/Send: frame=   80 fps=2.6 q=-1.0 Lsize=     155kB time=00:00:02.70 bitrate= 468.9kbits/s dup=0 drop=2 speed=0.0877x    
    10:40:41.429 7..8/c.k.r D/Send: video:128kB audio:23kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 2.617489%
    10:40:41.429 7..8/c.k.r D/Send: [libx264 @ 0xb5b84800] frame I:2     Avg QP:28.63  size:  3516
    10:40:41.429 7..8/c.k.r D/Send: [libx264 @ 0xb5b84800] frame P:62    Avg QP:28.45  size:  1878
    10:40:41.429 7..8/c.k.r D/Send: [libx264 @ 0xb5b84800] frame B:16    Avg QP:29.68  size:   400
    10:40:41.429 7..8/c.k.r D/Send: [libx264 @ 0xb5b84800] consecutive B-frames: 71.2%  5.0%  3.8% 20.0%
    10:40:41.429 7..8/c.k.r D/Send: [libx264 @ 0xb5b84800] mb I  I16..4: 98.8%  0.0%  1.2%
    10:40:41.429 7..8/c.k.r D/Send: [libx264 @ 0xb5b84800] mb P  I16..4: 17.8%  0.0%  0.1%  P16..4: 17.0%  0.2%  0.7%  0.0%  0.0%    skip:64.2%
    10:40:41.429 7..8/c.k.r D/Send: [libx264 @ 0xb5b84800] mb B  I16..4:  0.1%  0.0%  0.0%  B16..8: 11.9%  0.0%  0.0%  direct: 1.0%  skip:87.0%  L0:16.0% L1:84.0% BI: 0.0%
    10:40:41.429 7..8/c.k.r D/Send: [libx264 @ 0xb5b84800] final ratefactor: 30.20
    10:40:41.429 7..8/c.k.r D/Send: [libx264 @ 0xb5b84800] coded y,uvDC,uvAC intra: 1.4% 20.4% 0.0% inter: 0.4% 14.0% 0.0%
    10:40:41.429 7..8/c.k.r D/Send: [libx264 @ 0xb5b84800] i16 v,h,dc,p: 66% 22%  7%  4%
    10:40:41.429 7..8/c.k.r D/Send: [libx264 @ 0xb5b84800] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu:  7% 19% 53%  4%  4%  3%  5%  2%  2%
    10:40:41.429 7..8/c.k.r D/Send: [libx264 @ 0xb5b84800] i8c dc,h,v,p: 71% 16% 12%  0%
    10:40:41.430 7..8/c.k.r D/Send: [libx264 @ 0xb5b84800] Weighted P-Frames: Y:6.5% UV:6.5%
    10:40:41.430 7..8/c.k.r D/Send: [libx264 @ 0xb5b84800] ref P L0: 85.6%  4.5%  7.7%  2.2%  0.0%
    10:40:41.430 7..8/c.k.r D/Send: [libx264 @ 0xb5b84800] ref B L0: 99.3%  0.7%
    10:40:41.430 7..8/c.k.r D/Send: [libx264 @ 0xb5b84800] ref B L1: 97.0%  3.0%
    10:40:41.430 7..8/c.k.r D/Send: [libx264 @ 0xb5b84800] kb/s:384.88
    10:40:41.430 7..8/c.k.r D/Send: [aac @ 0xb5b85000] Qavg: 1561.786

    Thanks for your time and insights !

  • FFmpeg pan filter error when routing stereo audio to rear channels of 5.1 output

    13 avril, par MilkyTech

    I'm trying to mix a stereo commentary track into the rear surround channels of a 5.1 audio stream using FFmpeg on Windows 10. My goal is to lower the volume of the original 5.1 movie audio, then add the stereo commentary so it plays from the rear left and right speakers (SL and SR).

    


    I've already converted the commentary to EAC3 to match the main track's codec :

    


    ffmpeg -i "CastCommentary.m4a" -c:a eac3 -b:a 640k CastCommentary.eac3

    


    Then I tried mixing them like this (from within Command Prompt, not PowerShell or a batch file) :

    


    ffmpeg -i "Tropic.Thunder.2008.UNRATED.mkv" -i "CastCommentary.eac3" -filter_complex "[0:a:0]volume=0.4[aud1]; [1:a:0]pan=5.1:FL=0:FR=0:FC=0:LFE=0:SL=c0:SR=c1[cm_rear]; [aud1][cm_rear]amix=inputs=2[aout]" -map 0:v -map "[aout]" -map 0:s? -t 600 -c:v copy -c:s copy -c:a eac3 -b:a 640k "Tropic.Thunder.5.1.commentary.test.mkv"


    


    But I keep getting errors like :

    


    [fc#0 @ ...] Error applying option 'SL' to filter 'pan': Option not found
Error : Option not found


    


    Or :

    


    [Parsed_pan_1 @ ...] Expected in channel name, got ""


    


    Or even :

    


    Output channel layout 5.1 does not match the number of channels mapped 2.


    


    I’ve tried variations of the pan syntax :

    


      

    • pan=5.1:FL=0:FR=0:FC=0:LFE=0:SL=c0:SR=c1
    • 


    • pan=5.1|FL=0|FR=0|FC=0|LFE=0|SL=c0|SR=c1
    • 


    • Wrapping in single/double
    • 


    • quotes Escaping for CMD (no caret issues in current runs)
    • 


    


    Nothing seems to work.

    


    🎯 Goal :

    


      

    • Keep 5.1 audio from the original movie (volume lowered)
    • 


    • Add stereo commentary to SL and SR
    • 


    • Output a proper 5.1 EAC3 mix
    • 


    


    🔧 System :

    


      

    • Windows 10
    • 


    • FFmpeg version : [latest static build from ffmpeg.org]
    • 


    • Running in true Command Prompt (not PowerShell)
    • 


    • Source audio : 5.1 EAC3 from a .mkv, stereo .eac3 from .m4a
    • 


    


    What’s the correct filter_complex syntax to route a stereo track to the rear channels of a 5.1 layout using FFmpeg on Windows ? Am I missing something about pan, amix, or Windows quirks ?