Recherche avancée

Médias (0)

Mot : - Tags -/api

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

Autres articles (34)

  • Des sites réalisés avec MediaSPIP

    2 mai 2011, par

    Cette page présente quelques-uns des sites fonctionnant sous MediaSPIP.
    Vous pouvez bien entendu ajouter le votre grâce au formulaire en bas de page.

  • Support audio et vidéo HTML5

    10 avril 2011

    MediaSPIP utilise les balises HTML5 video et audio pour la lecture de documents multimedia en profitant des dernières innovations du W3C supportées par les navigateurs modernes.
    Pour les navigateurs plus anciens, le lecteur flash Flowplayer est utilisé.
    Le lecteur HTML5 utilisé a été spécifiquement créé pour MediaSPIP : il est complètement modifiable graphiquement pour correspondre à un thème choisi.
    Ces technologies permettent de distribuer vidéo et son à la fois sur des ordinateurs conventionnels (...)

  • HTML5 audio and video support

    13 avril 2011, par

    MediaSPIP uses HTML5 video and audio tags to play multimedia files, taking advantage of the latest W3C innovations supported by modern browsers.
    The MediaSPIP player used has been created specifically for MediaSPIP and can be easily adapted to fit in with a specific theme.
    For older browsers the Flowplayer flash fallback is used.
    MediaSPIP allows for media playback on major mobile platforms with the above (...)

Sur d’autres sites (3991)

  • FFmpeg : avconv and ffserver - connection reset by peer

    5 mars 2016, par einsA

    I’m trying to stream a video via ffserver. My dev environment is a Raspberry Pi 2.

    I’m getting an av_interleaved_write_frame(): Connection reset by peer with the following approach :

    pi@raspberrypi:/opt/livefeed $ avconv -f mjpeg -i movie.mjpg -r 20 -b 2000k -vcodec libx264 -preset ultrafast -f flv -metadata streamName="mjpeg_to_flv" -metadata title="converting mjpeg to flv via avconv" http://localhost:8090/feed1.ffm
    avconv version 11.4-6:11.4-1~deb8u1+rpi1, Copyright (c) 2000-2014 the Libav developers
     built on Jun 16 2015 05:32:34 with gcc 4.9.2 (Raspbian 4.9.2-10)
    [mjpeg @ 0x20461e0] Estimating duration from bitrate, this may be inaccurate
    Input #0, mjpeg, from 'movie.mjpg':
     Duration: N/A, bitrate: N/A
       Stream #0.0: Video: mjpeg, yuvj422p, 768x512, 25 fps, 25 tbn
    [tcp @ 0x2050bc0] Connection to tcp://localhost:8090 failed (Connection refused), trying next address
    [libx264 @ 0x20501a0] using cpu capabilities: none!
    [libx264 @ 0x20501a0] profile Constrained Baseline, level 3.0
    [libx264 @ 0x20501a0] 264 - core 142 r2431 a5831aa - H.264/MPEG-4 AVC codec - Copyleft 2003-2014 - http://www.videolan.org/x264.html - options: cabac=0 ref=1 deblock=0:0:0 analyse=0:0 me=dia subme=0 psy=1 psy_rd=1.00:0.00 mixed_ref=0 me_range=16 chroma_me=1 trellis=0 8x8dct=0 cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_offset=0 threads=6 lookahead_threads=1 sliced_threads=0 nr=0 decimate=1 interlaced=0 bluray_compat=0 constrained_intra=0 bframes=0 weightp=0 keyint=250 keyint_min=20 scenecut=0 intra_refresh=0 rc=abr mbtree=0 bitrate=2000 ratetol=1.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 ip_ratio=1.40 aq=0
    Output #0, flv, to 'http://localhost:8090/feed1.ffm':
     Metadata:
       streamName      : mjpeg_to_flv
       title           : converting mjpeg to flv via avconv
       encoder         : Lavf56.1.0
       Stream #0.0: Video: libx264, yuv420p, 768x512, q=-1--1, 2000 kb/s, 20 fps, 1k tbn, 20 tbc
       Metadata:
         encoder         : Lavc56.1.0 libx264
    Stream mapping:
     Stream #0:0 -> #0:0 (mjpeg (native) -> h264 (libx264))
    Press ctrl-c to stop encoding
    av_interleaved_write_frame(): Connection reset by peer0000.00 bitrate=   0.0kbits/s

    I am able to stream the file doing it step by step with the following settings and commands :

    ffserver

    ffserver config :

    pi@raspberrypi:/opt/livefeed $ cat ffserver_flv.conf
    # FLV live feed

    Port 8090
    BindAddress 0.0.0.0
    MaxHTTPConnections 2000
    MaxClients 1000
    MaxBandwidth 1000
    CustomLog -

    <stream>
     Format status
     ACL allow localhost
     ACL allow 192.168.0.0 192.168.255.255
    </stream>

    <feed>
     File /tmp/feed_flv.ffm
     FileMaxSize 1G
     ACL allow 127.0.0.1
    </feed>

    <stream>
     Format flv
     Feed feed1.ffm

     VideoCodec libx264
     VideoFrameRate 30
     VideoBitRate 800
     VideoSize 720x576
     AVOptionVideo crf 23
     AVOptionVideo preset medium
     AVOptionVideo me_range 16
     AVOptionVideo qdiff 4
     AVOptionVideo qmin 10
     AVOptionVideo qmax 51
     AVOptionVideo flags +global_header

     NoAudio
    </stream>

    starting the server with :

    pi@raspberrypi:/opt/livefeed $ ffserver -v debug -f ffserver_flv.conf
    ffserver version N-78909-gfb2f164 Copyright (c) 2000-2016 the FFmpeg developers
     built with gcc 4.9.2 (Raspbian 4.9.2-10)
     configuration: --arch=armel --target-os=linux --enable-gpl --enable-libx264 --enable-nonfree --enable-libass --enable-libfaac --enable-libmp3lame --enable-libfreetype
     libavutil      55. 19.100 / 55. 19.100
     libavcodec     57. 27.101 / 57. 27.101
     libavformat    57. 28.100 / 57. 28.100
     libavdevice    57.  0.101 / 57.  0.101
     libavfilter     6. 39.100 /  6. 39.100
     libswscale      4.  0.100 /  4.  0.100
     libswresample   2.  0.101 /  2.  0.101
     libpostproc    54.  0.100 / 54.  0.100
    ffserver_flv.conf:6: Port option is deprecated. Use HTTPPort instead.
    ffserver_flv.conf:7: BindAddress option is deprecated. Use HTTPBindAddress instead.
    ffserver_flv.conf:48: Setting default value for video bit rate tolerance = 200000. Use NoDefaults to disable it.
    ffserver_flv.conf:48: Setting default value for video rate control equation = tex^qComp. Use NoDefaults to disable it.
    ffserver_flv.conf:48: Setting default value for video max rate = 49537952. Use NoDefaults to disable it.
    ffserver_flv.conf:48: Setting default value for video buffer size = 1600000. Use NoDefaults to disable it.
    Sat Mar  5 13:29:46 2016 [file @ 0x2f3d0d0]Setting default whitelist 'file'
    Sat Mar  5 13:29:46 2016 [ffm @ 0x2f40bc0]Format ffm probed with size=2048 and score=101
    Sat Mar  5 13:29:46 2016 [NULL @ 0x2f43760]Setting entry with key 'time_base' to value '1/30'
    Sat Mar  5 13:29:46 2016 [NULL @ 0x2f43760]Setting entry with key 'b' to value '800000'
    Sat Mar  5 13:29:46 2016 [NULL @ 0x2f43760]Setting entry with key 'video_size' to value '720x576'
    Sat Mar  5 13:29:46 2016 [NULL @ 0x2f43760]Setting entry with key 'me_range' to value '16'
    Sat Mar  5 13:29:46 2016 [NULL @ 0x2f43760]Setting entry with key 'qdiff' to value '4'
    Sat Mar  5 13:29:46 2016 [NULL @ 0x2f43760]Setting entry with key 'qmin' to value '10'
    Sat Mar  5 13:29:46 2016 [NULL @ 0x2f43760]Setting entry with key 'qmax' to value '51'
    Sat Mar  5 13:29:46 2016 [NULL @ 0x2f43760]Setting entry with key 'flags' to value '+global_header'
    Sat Mar  5 13:29:46 2016 [NULL @ 0x2f43760]Setting entry with key 'bt' to value '200000'
    Sat Mar  5 13:29:46 2016 [NULL @ 0x2f43760]Setting entry with key 'rc_eq' to value 'tex^qComp'
    Sat Mar  5 13:29:46 2016 [NULL @ 0x2f43760]Setting entry with key 'maxrate' to value '1600000'
    Sat Mar  5 13:29:46 2016 [NULL @ 0x2f43760]Setting entry with key 'bufsize' to value '1600000'
    Sat Mar  5 13:29:46 2016 [AVIOContext @ 0x2f41450]Statistics: 32768 bytes read, 0 seeks
    Sat Mar  5 13:29:46 2016 FFserver started.

    avconv

    I’m converting a mjpeg movie (movie.mjpeg) via avconv to flv (movie.flv) :

    pi@raspberrypi:/opt/livefeed $ avconv -f mjpeg -i movie.mjpg -r 20 -b 2000k -vcodec libx264 -preset ultrafast -f flv -metadata streamName="mjpeg_to_flv" -metadata title="converting mjpeg to flv via avconv" movie.flv
    avconv version 11.4-6:11.4-1~deb8u1+rpi1, Copyright (c) 2000-2014 the Libav developers
     built on Jun 16 2015 05:32:34 with gcc 4.9.2 (Raspbian 4.9.2-10)
    [mjpeg @ 0x34f1e0] Estimating duration from bitrate, this may be inaccurate
    Input #0, mjpeg, from 'movie.mjpg':
     Duration: N/A, bitrate: N/A
       Stream #0.0: Video: mjpeg, yuvj422p, 768x512, 25 fps, 25 tbn
    [libx264 @ 0x3591a0] using cpu capabilities: none!
    [libx264 @ 0x3591a0] profile Constrained Baseline, level 3.0
    [libx264 @ 0x3591a0] 264 - core 142 r2431 a5831aa - H.264/MPEG-4 AVC codec - Copyleft 2003-2014 - http://www.videolan.org/x264.html - options: cabac=0 ref=1 deblock=0:0:0 analyse=0:0 me=dia subme=0 psy=1 psy_rd=1.00:0.00 mixed_ref=0 me_range=16 chroma_me=1 trellis=0 8x8dct=0 cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_offset=0 threads=6 lookahead_threads=1 sliced_threads=0 nr=0 decimate=1 interlaced=0 bluray_compat=0 constrained_intra=0 bframes=0 weightp=0 keyint=250 keyint_min=20 scenecut=0 intra_refresh=0 rc=abr mbtree=0 bitrate=2000 ratetol=1.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 ip_ratio=1.40 aq=0
    Output #0, flv, to 'movie.flv':
     Metadata:
       streamName      : mjpeg_to_flv
       title           : converting mjpeg to flv via avconv
       encoder         : Lavf56.1.0
       Stream #0.0: Video: libx264, yuv420p, 768x512, q=-1--1, 2000 kb/s, 20 fps, 1k tbn, 20 tbc
       Metadata:
         encoder         : Lavc56.1.0 libx264
    Stream mapping:
     Stream #0:0 -> #0:0 (mjpeg (native) -> h264 (libx264))
    Press ctrl-c to stop encoding
    frame=   93 fps=  9 q=-1.0 Lsize=    1078kB time=4.60 bitrate=1919.3kbits/s    ts/s    
    video:1076kB audio:0kB other streams:0kB global headers:0kB muxing overhead: 0.201471%
    [libx264 @ 0x3591a0] frame I:1     Avg QP:19.00  size: 35978
    [libx264 @ 0x3591a0] frame P:92    Avg QP:21.43  size: 11574
    [libx264 @ 0x3591a0] mb I  I16..4: 100.0%  0.0%  0.0%
    [libx264 @ 0x3591a0] mb P  I16..4: 25.9%  0.0%  0.0%  P16..4: 53.6%  0.0%  0.0%  0.0%  0.0%    skip:20.5%
    [libx264 @ 0x3591a0] final ratefactor: 20.82
    [libx264 @ 0x3591a0] coded y,uvDC,uvAC intra: 28.9% 46.9% 18.2% inter: 33.7% 39.8% 2.8%
    [libx264 @ 0x3591a0] i16 v,h,dc,p: 29% 30% 28% 14%
    [libx264 @ 0x3591a0] i8c dc,h,v,p: 53% 26% 15%  7%
    [libx264 @ 0x3591a0] kb/s:1893.82

    send flv to ffserver

    pi@raspberrypi:/opt/livefeed $ ffmpeg -stream_loop -1 -i movie.flv http://localhost:8090/feed1.ffm
    ffmpeg version N-78909-gfb2f164 Copyright (c) 2000-2016 the FFmpeg developers
     built with gcc 4.9.2 (Raspbian 4.9.2-10)
     configuration: --arch=armel --target-os=linux --enable-gpl --enable-libx264 --enable-nonfree --enable-libass --enable-libfaac --enable-libmp3lame --enable-libfreetype
     libavutil      55. 19.100 / 55. 19.100
     libavcodec     57. 27.101 / 57. 27.101
     libavformat    57. 28.100 / 57. 28.100
     libavdevice    57.  0.101 / 57.  0.101
     libavfilter     6. 39.100 /  6. 39.100
     libswscale      4.  0.100 /  4.  0.100
     libswresample   2.  0.101 /  2.  0.101
     libpostproc    54.  0.100 / 54.  0.100
    Input #0, flv, from 'movie.flv':
     Metadata:
       streamName      : mjpeg_to_flv
       title           : converting mjpeg to flv via avconv
       encoder         : Lavf56.1.0
     Duration: 00:00:04.65, start: 0.000000, bitrate: 1898 kb/s
       Stream #0:0: Video: h264 (Constrained Baseline), yuv420p, 768x512, 2000 kb/s, 20 fps, 20 tbr, 1k tbn, 40 tbc
    [tcp @ 0x30d2920] Connection to tcp://localhost:8090 failed (Connection refused), trying next address
    [tcp @ 0x329a080] Connection to tcp://localhost:8090 failed (Connection refused), trying next address
    [libx264 @ 0x325fb30] using cpu capabilities: ARMv6 NEON
    [libx264 @ 0x325fb30] profile High, level 3.1
    [libx264 @ 0x325fb30] 264 - core 148 r2665 a01e339 - H.264/MPEG-4 AVC codec - Copyleft 2003-2016 - http://www.videolan.org/x264.html - options: cabac=1 ref=3 deblock=1:0:0 analyse=0x3:0x113 me=hex subme=7 psy=1 psy_rd=1.00:0.00 mixed_ref=1 me_range=16 chroma_me=1 trellis=1 8x8dct=1 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=250 keyint_min=25 scenecut=40 intra_refresh=0 rc_lookahead=40 rc=crf mbtree=1 crf=23.0 qcomp=0.60 qpmin=10 qpmax=51 qpstep=4 vbv_maxrate=1600 vbv_bufsize=1600 crf_max=0.0 nal_hrd=none filler=0 ip_ratio=1.40 aq=1:1.00
    Output #0, ffm, to 'http://localhost:8090/feed1.ffm':
     Metadata:
       streamName      : mjpeg_to_flv
       title           : converting mjpeg to flv via avconv
       creation_time   : now
       encoder         : Lavf57.28.100
       Stream #0:0: Video: h264 (libx264), yuv420p, 720x576, q=10-51, 800 kb/s, 20 fps, 1000k tbn, 30 tbc
       Metadata:
         encoder         : Lavc57.27.101 libx264
       Side data:
         cpb: bitrate max/min/avg: 1600000/0/800000 buffer size: 1600000 vbv_delay: -1
    Stream mapping:
     Stream #0:0 -> #0:0 (h264 (native) -> h264 (libx264))
    Press [q] to stop, [?] for help
    Past duration 0.999992 too large
       Last message repeated 2 times
    Past duration 0.999992 too large      4kB time=00:00:00.00 bitrate=N/A dup=5 drop=0 speed=   0x    
       Last message repeated 3 times
    Past duration 0.999992 too large      4kB time=00:00:00.00 bitrate=N/A dup=9 drop=0 speed=  
    [croped]    
    video:968kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 3.719636%
    [libx264 @ 0x325fb30] frame I:11    Avg QP:22.49  size: 13888
    [libx264 @ 0x325fb30] frame P:487   Avg QP:16.10  size:  1382
    [libx264 @ 0x325fb30] frame B:980   Avg QP:21.31  size:   168
    [libx264 @ 0x325fb30] consecutive B-frames: 11.0%  1.8%  0.4% 86.9%
    [libx264 @ 0x325fb30] mb I  I16..4: 11.5% 81.2%  7.3%
    [libx264 @ 0x325fb30] mb P  I16..4:  1.6%  5.0%  0.2%  P16..4: 12.0%  1.6%  0.7%  0.0%  0.0%    skip:79.0%
    [libx264 @ 0x325fb30] mb B  I16..4:  0.0%  0.0%  0.0%  B16..8:  5.8%  0.1%  0.0%  direct: 0.0%  skip:94.1%  L0:55.3% L1:44.4% BI: 0.3%
    [libx264 @ 0x325fb30] 8x8 transform intra:75.4% inter:88.7%
    [libx264 @ 0x325fb30] coded y,uvDC,uvAC intra: 38.6% 48.2% 14.9% inter: 1.5% 2.3% 0.0%
    [libx264 @ 0x325fb30] i16 v,h,dc,p: 28% 32% 11% 28%
    [libx264 @ 0x325fb30] i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 25% 21% 31%  3%  4%  4%  4%  4%  4%
    [libx264 @ 0x325fb30] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 23% 25% 23%  4%  7%  5%  7%  4%  3%
    [libx264 @ 0x325fb30] i8c dc,h,v,p: 63% 20% 14%  4%
    [libx264 @ 0x325fb30] Weighted P-Frames: Y:1.6% UV:1.2%
    [libx264 @ 0x325fb30] ref P L0: 67.5% 11.6% 13.8%  6.8%  0.3%
    [libx264 @ 0x325fb30] ref B L0: 58.7% 40.4%  0.9%
    [libx264 @ 0x325fb30] ref B L1: 96.2%  3.8%
    [libx264 @ 0x325fb30] kb/s:160.83
    Exiting normally, received signal 2.

    On another machine I can open the flv-stream via VLC by opening the address http://ip.running.ffserver:8090/live.flv.

    So why does it works step by step via the movie.flv file and not directly ?

    What is the difference between

    • avconv -f mjpeg -i movie.mjpg -r 20 -b 2000k -vcodec libx264 -preset ultrafast -f flv -metadata streamName="mjpeg_to_flv" -metadata title="converting mjpeg to flv via avconv" movie.flv
      followed by
      ffmpeg -stream_loop -1 -i movie.flv http://localhost:8090/feed1.ffm and

    • avconv -f mjpeg -i movie.mjpg -r 20 -b 2000k -vcodec libx264 -preset ultrafast -f flv -metadata streamName="mjpeg_to_flv" -metadata title="converting mjpeg to flv via avconv" http://localhost:8090/feed1.ffm ? Why ends this command with a av_interleaved_write_frame(): Connection reset by peer ?


    Informations and logs

    • ffserver log (both times) :

      Sat Mar  5 13:54:08 2016 127.0.0.1 - - [POST] "/feed1.ffm HTTP/1.1" 200 4096
    • ffserver version

      pi@raspberrypi:/opt/livefeed $ ffserver -version
      ffserver version N-78909-gfb2f164 Copyright (c) 2000-2016 the FFmpeg developers
      built with gcc 4.9.2 (Raspbian 4.9.2-10)
      configuration: --arch=armel --target-os=linux --enable-gpl --enable-libx264 --enable-nonfree --enable-libass --enable-libfaac --enable-libmp3lame --enable-libfreetype
      libavutil      55. 19.100 / 55. 19.100
      libavcodec     57. 27.101 / 57. 27.101
      libavformat    57. 28.100 / 57. 28.100
      libavdevice    57.  0.101 / 57.  0.101
      libavfilter     6. 39.100 /  6. 39.100
      libswscale      4.  0.100 /  4.  0.100
      libswresample   2.  0.101 /  2.  0.101
      libpostproc    54.  0.100 / 54.  0.100
    • ffmpeg version

      pi@raspberrypi:/opt/livefeed $ ffmpeg -version
      ffmpeg version N-78909-gfb2f164 Copyright (c) 2000-2016 the FFmpeg developers
      built with gcc 4.9.2 (Raspbian 4.9.2-10)
      configuration: --arch=armel --target-os=linux --enable-gpl --enable-libx264 --enable-nonfree --enable-libass --enable-libfaac --enable-libmp3lame --enable-libfreetype
      libavutil      55. 19.100 / 55. 19.100
      libavcodec     57. 27.101 / 57. 27.101
      libavformat    57. 28.100 / 57. 28.100
      libavdevice    57.  0.101 / 57.  0.101
      libavfilter     6. 39.100 /  6. 39.100
      libswscale      4.  0.100 /  4.  0.100
      libswresample   2.  0.101 /  2.  0.101
      libpostproc    54.  0.100 / 54.  0.100
    • avconv version :

      pi@raspberrypi:/opt/livefeed $ avconv -version
      avconv version 11.4-6:11.4-1~deb8u1+rpi1, Copyright (c) 2000-2014 the Libav developers
      built on Jun 16 2015 05:32:34 with gcc 4.9.2 (Raspbian 4.9.2-10)
      avconv 11.4-6:11.4-1~deb8u1+rpi1
      libavutil     54.  3. 0 / 54.  3. 0
      libavcodec    56.  1. 0 / 56.  1. 0
      libavformat   56.  1. 0 / 56.  1. 0
      libavdevice   55.  0. 0 / 55.  0. 0
      libavfilter    5.  0. 0 /  5.  0. 0
      libavresample  2.  1. 0 /  2.  1. 0
      libswscale     3.  0. 0 /  3.  0. 0

    Thanks and cheers

    Clemens

  • Use FFMPEG mux flv and send rtmp on IOS

    3 janvier 2017, par downloss

    I would like to use iphone camera & microphone to capture information pushed out through FFMPEG RTMP Streaming

    The following Function capture information on IOS

    - (void)captureOutput:(AVCaptureOutput *)captureOutput  didOutputSampleBuffer:(CMSampleBufferRef)sampleBuffer fromConnection:(AVCaptureConnection *)connection
    {    
       if (connection == videoCaptureConnection)
       {
           [manager264 encoderToH264:sampleBuffer];
       }
       else if (connection == audioCaptureConnection)
       {
           [manager264 encoderToMP3:sampleBuffer];
       }
    }

    Initialization FFMPEG

    - (int)setX264Resource
    {
       Global_Variables_VVV = (AppDelegate *)[[UIApplication sharedApplication] delegate];
       avformat_network_init();
       av_register_all();

       pFormatCtx = avformat_alloc_context();
       avformat_alloc_output_context2(&amp;pFormatCtx, NULL, "flv", out_file);
       fmt = pFormatCtx->oformat;

       //Open output URL
       if (avio_open(&amp;pFormatCtx->pb, out_file, AVIO_FLAG_READ_WRITE) &lt; 0)
       {
           printf("Failed to open output file! \n");
           return -1;
       }

       /* Add the audio and video streams using the default format codecs
        * and initialize the codecs. */
       video_st = NULL;
       audio_st = NULL;
      if (fmt->video_codec != AV_CODEC_ID_NONE) {
           video_st = add_stream(pFormatCtx, &amp;pCodec, AV_CODEC_ID_H264);
       }
      if (fmt->audio_codec != AV_CODEC_ID_NONE) {
           audio_st = add_stream(pFormatCtx, &amp;aCodec, AV_CODEC_ID_MP3);
       }

       /* Now that all the parameters are set, we can open the audio and
        * video codecs and allocate the necessary encode buffers. */
       if (video_st)
           [self open_video:pFormatCtx avcodec:pCodec avstream:video_st];

       if (audio_st)
           [self open_audio:pFormatCtx avcodec:aCodec avstream:audio_st];

       // Show some Information
       av_dump_format(pFormatCtx, 0, out_file, 1);

       //Write File Header
       avformat_write_header(pFormatCtx, NULL);

       av_new_packet(&amp;pkt, picture_size);
       av_new_packet(&amp;pkt2, picture_size);

       AVCodecContext *c = video_st->codec;

       y_size = c->width * c->height;

       if (pFrame)
           pFrame->pts = 0;

       if(aFrame)
       {
           aFrame->pts = 0;
       }

       return 0;
    }

    static AVStream *add_stream(AVFormatContext *oc, AVCodec **codec, enum AVCodecID codec_id)
    {
       AVCodecContext *c;
       AVStream *st;
       /* find the encoder */
       *codec = avcodec_find_encoder(codec_id);
       if (!(*codec))
       {
           NSLog(@"Could not find encoder for '%s'\n",
             avcodec_get_name(codec_id));
       }
       st = avformat_new_stream(oc, *codec);
       if (!st)
       {
           NSLog(@"Could not allocate stream\n");
       }
       st->id = oc->nb_streams-1;
       c = st->codec;
       switch ((*codec)->type)
       {
           case AVMEDIA_TYPE_AUDIO:
               c->codec_id = AV_CODEC_ID_MP3;
               c->codec_type = AVMEDIA_TYPE_AUDIO;
               c->channels = 1;

               c->sample_fmt = AV_SAMPLE_FMT_S16P;
               c->bit_rate = 128000;
               c->sample_rate = 44100;
               c->channel_layout = AV_CH_LAYOUT_MONO;
               break;
           case AVMEDIA_TYPE_VIDEO:
               c->codec_id = AV_CODEC_ID_H264;
               c->codec_type=AVMEDIA_TYPE_VIDEO;
               /* Resolution must be a multiple of two. */
               c->width    = 720;
               c->height   = 1280;
               /* timebase: This is the fundamental unit of time (in seconds) in terms
                * of which frame timestamps are represented. For fixed-fps content,
                * timebase should be 1/framerate and timestamp increments should be
                * identical to 1. */
               c->time_base.den = 30;
               c->time_base.num = 1;
               c->gop_size      = 15; /* emit one intra frame every twelve frames at most */
               c->pix_fmt       = PIX_FMT_YUV420P;
               c->max_b_frames = 0;
               c->bit_rate = 3000000;
               c->qmin = 10;
               c->qmax = 51;

               break;
           default:
               break;
       }
       /* Some formats want stream headers to be separate. */
       if (oc->oformat->flags &amp; AVFMT_GLOBALHEADER)
           c->flags |= CODEC_FLAG_GLOBAL_HEADER;
       return st;
    }

    SampleBuffer will turn into H264 and pushed out RTMP Streaming

    - (void)encoderToH264:(CMSampleBufferRef)sampleBuffer
    {
       CVPixelBufferRef imageBuffer = CMSampleBufferGetImageBuffer(sampleBuffer);
       if (CVPixelBufferLockBaseAddress(imageBuffer, 0) == kCVReturnSuccess)
       {
           UInt8 *bufferbasePtr = (UInt8 *)CVPixelBufferGetBaseAddress(imageBuffer);
           UInt8 *bufferPtr = (UInt8 *)CVPixelBufferGetBaseAddressOfPlane(imageBuffer,0);
           UInt8 *bufferPtr1 = (UInt8 *)CVPixelBufferGetBaseAddressOfPlane(imageBuffer,1);
           size_t buffeSize = CVPixelBufferGetDataSize(imageBuffer);
           size_t width = CVPixelBufferGetWidth(imageBuffer);
           size_t height = CVPixelBufferGetHeight(imageBuffer);
           size_t bytesPerRow = CVPixelBufferGetBytesPerRow(imageBuffer);
           size_t bytesrow0 = CVPixelBufferGetBytesPerRowOfPlane(imageBuffer,0);
           size_t bytesrow1  = CVPixelBufferGetBytesPerRowOfPlane(imageBuffer,1);
           size_t bytesrow2 = CVPixelBufferGetBytesPerRowOfPlane(imageBuffer,2);
           UInt8 *yuv420_data = (UInt8 *)malloc(width * height *3/ 2); // buffer to store YUV with layout YYYYYYYYUUVV


           /* convert NV12 data to YUV420*/
           UInt8 *pY = bufferPtr ;
           UInt8 *pUV = bufferPtr1;
           UInt8 *pU = yuv420_data + width*height;
           UInt8 *pV = pU + width*height/4;
           for(int i =0;i/Read raw YUV data
           picture_buf = yuv420_data;
           pFrame->data[0] = picture_buf;              // Y
           pFrame->data[1] = picture_buf+ y_size;      // U
           pFrame->data[2] = picture_buf+ y_size*5/4;  // V

           int got_picture = 0;

           // Encode
           pFrame->width = 720;
           pFrame->height = 1280;
           pFrame->format = PIX_FMT_YUV420P;

           AVCodecContext *c = video_st->codec;
           int ret = avcodec_encode_video2(c, &amp;pkt, pFrame, &amp;got_picture);
           if(ret &lt; 0)
           {
               printf("Failed to encode! \n");
           }

           if (got_picture==1)
           {
               /* Compute current audio and video time. */
               video_time = video_st ? video_st->pts.val * av_q2d(video_st->time_base) : 0.0;
               pFrame->pts += av_rescale_q(1, video_st->codec->time_base, video_st->time_base);

               if(pkt.size != 0)
               {
                   printf("Succeed to encode frame: %5lld\tsize:%5d\n", pFrame->pts, pkt.size);
                   pkt.stream_index = video_st->index;
                   ret = av_write_frame(pFormatCtx, &amp;pkt);
                   av_free_packet(&amp;pkt);
               }
           }
           free(yuv420_data);
       }
       CVPixelBufferUnlockBaseAddress(imageBuffer, 0);
    }

    SampleBuffer will turn into MP3 and pushed out RTMP Streaming

    -(void)encoderToMP3:(CMSampleBufferRef)sampleBuffer
    {
       CMSampleTimingInfo timing_info;
       CMSampleBufferGetSampleTimingInfo(sampleBuffer, 0, &amp;timing_info);
       double  pts=0;
       double  dts=0;
       AVCodecContext *c;
       int got_packet, ret;
       c = audio_st->codec;
       CMItemCount numSamples = CMSampleBufferGetNumSamples(sampleBuffer);

       NSUInteger channelIndex = 0;

       CMBlockBufferRef audioBlockBuffer = CMSampleBufferGetDataBuffer(sampleBuffer);

       size_t audioBlockBufferOffset = (channelIndex * numSamples * sizeof(SInt16));
       size_t lengthAtOffset = 0;
       size_t totalLength = 0;
       SInt16 *samples = NULL;
       CMBlockBufferGetDataPointer(audioBlockBuffer, audioBlockBufferOffset, &amp;lengthAtOffset, &amp;totalLength, (char **)(&amp;samples));

       const AudioStreamBasicDescription *audioDescription = CMAudioFormatDescriptionGetStreamBasicDescription(CMSampleBufferGetFormatDescription(sampleBuffer));

       SwrContext *swr = swr_alloc();

       int in_smprt = (int)audioDescription->mSampleRate;
       av_opt_set_int(swr, "in_channel_layout",  AV_CH_LAYOUT_MONO, 0);
       av_opt_set_int(swr, "out_channel_layout", audio_st->codec->channel_layout,  0);

       av_opt_set_int(swr, "in_channel_count", audioDescription->mChannelsPerFrame,  0);
       av_opt_set_int(swr, "out_channel_count", 1,  0);

       av_opt_set_int(swr, "out_channel_layout", audio_st->codec->channel_layout,  0);
       av_opt_set_int(swr, "in_sample_rate",     audioDescription->mSampleRate,0);

       av_opt_set_int(swr, "out_sample_rate",    audio_st->codec->sample_rate,0);

       av_opt_set_sample_fmt(swr, "in_sample_fmt",  AV_SAMPLE_FMT_S16, 0);

       av_opt_set_sample_fmt(swr, "out_sample_fmt", audio_st->codec->sample_fmt,  0);

       swr_init(swr);
       uint8_t **input = NULL;
       int src_linesize;
       int in_samples = (int)numSamples;
       ret = av_samples_alloc_array_and_samples(&amp;input, &amp;src_linesize, audioDescription->mChannelsPerFrame, in_samples, AV_SAMPLE_FMT_S16P, 0);

       *input=(uint8_t*)samples;
       uint8_t *output=NULL;

       int out_samples = av_rescale_rnd(swr_get_delay(swr, in_smprt) +in_samples, (int)audio_st->codec->sample_rate, in_smprt, AV_ROUND_UP);

       av_samples_alloc(&amp;output, NULL, audio_st->codec->channels, out_samples, audio_st->codec->sample_fmt, 0);
       in_samples = (int)numSamples;
       out_samples = swr_convert(swr, &amp;output, out_samples, (const uint8_t **)input, in_samples);

       aFrame->nb_samples =(int) out_samples;

       ret = avcodec_fill_audio_frame(aFrame, audio_st->codec->channels, audio_st->codec->sample_fmt,
                                      (uint8_t *)output,
                                      (int) out_samples *
                                      av_get_bytes_per_sample(audio_st->codec->sample_fmt) *
                                      audio_st->codec->channels, 1);
       if (ret &lt; 0)
       {
           fprintf(stderr, "Error fill audio frame: %s\n", av_err2str(ret));
       }
       aFrame->channel_layout = audio_st->codec->channel_layout;
       aFrame->channels=audio_st->codec->channels;
       aFrame->sample_rate= audio_st->codec->sample_rate;

       if (timing_info.presentationTimeStamp.timescale!=0)
           pts=(double) timing_info.presentationTimeStamp.value/timing_info.presentationTimeStamp.timescale;


       aFrame->pts = pts*audio_st->time_base.den;
       aFrame->pts = av_rescale_q(aFrame->pts, audio_st->time_base, audio_st->codec->time_base);

       ret = avcodec_encode_audio2(c, &amp;pkt2, aFrame, &amp;got_packet);

       if (ret &lt; 0)
       {
           fprintf(stderr, "Error encoding audio frame: %s\n", av_err2str(ret));
       }
       swr_free(&amp;swr);

       if (got_packet)
       {
           pkt2.stream_index = audio_st->index;        

           // Write the compressed frame to the media file.

           ret = av_interleaved_write_frame(pFormatCtx, &amp;pkt2);
           if (ret != 0)
           {
               fprintf(stderr, "Error while writing audio frame: %s\n", av_err2str(ret));
               av_free_packet(&amp;pkt2);
           }
       }
    }

    Soon "Broken pipe" problem occurs after execution.
    PTS is currently feeling is not adjusted, but do not know how to adjust the PTS.

    2016-03-09 16:57:41.058 PoliceCamPlayer[1004:193465] recordVideo....
    [libx264 @ 0x12f8b6e00] using cpu capabilities: ARMv8 NEON
    [libx264 @ 0x12f8b6e00] profile Constrained Baseline, level 3.1
    [libx264 @ 0x12f8b6e00] 264 - core 148 - H.264/MPEG-4 AVC codec - Copyleft 2003-2016 - http://www.videolan.org/x264.html - options: cabac=0 ref=1 deblock=1:0:0 analyse=0x1:0x111 me=hex subme=2 psy=1 psy_rd=1.00:0.00 mixed_ref=0 me_range=16 chroma_me=1 trellis=0 8x8dct=0 cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_offset=0 threads=2 lookahead_threads=2 sliced_threads=1 slices=2 nr=0 decimate=1 interlaced=0 bluray_compat=0 constrained_intra=0 bframes=0 weightp=0 keyint=15 keyint_min=1 scenecut=40 intra_refresh=0 rc=abr mbtree=0 bitrate=3000 ratetol=1.0 qcomp=0.60 qpmin=25 qpmax=51 qpstep=4 ip_ratio=1.40 aq=1:1.00
    Output #0, flv, to 'rtmp://XXX.XX.XXX.XX/myapp/jackal':
       Stream #0:0: Video: h264 (libx264), yuv420p, 720x1280, q=25-51, 3000 kb/s, 23 tbc
       Stream #0:1: Audio: mp3 (libmp3lame), 44100 Hz, mono, s16p, 64 kb/s
    [flv @ 0x12f8b5400] Using AVStream.codec.time_base as a timebase hint to the muxer is deprecated. Set AVStream.time_base instead.
    [flv @ 0x12f8b5400] Using AVStream.codec.time_base as a timebase hint to the muxer is deprecated. Set AVStream.time_base instead.
    [libx264 @ 0x12f8b6e00] Provided packet is too small, needs to be 33468
    Failed to encode!
    Audio_pts:4154432515 pts_time:4.15443e+06 dts:4154432515 dts_time:4.15443e+06 duration:1152 duration_time:1.152 stream_index:1
    Video_pts:43 pts_time:0.043 dts:43 dts_time:0.043 duration:0 duration_time:0 stream_index:0
    Audio_pts:4154433667 pts_time:4.15443e+06 dts:4154433667 dts_time:4.15443e+06 duration:1152 duration_time:1.152 stream_index:1
    Audio_pts:4154434854 pts_time:4.15443e+06 dts:4154434854 dts_time:4.15443e+06 duration:1152 duration_time:1.152 stream_index:1
    Video_pts:86 pts_time:0.086 dts:86 dts_time:0.086 duration:0 duration_time:0 stream_index:0
    Audio_pts:4154435996 pts_time:4.15444e+06 dts:4154435996 dts_time:4.15444e+06 duration:1152 duration_time:1.152 stream_index:1
    Audio_pts:4154437138 pts_time:4.15444e+06 dts:4154437138 dts_time:4.15444e+06 duration:1152 duration_time:1.152 stream_index:1
    Video_pts:129 pts_time:0.129 dts:129 dts_time:0.129 duration:0 duration_time:0 stream_index:0
    Audio_pts:4154438281 pts_time:4.15444e+06 dts:4154438281 dts_time:4.15444e+06 duration:1152 duration_time:1.152 stream_index:1
    Video_pts:172 pts_time:0.172 dts:172 dts_time:0.172 duration:0 duration_time:0 stream_index:0
    Audio_pts:4154439467 pts_time:4.15444e+06 dts:4154439467 dts_time:4.15444e+06 duration:1152 duration_time:1.152 stream_index:1
    Video_pts:215 pts_time:0.215 dts:215 dts_time:0.215 duration:0 duration_time:0 stream_index:0
    Audio_pts:4154440609 pts_time:4.15444e+06 dts:4154440609 dts_time:4.15444e+06 duration:1152 duration_time:1.152 stream_index:1
    Audio_pts:4154441752 pts_time:4.15444e+06 dts:4154441752 dts_time:4.15444e+06 duration:1152 duration_time:1.152 stream_index:1
    Video_pts:258 pts_time:0.258 dts:258 dts_time:0.258 duration:0 duration_time:0 stream_index:0
    Audio_pts:4154442884 pts_time:4.15444e+06 dts:4154442884 dts_time:4.15444e+06 duration:1152 duration_time:1.152 stream_index:1
    Audio_pts:4154444071 pts_time:4.15444e+06 dts:4154444071 dts_time:4.15444e+06 duration:1152 duration_time:1.152 stream_index:1
    Video_pts:301 pts_time:0.301 dts:301 dts_time:0.301 duration:0 duration_time:0 stream_index:0
    Audio_pts:4154445213 pts_time:4.15445e+06 dts:4154445213 dts_time:4.15445e+06 duration:1152 duration_time:1.152 stream_index:1
    Audio_pts:4154446355 pts_time:4.15445e+06 dts:4154446355 dts_time:4.15445e+06 duration:1152 duration_time:1.152 stream_index:1
    Video_pts:344 pts_time:0.344 dts:344 dts_time:0.344 duration:0 duration_time:0 stream_index:0
    Audio_pts:4154447498 pts_time:4.15445e+06 dts:4154447498 dts_time:4.15445e+06 duration:1152 duration_time:1.152 stream_index:1
    Video_pts:387 pts_time:0.387 dts:387 dts_time:0.387 duration:0 duration_time:0 stream_index:0
    Audio_pts:4154448640 pts_time:4.15445e+06 dts:4154448640 dts_time:4.15445e+06 duration:1152 duration_time:1.152 stream_index:1
    Audio_pts:4154449826 pts_time:4.15445e+06 dts:4154449826 dts_time:4.15445e+06 duration:1152 duration_time:1.152 stream_index:1
    Video_pts:430 pts_time:0.43 dts:430 dts_time:0.43 duration:0 duration_time:0 stream_index:0
    Audio_pts:4154450969 pts_time:4.15445e+06 dts:4154450969 dts_time:4.15445e+06 duration:1152 duration_time:1.152 stream_index:1
    Audio_pts:4154452101 pts_time:4.15445e+06 dts:4154452101 dts_time:4.15445e+06 duration:1152 duration_time:1.152 stream_index:1
    ...................
    ...................
    ...................
    Video_pts:4343 pts_time:4.343 dts:4343 dts_time:4.343 duration:0 duration_time:0 stream_index:0
    Audio_pts:4154622619 pts_time:4.15462e+06 dts:4154622619 dts_time:4.15462e+06 duration:1152 duration_time:1.152 stream_index:1
    Video_pts:4386 pts_time:4.386 dts:4386 dts_time:4.386 duration:0 duration_time:0 stream_index:0
    Audio_pts:4154623761 pts_time:4.15462e+06 dts:4154623761 dts_time:4.15462e+06 duration:1152 duration_time:1.152 stream_index:1
    Audio_pts:4154624903 pts_time:4.15462e+06 dts:4154624903 dts_time:4.15462e+06 duration:1152 duration_time:1.152 stream_index:1
    Audio_pts:4154626090 pts_time:4.15463e+06 dts:4154626090 dts_time:4.15463e+06 duration:1152 duration_time:1.152 stream_index:1
    Video_pts:4429 pts_time:4.429 dts:4429 dts_time:4.429 duration:0 duration_time:0 stream_index:0
    Audio_pts:4154627222 pts_time:4.15463e+06 dts:4154627222 dts_time:4.15463e+06 duration:1152 duration_time:1.152 stream_index:1
    Video_pts:4472 pts_time:4.472 dts:4472 dts_time:4.472 duration:0 duration_time:0 stream_index:0
    Error while writing audio frame: Broken pipe
    Audio_pts:4154628365 pts_time:4.15463e+06 dts:4154628365 dts_time:4.15463e+06 duration:1152 duration_time:1.152 stream_index:1
    Error while writing audio frame: Broken pipe
    Audio_pts:4154629507 pts_time:4.15463e+06 dts:4154629507 dts_time:4.15463e+06 duration:1152 duration_time:1.152 stream_index:1
    Error while writing audio frame: Broken pipe
    Audio_pts:4154630693 pts_time:4.15463e+06 dts:4154630693 dts_time:4.15463e+06 duration:1152 duration_time:1.152 stream_index:1
    Error while writing audio frame: Broken pipe
    Audio_pts:4154631836 pts_time:4.15463e+06 dts:4154631836 dts_time:4.15463e+06 duration:1152 duration_time:1.152 stream_index:1
    Error while writing audio frame: Broken pipe
    Audio_pts:4154632978 pts_time:4.15463e+06 dts:4154632978 dts_time:4.15463e+06 duration:1152 duration_time:1.152 stream_index:1
    .......................
    .......................
    .......................
    2016-03-09 16:57:49.345 PoliceCamPlayer[1004:193465] stopRecord!!!
    Video_pts:7783 pts_time:7.783 dts:7783 dts_time:7.783 duration:0 duration_time:0 stream_index:0
    [flv @ 0x12f8b5400] Failed to update header with correct duration.
    [flv @ 0x12f8b5400] Failed to update header with correct filesize.
    [libx264 @ 0x12f8b6e00] frame I:28    Avg QP:25.36  size: 24181
    [libx264 @ 0x12f8b6e00] frame P:154   Avg QP:25.34  size:  6603
    [libx264 @ 0x12f8b6e00] mb I  I16..4: 80.9%  0.0% 19.1%
    [libx264 @ 0x12f8b6e00] mb P  I16..4:  5.9%  0.0%  0.2%  P16..4: 28.2%  4.4%  1.0%  0.0%  0.0%    skip:60.2%
    [libx264 @ 0x12f8b6e00] final ratefactor: 16.70
    [libx264 @ 0x12f8b6e00] coded y,uvDC,uvAC intra: 35.8% 9.3% 0.4% inter: 8.8% 1.6% 0.0%
    [libx264 @ 0x12f8b6e00] i16 v,h,dc,p: 28% 26% 26% 21%
    [libx264 @ 0x12f8b6e00] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 13% 26% 25%  3%  7%  4%  5%  3% 13%
    [libx264 @ 0x12f8b6e00] i8c dc,h,v,p: 85%  9%  5%  0%
    [libx264 @ 0x12f8b6e00] kb/s:1712.63
  • Videos produced with ffmpeg don't have frame width or height properties ?

    18 mars 2016, par Marie

    I am using the following to produce my intermediate slideshow mp4 clips

    ffmpeg    -r 1 -f image2 -vcodec mjpeg      -i 01.jpg    -i 01.mp3    -codec:v libx264 -r 24    -codec:a copy -b:a 128k    -shortest -y  01.mp4

    And the produced 01.mp4 plays OK however, the properties detail under Windows don’t show any frame size width or height ? Why is that ? This may be an issue, see below...

    I also produced an intro clip in AfterEffect using H.264 to produce an MP4 file.

    I later have problem when I try to concatenate these 01.mp4 ,02.mp4, 03.mp4 with the intro.mp4 using the command line

    ffmpeg -f concat   -i MyFileList.txt  -c copy  -y output.mp4

    The resulting output.mp4 video causes VLC player to crash right after it completes playing the intro segment.
    my xx.jpg files are 1600x1200 and my intro.mp4 is 1920x1080 24fps so perhaps there is an issue there as well.

    I am not able to make sense of the purple and yellow lines from ffmpeg output during the concat perhaps you can help interpret, the output is attached.

    Feel free to change any of the ffmpeg options for the production of my slideshow temp files 01.mp4, .02.mp4, 03.mp4 ... or during the concat operation, it’s been a lot of guess work on my part.

    BTW, the reason I am using concat is because I thought at first ffmpeg would be able to iterate on images 01,02...jpg and matching them up with there 01,02,....mp3 sound files but apparently that is not possible with some command line like this :)

    ffmpeg -i %02d.jpg -i %02d.mp3 .... output.mp4

    Thank you.

    ===== output from concat follows :

    ffmpeg version N-79000-g66edd86 Copyright (c) 2000-2016 the FFmpeg developers
     built with gcc 5.3.0 (GCC)
     configuration: --enable-gpl --enable-version3 --disable-w32threads --enable-avisynth --enable-bzlib --enable-fontconfig --enable-frei0r --enable-gnutls --enable-iconv --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libdcadec --enable-libfreetype --enable-libgme --enable-libgsm --enable-libilbc --enable-libmodplug --enable-libmfx --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --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. 19.100 / 55. 19.100
     libavcodec     57. 28.100 / 57. 28.100
     libavformat    57. 28.100 / 57. 28.100
     libavdevice    57.  0.101 / 57.  0.101
     libavfilter     6. 39.102 /  6. 39.102
     libswscale      4.  0.100 /  4.  0.100
     libswresample   2.  0.101 /  2.  0.101
     libpostproc    54.  0.100 / 54.  0.100
    [mov,mp4,m4a,3gp,3g2,mj2 @ 000000000044c960] Auto-inserting h264_mp4toannexb bitstream filter
    Input #0, concat, from 'mylist.txt':
     Duration: N/A, start: 0.000000, bitrate: 2996 kb/s
       Stream #0:0(eng): Video: h264 (Main) (avc1 / 0x31637661), yuv420p(tv), 1920x1080 [SAR 1:1 DAR 16:9], 2964 kb/s, 24 fps, 24 tbr, 24k tbn, 48 tbc
       Metadata:
         handler_name    : VideoHandler
       Stream #0:1(und): Audio: mp3 (mp4a / 0x6134706D), 44100 Hz, mono, s16p, 32 kb/s
       Metadata:
         handler_name    : SoundHandler
    Output #0, mp4, to 'output.mp4':
     Metadata:
       encoder         : Lavf57.28.100
       Stream #0:0(eng): Video: h264 ([33][0][0][0] / 0x0021), yuv420p, 1920x1080 [SAR 1:1 DAR 16:9], q=2-31, 2964 kb/s, 24 fps, 24 tbr, 24k tbn, 24k tbc
       Metadata:
         handler_name    : VideoHandler
       Stream #0:1(und): Audio: mp3 (i[0][0][0] / 0x0069), 44100 Hz, mono, 32 kb/s
       Metadata:
         handler_name    : SoundHandler
    Stream mapping:
     Stream #0:0 -> #0:0 (copy)
     Stream #0:1 -> #0:1 (copy)
    Press [q] to stop, [?] for help
    [mov,mp4,m4a,3gp,3g2,mj2 @ 00000000028558c0] Auto-inserting h264_mp4toannexb bitstream filter
    [mp4 @ 00000000004ad480] Non-monotonous DTS in output stream 0:0; previous: 235984, current: 120320; changing to 235985. This may result in incorrect timestamps in the output file.
    [mp4 @ 00000000004ad480] Non-monotonous DTS in output stream 0:0; previous: 235985, current: 120832; changing to 235986. This may result in incorrect timestamps in the output file.
    [mp4 @ 00000000004ad480] Non-monotonous DTS in output stream 0:0; previous: 235986, current: 121344; changing to 235987. This may result in incorrect timestamps in the output file.
    [mp4 @ 00000000004ad480] Non-monotonous DTS in output stream 0:0; previous: 235987, current: 121856; changing to 235988. This may result in incorrect timestamps in the output file.
    [mp4 @ 00000000004ad480] Non-monotonous DTS in output stream 0:0; previous: 235988, current: 122368; changing to 235989. This may result in incorrect timestamps in the output file.
    [mp4 @ 00000000004ad480] Non-monotonous DTS in output stream 0:0; previous: 235989, current: 122880; changing to 235990. This may result in incorrect timestamps in the output file.
    [mp4 @ 00000000004ad480] Non-monotonous DTS in output stream 0:0; previous: 235990, current: 123392; changing to 235991. This may result in incorrect timestamps in the output file.
    [mp4 @ 00000000004ad480] Non-monotonous DTS in output stream 0:0; previous: 235991, current: 123904; changing to 235992. This may result in incorrect timestamps in the output file.
    [mp4 @ 00000000004ad480] Non-monotonous DTS in output stream 0:0; previous: 235992, current: 124416; changing to 235993. This may result in incorrect timestamps in the output file.
    [mp4 @ 00000000004ad480] Non-monotonous DTS in output stream 0:0; previous: 235993, current: 124928; changing to 235994. This may result in incorrect timestamps in the output file.
    [mp4 @ 00000000004ad480] Non-monotonous DTS in output stream 0:0; previous: 235994, current: 125440; changing to 235995. This may result in incorrect timestamps in the output file.
    [mp4 @ 00000000004ad480] Non-monotonous DTS in output stream 0:0; previous: 235995, current: 125952; changing to 235996. This may result in incorrect timestamps in the output file.
    [mp4 @ 00000000004ad480] Non-monotonous DTS in output stream 0:0; previous: 235996, current: 126464; changing to 235997. This may result in incorrect timestamps in the output file.
    [mp4 @ 00000000004ad480] Non-monotonous DTS in output stream 0:0; previous: 235997, current: 126976; changing to 235998. This may result in incorrect timestamps in the output file.
    [mp4 @ 00000000004ad480] Non-monotonous DTS in output stream 0:0; previous: 235998, current: 127488; changing to 235999. This may result in incorrect timestamps in the output file.
    [mp4 @ 00000000004ad480] Non-monotonous DTS in output stream 0:0; previous: 235999, current: 128000; changing to 236000. This may result in incorrect timestamps in the output file.
    [mp4 @ 00000000004ad480] Non-monotonous DTS in output stream 0:0; previous: 236000, current: 128512; changing to 236001. This may result in incorrect timestamps in the output file.
    [mp4 @ 00000000004ad480] Non-monotonous DTS in output stream 0:0; previous: 236001, current: 129024; changing to 236002. This may result in incorrect timestamps in the output file.
    [mp4 @ 00000000004ad480] Non-monotonous DTS in output stream 0:0; previous: 236002, current: 129536; changing to 236003. This may result in incorrect timestamps in the output file.
    [mp4 @ 00000000004ad480] Non-monotonous DTS in output stream 0:0; previous: 236003, current: 130048; changing to 236004. This may result in incorrect timestamps in the output file.
    [mp4 @ 00000000004ad480] Non-monotonous DTS in output stream 0:0; previous: 236004, current: 130560; changing to 236005. This may result in incorrect timestamps in the output file.
    [mp4 @ 00000000004ad480] Non-monotonous DTS in output stream 0:0; previous: 236005, current: 131072; changing to 236006. This may result in incorrect timestamps in the output file.
    [mp4 @ 00000000004ad480] Non-monotonous DTS in output stream 0:0; previous: 236006, current: 131584; changing to 236007. This may result in incorrect timestamps in the output file.
    [mp4 @ 00000000004ad480] Non-monotonous DTS in output stream 0:0; previous: 236007, current: 132096; changing to 236008. This may result in incorrect timestamps in the output file.
    [mov,mp4,m4a,3gp,3g2,mj2 @ 00000000028558c0] Auto-inserting h264_mp4toannexb bitstream filter
    [mp4 @ 00000000004ad480] Non-monotonous DTS in output stream 0:0; previous: 236008, current: 132841; changing to 236009. This may result in incorrect timestamps in the output file.
    [mp4 @ 00000000004ad480] Non-monotonous DTS in output stream 0:0; previous: 236009, current: 133353; changing to 236010. This may result in incorrect timestamps in the output file.
    [mp4 @ 00000000004ad480] Non-monotonous DTS in output stream 0:0; previous: 236010, current: 133865; changing to 236011. This may result in incorrect timestamps in the output file.
    [mp4 @ 00000000004ad480] Non-monotonous DTS in output stream 0:0; previous: 236011, current: 134377; changing to 236012. This may result in incorrect timestamps in the output file.
    [mp4 @ 00000000004ad480] Non-monotonous DTS in output stream 0:0; previous: 236012, current: 134889; changing to 236013. This may result in incorrect timestamps in the output file.
    [mp4 @ 00000000004ad480] Non-monotonous DTS in output stream 0:0; previous: 236013, current: 135401; changing to 236014. This may result in incorrect timestamps in the output file.
    [mp4 @ 00000000004ad480] Non-monotonous DTS in output stream 0:0; previous: 236014, current: 135913; changing to 236015. This may result in incorrect timestamps in the output file.
    [mp4 @ 00000000004ad480] Non-monotonous DTS in output stream 0:0; previous: 236015, current: 136425; changing to 236016. This may result in incorrect timestamps in the output file.
    [mp4 @ 00000000004ad480] Non-monotonous DTS in output stream 0:0; previous: 236016, current: 136937; changing to 236017. This may result in incorrect timestamps in the output file.
    [mp4 @ 00000000004ad480] Non-monotonous DTS in output stream 0:0; previous: 236017, current: 137449; changing to 236018. This may result in incorrect timestamps in the output file.
    [mp4 @ 00000000004ad480] Non-monotonous DTS in output stream 0:0; previous: 236018, current: 137961; changing to 236019. This may result in incorrect timestamps in the output file.
    [mp4 @ 00000000004ad480] Non-monotonous DTS in output stream 0:0; previous: 236019, current: 138473; changing to 236020. This may result in incorrect timestamps in the output file.
    [mp4 @ 00000000004ad480] Non-monotonous DTS in output stream 0:0; previous: 236020, current: 138985; changing to 236021. This may result in incorrect timestamps in the output file.
    [mp4 @ 00000000004ad480] Non-monotonous DTS in output stream 0:0; previous: 236021, current: 139497; changing to 236022. This may result in incorrect timestamps in the output file.
    [mp4 @ 00000000004ad480] Non-monotonous DTS in output stream 0:0; previous: 236022, current: 140009; changing to 236023. This may result in incorrect timestamps in the output file.
    [mp4 @ 00000000004ad480] Non-monotonous DTS in output stream 0:0; previous: 236023, current: 140521; changing to 236024. This may result in incorrect timestamps in the output file.
    [mp4 @ 00000000004ad480] Non-monotonous DTS in output stream 0:0; previous: 236024, current: 141033; changing to 236025. This may result in incorrect timestamps in the output file.
    [mp4 @ 00000000004ad480] Non-monotonous DTS in output stream 0:0; previous: 236025, current: 141545; changing to 236026. This may result in incorrect timestamps in the output file.
    [mp4 @ 00000000004ad480] Non-monotonous DTS in output stream 0:0; previous: 236026, current: 142057; changing to 236027. This may result in incorrect timestamps in the output file.
    [mp4 @ 00000000004ad480] Non-monotonous DTS in output stream 0:0; previous: 236027, current: 142569; changing to 236028. This may result in incorrect timestamps in the output file.
    [mp4 @ 00000000004ad480] Non-monotonous DTS in output stream 0:0; previous: 236028, current: 143081; changing to 236029. This may result in incorrect timestamps in the output file.
    [mp4 @ 00000000004ad480] Non-monotonous DTS in output stream 0:0; previous: 236029, current: 143593; changing to 236030. This may result in incorrect timestamps in the output file.
    [mp4 @ 00000000004ad480] Non-monotonous DTS in output stream 0:0; previous: 236030, current: 144105; changing to 236031. This may result in incorrect timestamps in the output file.
    [mp4 @ 00000000004ad480] Non-monotonous DTS in output stream 0:0; previous: 236031, current: 144617; changing to 236032. This may result in incorrect timestamps in the output file.
    [mov,mp4,m4a,3gp,3g2,mj2 @ 00000000028558c0] Auto-inserting h264_mp4toannexb bitstream filter
    [mp4 @ 00000000004ad480] Non-monotonous DTS in output stream 0:0; previous: 236032, current: 145363; changing to 236033. This may result in incorrect timestamps in the output file.
    [mp4 @ 00000000004ad480] Non-monotonous DTS in output stream 0:0; previous: 236033, current: 145875; changing to 236034. This may result in incorrect timestamps in the output file.
    [mp4 @ 00000000004ad480] Non-monotonous DTS in output stream 0:0; previous: 236034, current: 146387; changing to 236035. This may result in incorrect timestamps in the output file.
    [mp4 @ 00000000004ad480] Non-monotonous DTS in output stream 0:0; previous: 236035, current: 146899; changing to 236036. This may result in incorrect timestamps in the output file.
    [mp4 @ 00000000004ad480] Non-monotonous DTS in output stream 0:0; previous: 236036, current: 147411; changing to 236037. This may result in incorrect timestamps in the output file.
    [mp4 @ 00000000004ad480] Non-monotonous DTS in output stream 0:0; previous: 236037, current: 147923; changing to 236038. This may result in incorrect timestamps in the output file.
    [mp4 @ 00000000004ad480] Non-monotonous DTS in output stream 0:0; previous: 236038, current: 148435; changing to 236039. This may result in incorrect timestamps in the output file.
    [mp4 @ 00000000004ad480] Non-monotonous DTS in output stream 0:0; previous: 236039, current: 148947; changing to 236040. This may result in incorrect timestamps in the output file.
    [mp4 @ 00000000004ad480] Non-monotonous DTS in output stream 0:0; previous: 236040, current: 149459; changing to 236041. This may result in incorrect timestamps in the output file.
    [mp4 @ 00000000004ad480] Non-monotonous DTS in output stream 0:0; previous: 236041, current: 149971; changing to 236042. This may result in incorrect timestamps in the output file.
    [mp4 @ 00000000004ad480] Non-monotonous DTS in output stream 0:0; previous: 236042, current: 150483; changing to 236043. This may result in incorrect timestamps in the output file.
    [mp4 @ 00000000004ad480] Non-monotonous DTS in output stream 0:0; previous: 236043, current: 150995; changing to 236044. This may result in incorrect timestamps in the output file.
    [mp4 @ 00000000004ad480] Non-monotonous DTS in output stream 0:0; previous: 236044, current: 151507; changing to 236045. This may result in incorrect timestamps in the output file.
    [mp4 @ 00000000004ad480] Non-monotonous DTS in output stream 0:0; previous: 236045, current: 152019; changing to 236046. This may result in incorrect timestamps in the output file.
    [mp4 @ 00000000004ad480] Non-monotonous DTS in output stream 0:0; previous: 236046, current: 152531; changing to 236047. This may result in incorrect timestamps in the output file.
    [mp4 @ 00000000004ad480] Non-monotonous DTS in output stream 0:0; previous: 236047, current: 153043; changing to 236048. This may result in incorrect timestamps in the output file.
    [mp4 @ 00000000004ad480] Non-monotonous DTS in output stream 0:0; previous: 236048, current: 153555; changing to 236049. This may result in incorrect timestamps in the output file.
    [mp4 @ 00000000004ad480] Non-monotonous DTS in output stream 0:0; previous: 236049, current: 154067; changing to 236050. This may result in incorrect timestamps in the output file.
    [mp4 @ 00000000004ad480] Non-monotonous DTS in output stream 0:0; previous: 236050, current: 154579; changing to 236051. This may result in incorrect timestamps in the output file.
    [mp4 @ 00000000004ad480] Non-monotonous DTS in output stream 0:0; previous: 236051, current: 155091; changing to 236052. This may result in incorrect timestamps in the output file.
    [mp4 @ 00000000004ad480] Non-monotonous DTS in output stream 0:0; previous: 236052, current: 155603; changing to 236053. This may result in incorrect timestamps in the output file.
    [mp4 @ 00000000004ad480] Non-monotonous DTS in output stream 0:0; previous: 236053, current: 156115; changing to 236054. This may result in incorrect timestamps in the output file.
    [mp4 @ 00000000004ad480] Non-monotonous DTS in output stream 0:0; previous: 236054, current: 156627; changing to 236055. This may result in incorrect timestamps in the output file.
    [mp4 @ 00000000004ad480] Non-monotonous DTS in output stream 0:0; previous: 236055, current: 157139; changing to 236056. This may result in incorrect timestamps in the output file.
    frame=  309 fps=0.0 q=-1.0 Lsize=    3986kB time=00:00:12.93 bitrate=2525.2kbits/s speed= 166x    
    video:3927kB audio:50kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.232265%

    ===== Here is the output from ffprobe on intro.mp4

    ffprobe version N-79000-g66edd86 Copyright (c) 2007-2016 the FFmpeg developers
     built with gcc 5.3.0 (GCC)
     configuration: --enable-gpl --enable-version3 --disable-w32threads --enable-avisynth --enable-bzlib --enable-fontconfig --enable-frei0r --enable-gnutls --enable-iconv --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libdcadec --enable-libfreetype --enable-libgme --enable-libgsm --enable-libilbc --enable-libmodplug --enable-libmfx --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --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. 19.100 / 55. 19.100
     libavcodec     57. 28.100 / 57. 28.100
     libavformat    57. 28.100 / 57. 28.100
     libavdevice    57.  0.101 / 57.  0.101
     libavfilter     6. 39.102 /  6. 39.102
     libswscale      4.  0.100 /  4.  0.100
     libswresample   2.  0.101 /  2.  0.101
     libpostproc    54.  0.100 / 54.  0.100
    Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'intro.mp4':
     Metadata:
       major_brand     : isom
       minor_version   : 512
       compatible_brands: isomiso2avc1mp41
       encoder         : Lavf57.28.100
     Duration: 00:00:09.88, start: 0.000000, bitrate: 3003 kb/s
       Stream #0:0(eng): Video: h264 (Main) (avc1 / 0x31637661), yuv420p(tv), 1920x1080 [SAR 1:1 DAR 16:9], 2964 kb/s, 24 fps, 24 tbr, 24k tbn, 48 tbc (default)
       Metadata:
         handler_name    : VideoHandler
       Stream #0:1(und): Audio: mp3 (mp4a / 0x6134706D), 44100 Hz, mono, s16p, 32 kb/s (default)
       Metadata:
         handler_name    : SoundHandler

    ===== Here is the output of ffprobe on one of intermediate clips here 01.mp4

    ffprobe version N-79000-g66edd86 Copyright (c) 2007-2016 the FFmpeg developers
     built with gcc 5.3.0 (GCC)
     configuration: --enable-gpl --enable-version3 --disable-w32threads --enable-avisynth --enable-bzlib --enable-fontconfig --enable-frei0r --enable-gnutls --enable-iconv --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libdcadec --enable-libfreetype --enable-libgme --enable-libgsm --enable-libilbc --enable-libmodplug --enable-libmfx --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --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. 19.100 / 55. 19.100
     libavcodec     57. 28.100 / 57. 28.100
     libavformat    57. 28.100 / 57. 28.100
     libavdevice    57.  0.101 / 57.  0.101
     libavfilter     6. 39.102 /  6. 39.102
     libswscale      4.  0.100 /  4.  0.100
     libswresample   2.  0.101 /  2.  0.101
     libpostproc    54.  0.100 / 54.  0.100
    Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '01.mp4':
     Metadata:
       major_brand     : isom
       minor_version   : 512
       compatible_brands: isomiso2avc1mp41
       encoder         : Lavf57.28.100
     Duration: 00:00:01.02, start: 0.000000, bitrate: 1036 kb/s
       Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuvj420p(pc), 1920x1080 [SAR 1:1 DAR 16:9], 1006 kb/s, 24 fps, 24 tbr, 12288 tbn, 48 tbc (default)
       Metadata:
         handler_name    : VideoHandler
       Stream #0:1(und): Audio: mp3 (mp4a / 0x6134706D), 44100 Hz, mono, s16p, 31 kb/s (default)
       Metadata:
         handler_name    : SoundHandler

    ===== ffmpeg output when generating 01.mp4 when using the following suggested fix :

    ffmpeg -loop 1 -i 01.jpg -i 01.mp3 -c:v libx264 -profile:v main -pix_fmt yuv420p -r 24 -video_track_timescale 24000 -c:a copy -shortest -y 01.mp4

    ffmpeg version N-79000-g66edd86 Copyright (c) 2000-2016 the FFmpeg developers
     built with gcc 5.3.0 (GCC)
     configuration: --enable-gpl --enable-version3 --disable-w32threads --enable-avisynth --enable-bzlib --enable-fontconfig --enable-frei0r --enable-gnutls --enable-iconv --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libdcadec --enable-libfreetype --enable-libgme --enable-libgsm --enable-libilbc --enable-libmodplug --enable-libmfx --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --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. 19.100 / 55. 19.100
     libavcodec     57. 28.100 / 57. 28.100
     libavformat    57. 28.100 / 57. 28.100
     libavdevice    57.  0.101 / 57.  0.101
     libavfilter     6. 39.102 /  6. 39.102
     libswscale      4.  0.100 /  4.  0.100
     libswresample   2.  0.101 /  2.  0.101
     libpostproc    54.  0.100 / 54.  0.100
    Input #0, image2, from 'S:\_W\ARP_WEB\RC\KIDS\QURAN\AAYAAT - Allah\01 AlKursi\BMP\01.JPG':
     Duration: 00:00:00.04, start: 0.000000, bitrate: 25065 kb/s
       Stream #0:0: Video: mjpeg, yuvj420p(pc, bt470bg/unknown/unknown), 1920x1080 [SAR 96:96 DAR 16:9], 25 fps, 25 tbr, 25 tbn, 25 tbc
    [mp3 @ 00000000005d03a0] Estimating duration from bitrate, this may be inaccurate
    Input #1, mp3, from 'S:\_W\ARP_WEB\RC\KIDS\QURAN\AAYAAT - Allah\01 AlKursi\SND\01.MP3':
     Duration: 00:00:09.85, start: 0.000000, bitrate: 32 kb/s
       Stream #1:0: Audio: mp3, 44100 Hz, mono, s16p, 32 kb/s
    [swscaler @ 0000000002b30c40] deprecated pixel format used, make sure you did set range correctly
    [libx264 @ 00000000005ba520] using SAR=1/1
    [libx264 @ 00000000005ba520] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2
    [libx264 @ 00000000005ba520] profile Main, level 4.0
    [libx264 @ 00000000005ba520] 264 - core 148 r2665 a01e339 - H.264/MPEG-4 AVC codec - Copyleft 2003-2016 - 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=12 lookahead_threads=2 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=250 keyint_min=24 scenecut=40 intra_refresh=0 rc_lookahead=40 rc=crf mbtree=1 crf=23.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 ip_ratio=1.40 aq=1:1.00
    Output #0, mp4, to 'S:\_VIDS_PRODUCTIONS\20110219 MUMTI CLIPS\20160311 Epic Quran Recitations\01.MP4':
     Metadata:
       encoder         : Lavf57.28.100
       Stream #0:0: Video: h264 (libx264) ([33][0][0][0] / 0x0021), yuv420p, 1920x1080 [SAR 1:1 DAR 16:9], q=-1--1, 24 fps, 24k tbn, 24 tbc
       Metadata:
         encoder         : Lavc57.28.100 libx264
       Side data:
         cpb: bitrate max/min/avg: 0/0/0 buffer size: 0 vbv_delay: -1
       Stream #0:1: Audio: mp3 (i[0][0][0] / 0x0069), 44100 Hz, mono, 32 kb/s
    Stream mapping:
     Stream #0:0 -> #0:0 (mjpeg (native) -> h264 (libx264))
     Stream #1:0 -> #0:1 (copy)
    Press [q] to stop, [?] for help
    Past duration 0.639992 too large
    Past duration 0.679985 too large
    Past duration 0.719994 too large
    Past duration 0.759987 too large
    Past duration 0.799995 too large
    Past duration 0.839989 too large
    Past duration 0.879997 too large
    Past duration 0.919991 too large
    Past duration 0.959999 too large
    Past duration 0.999992 too large
    frame=   43 fps=0.0 q=0.0 size=       0kB time=00:00:00.00 bitrate=N/A speed=   0x    
    frame=   71 fps= 70 q=28.0 size=     133kB time=00:00:00.54 bitrate=2016.1kbits/s dup=0 drop=1 speed=0.533x    
    frame=  104 fps= 68 q=28.0 size=     144kB time=00:00:01.91 bitrate= 615.3kbits/s dup=0 drop=3 speed=1.26x    
    frame=  137 fps= 67 q=28.0 size=     154kB time=00:00:03.29 bitrate= 384.3kbits/s dup=0 drop=4 speed=1.61x    
    frame=  170 fps= 67 q=28.0 size=     165kB time=00:00:04.67 bitrate= 289.4kbits/s dup=0 drop=5 speed=1.84x    
    frame=  203 fps= 66 q=28.0 size=     176kB time=00:00:06.04 bitrate= 238.2kbits/s dup=0 drop=7 speed=1.98x    
    frame=  236 fps= 66 q=28.0 size=     186kB time=00:00:07.41 bitrate= 205.6kbits/s dup=0 drop=8 speed=2.08x    
    frame=  269 fps= 66 q=28.0 size=     197kB time=00:00:08.79 bitrate= 183.3kbits/s dup=0 drop=9 speed=2.16x    
    frame=  295 fps= 60 q=28.0 Lsize=     215kB time=00:00:09.87 bitrate= 178.2kbits/s dup=0 drop=11 speed=2.02x    
    video:167kB audio:38kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 4.696121%
    [libx264 @ 00000000005ba520] frame I:2     Avg QP:11.38  size:144156
    [libx264 @ 00000000005ba520] frame P:74    Avg QP:15.03  size:   194
    [libx264 @ 00000000005ba520] frame B:219   Avg QP:24.20  size:   151
    [libx264 @ 00000000005ba520] consecutive B-frames:  1.0%  0.0%  0.0% 99.0%
    [libx264 @ 00000000005ba520] mb I  I16..4: 58.4%  0.0% 41.6%
    [libx264 @ 00000000005ba520] mb P  I16..4:  0.0%  0.0%  0.0%  P16..4:  0.7%  0.0%  0.0%  0.0%  0.0%    skip:99.3%
    [libx264 @ 00000000005ba520] mb B  I16..4:  0.0%  0.0%  0.0%  B16..8:  1.1%  0.0%  0.0%  direct: 0.0%  skip:98.9%  L0:27.6% L1:72.4% BI: 0.0%
    [libx264 @ 00000000005ba520] coded y,uvDC,uvAC intra: 31.2% 32.8% 29.4% inter: 0.0% 0.1% 0.0%
    [libx264 @ 00000000005ba520] i16 v,h,dc,p: 75% 18%  5%  2%
    [libx264 @ 00000000005ba520] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 34% 25% 18%  4%  4%  4%  4%  4%  5%
    [libx264 @ 00000000005ba520] i8c dc,h,v,p: 68% 15% 13%  4%
    [libx264 @ 00000000005ba520] Weighted P-Frames: Y:0.0% UV:0.0%
    [libx264 @ 00000000005ba520] ref P L0: 99.3%  0.2%  0.3%  0.2%
    [libx264 @ 00000000005ba520] ref B L0: 96.4%  3.5%  0.1%
    [libx264 @ 00000000005ba520] ref B L1: 99.3%  0.7%
    [libx264 @ 00000000005ba520] kb/s:218.52