Recherche avancée

Médias (0)

Mot : - Tags -/protocoles

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

Autres articles (57)

  • MediaSPIP v0.2

    21 juin 2013, par

    MediaSPIP 0.2 est la première version de MediaSPIP stable.
    Sa date de sortie officielle est le 21 juin 2013 et est annoncée ici.
    Le fichier zip ici présent contient uniquement les sources de MediaSPIP en version standalone.
    Comme pour la version précédente, il est nécessaire d’installer manuellement l’ensemble des dépendances logicielles sur le serveur.
    Si vous souhaitez utiliser cette archive pour une installation en mode ferme, il vous faudra également procéder à d’autres modifications (...)

  • Mise à disposition des fichiers

    14 avril 2011, par

    Par défaut, lors de son initialisation, MediaSPIP ne permet pas aux visiteurs de télécharger les fichiers qu’ils soient originaux ou le résultat de leur transformation ou encodage. Il permet uniquement de les visualiser.
    Cependant, il est possible et facile d’autoriser les visiteurs à avoir accès à ces documents et ce sous différentes formes.
    Tout cela se passe dans la page de configuration du squelette. Il vous faut aller dans l’espace d’administration du canal, et choisir dans la navigation (...)

  • MediaSPIP version 0.1 Beta

    16 avril 2011, par

    MediaSPIP 0.1 beta est la première version de MediaSPIP décrétée comme "utilisable".
    Le fichier zip ici présent contient uniquement les sources de MediaSPIP en version standalone.
    Pour avoir une installation fonctionnelle, il est nécessaire d’installer manuellement l’ensemble des dépendances logicielles sur le serveur.
    Si vous souhaitez utiliser cette archive pour une installation en mode ferme, il vous faudra également procéder à d’autres modifications (...)

Sur d’autres sites (7913)

  • ffmpeg - splitting, overlaying and selecting frame range in multiple input/outputs with complex video filter producing empty output

    11 octobre 2017, par Josep Carner

    I am trying to use ffmpeg to apply multiple filters -single input, multiple outputs-. In concrete, I am splitting the output in two, then applying an overlaying patch to one of those streams, split again and select a time range. The command I am using is :

      ffmpeg \
       -i ./dataset_test/videos/jz_10_huron_barstow.mkv \
       -an \
       -sn \
       -loglevel error \
       -filter_complex \
           "[0:v]split=2[L_in][F_in];
            [L_in]
               crop=226:307:21:74,scale=200x200,setdar=200:200,split=2\
            [L_in_0][L_in_1];\
            color=#808080:226x307,setpts=PTS-STARTPTS[L_PATCH];\
            [F_in][L_PATCH]
               overlay=21:74:shortest=1,scale=200x200,setdar=200:200,split=2\
            [F_in_0][F_in_1];\
            [F_in_0]select='between(t\,32\,212)',select='not(mod(n\,20))',setpts=(PTS-STARTPTS)/20[F_0];\
            [F_in_1]select='between(t\,213\,393)',select='not(mod(n\,20))',setpts=(PTS-STARTPTS)/20[F_1];\
            [L_in_0]select='between(t\,32\,212)',select='not(mod(n\,20))',setpts=(PTS-STARTPTS)/20[L_0];\
            [L_in_1]select='between(t\,213\,393)',select='not(mod(n\,20))',setpts=(PTS-STARTPTS)/20[L_1]\
            "\
       -map [F_0] -an -sn ./out/jz_10_huron_barstow/F/0_F.mp4\
       -map [F_1] -an -sn ./out/jz_10_huron_barstow/F/1_F.mp4\
       -map [L_0] -an -sn ./out/jz_10_huron_barstow/L/0_L.mp4\
       -map [L_1] -an -sn ./out/jz_10_huron_barstow/L/1_L.mp4\

    For some reason, 0_F.mp4 is empty and 1_F.mp4 is cropped. My intuition is that it has something to do with applying splitting + overlaying + selecting. I think at some point some filter before select is changing the PTS of the frames in some way select is not properly discarding them, but I honestly don’t know how to solve it. Some insights :

    1. L_0 and L_1 are fine (no overlay is used in those two)

    2. If I suppress L outputs everything works fine (no "split" is needed at the beginning)

    Could someone provide some light ? I don’t really know what else to try.
    The logs with loglevel 40 are (some repeated lines ommited) :

    ffmpeg version 2.8.1 Copyright (c) 2000-2015 the FFmpeg developers
     built with Apple LLVM version 9.0.0 (clang-900.0.37)
     configuration: --prefix=/usr/local/Cellar/ffmpeg/2.8.1_1 --enable-shared --enable-pthreads --enable-gpl --enable-version3 --enable-hardcoded-tables --enable-avresample --cc=clang --host-cflags= --host-ldflags= --enable-opencl --enable-libx264 --enable-libmp3lame --enable-libvo-aacenc --enable-libxvid --enable-vda
     libavutil      54. 31.100 / 54. 31.100
     libavcodec     56. 60.100 / 56. 60.100
     libavformat    56. 40.101 / 56. 40.101
     libavdevice    56.  4.100 / 56.  4.100
     libavfilter     5. 40.101 /  5. 40.101
     libavresample   2.  1.  0 /  2.  1.  0
     libswscale      3.  1.101 /  3.  1.101
     libswresample   1.  2.101 /  1.  2.101
     libpostproc    53.  3.100 / 53.  3.100
    Input #0, matroska,webm, from './dataset_test/videos/jz_10_huron_barstow.mkv':
     Metadata:
       ENCODER         : Lavf57.66.104
     Duration: 00:24:04.14, start: 0.000000, bitrate: 2117 kb/s
       Stream #0:0: Video: h264 (Main), 1 reference frame, yuv420p, 1440x900 (1440x912) [SAR 1:1 DAR 8:5], 30 fps, 30 tbr, 1k tbn, 60 tbc (default)
       Metadata:
         ENCODER         : Lavc57.83.100 h264_nvenc
         DURATION        : 00:24:04.102000000
       Stream #0:1: Audio: ac3, 48000 Hz, stereo, fltp, 192 kb/s (default)
       Metadata:
         ENCODER         : Lavc57.83.100 ac3
         DURATION        : 00:24:04.135000000
    [Parsed_scale_2 @ 0x7fdfd2403d20] w:200 h:200 flags:'bilinear' interl:0
    [Parsed_setdar_3 @ 0x7fdfd240ad80] num:den syntax is deprecated, please use num/den or named options instead
    [Parsed_color_5 @ 0x7fdfd24096a0] size:226x307 rate:25/1 duration:-1.000000 sar:1/1
    [Parsed_scale_8 @ 0x7fdfd24092c0] w:200 h:200 flags:'bilinear' interl:0
    [Parsed_setdar_9 @ 0x7fdfd240b360] num:den syntax is deprecated, please use num/den or named options instead
    [Parsed_scale_2 @ 0x7fdfd2509b00] w:200 h:200 flags:'bilinear' interl:0
    [Parsed_setdar_3 @ 0x7fdfd25092c0] num:den syntax is deprecated, please use num/den or named options instead
    [Parsed_color_5 @ 0x7fdfd250a520] size:226x307 rate:25/1 duration:-1.000000 sar:1/1
    [Parsed_scale_8 @ 0x7fdfd250b620] w:200 h:200 flags:'bilinear' interl:0
    [Parsed_setdar_9 @ 0x7fdfd250a960] num:den syntax is deprecated, please use num/den or named options instead
    [graph 0 input from stream 0:0 @ 0x7fdfd2511360] w:1440 h:900 pixfmt:yuv420p tb:1/1000 fr:30/1 sar:1/1 sws_param:flags=2
    [Parsed_crop_1 @ 0x7fdfd2509c80] w:1440 h:900 sar:1/1 -> w:226 h:306 sar:1/1
    [Parsed_scale_2 @ 0x7fdfd2509b00] w:226 h:306 fmt:yuv420p sar:1/1 -> w:200 h:200 fmt:yuv420p sar:113/153 flags:0x2
    [Parsed_setdar_3 @ 0x7fdfd25092c0] w:200 h:200 dar:113/153 sar:113/153 -> dar:1/1 sar:1/1
    [Parsed_select_21 @ 0x7fdfd250a760] TB:0.001000 FRAME_RATE:30.000000 SAMPLE_RATE:nan
    [Parsed_select_18 @ 0x7fdfd250a080] TB:0.001000 FRAME_RATE:30.000000 SAMPLE_RATE:nan
    [Parsed_color_5 @ 0x7fdfd250a520] TB:0.040000 FRAME_RATE:25.000000 SAMPLE_RATE:nan
    [Parsed_overlay_7 @ 0x7fdfd250b020] main w:1440 h:900 fmt:yuv420p overlay w:226 h:306 fmt:yuva420p eof_action:endall
    [Parsed_overlay_7 @ 0x7fdfd250b020] [framesync @ 0x7fdfd250b708] Selected 1/1000 time base
    [Parsed_overlay_7 @ 0x7fdfd250b020] [framesync @ 0x7fdfd250b708] Sync level 2
    [Parsed_scale_8 @ 0x7fdfd250b620] w:1440 h:900 fmt:yuv420p sar:1/1 -> w:200 h:200 fmt:yuv420p sar:8/5 flags:0x2
    [Parsed_setdar_9 @ 0x7fdfd250a960] w:200 h:200 dar:8/5 sar:8/5 -> dar:1/1 sar:1/1
    [Parsed_select_15 @ 0x7fdfd250dd00] TB:0.001000 FRAME_RATE:30.000000 SAMPLE_RATE:nan
    [Parsed_select_12 @ 0x7fdfd250ca60] TB:0.001000 FRAME_RATE:30.000000 SAMPLE_RATE:nan
    [libx264 @ 0x7fdfd4005e00] using SAR=1/1
    [libx264 @ 0x7fdfd4005e00] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX FMA3 AVX2 LZCNT BMI2
    [libx264 @ 0x7fdfd4005e00] profile High, level 1.2
    [libx264 @ 0x7fdfd4005e00] 264 - core 148 r2601 a0cd7d3 - 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=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=0 qpmax=69 qpstep=4 ip_ratio=1.40 aq=1:1.00
    [libx264 @ 0x7fdfd400f600] using SAR=1/1
    [libx264 @ 0x7fdfd400f600] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX FMA3 AVX2 LZCNT BMI2
    [libx264 @ 0x7fdfd400f600] profile High, level 1.2
    [libx264 @ 0x7fdfd400f600] 264 - core 148 r2601 a0cd7d3 - 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=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=0 qpmax=69 qpstep=4 ip_ratio=1.40 aq=1:1.00
    [libx264 @ 0x7fdfd4018e00] using SAR=1/1
    [libx264 @ 0x7fdfd4018e00] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX FMA3 AVX2 LZCNT BMI2
    [libx264 @ 0x7fdfd4018e00] profile High, level 1.2
    [libx264 @ 0x7fdfd4018e00] 264 - core 148 r2601 a0cd7d3 - 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=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=0 qpmax=69 qpstep=4 ip_ratio=1.40 aq=1:1.00
    [libx264 @ 0x7fdfd4022600] using SAR=1/1
    [libx264 @ 0x7fdfd4022600] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX FMA3 AVX2 LZCNT BMI2
    [libx264 @ 0x7fdfd4022600] profile High, level 1.2
    [libx264 @ 0x7fdfd4022600] 264 - core 148 r2601 a0cd7d3 - 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=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=0 qpmax=69 qpstep=4 ip_ratio=1.40 aq=1:1.00
    Output #0, mp4, to './out/jz_10_huron_barstow/F/0_F.mp4':
     Metadata:
       encoder         : Lavf56.40.101
       Stream #0:0: Video: h264 (libx264), -1 reference frame ([33][0][0][0] / 0x0021), yuv420p, 200x200 [SAR 1:1 DAR 1:1], q=-1--1, 30 fps, 15360 tbn, 30 tbc (default)
       Metadata:
         encoder         : Lavc56.60.100 libx264
    Output #1, mp4, to './out/jz_10_huron_barstow/F/1_F.mp4':
     Metadata:
       encoder         : Lavf56.40.101
       Stream #1:0: Video: h264 (libx264), -1 reference frame ([33][0][0][0] / 0x0021), yuv420p, 200x200 [SAR 1:1 DAR 1:1], q=-1--1, 30 fps, 15360 tbn, 30 tbc (default)
       Metadata:
         encoder         : Lavc56.60.100 libx264
    Output #2, mp4, to './out/jz_10_huron_barstow/L/0_L.mp4':
     Metadata:
       encoder         : Lavf56.40.101
       Stream #2:0: Video: h264 (libx264), -1 reference frame ([33][0][0][0] / 0x0021), yuv420p, 200x200 [SAR 1:1 DAR 1:1], q=-1--1, 30 fps, 15360 tbn, 30 tbc (default)
       Metadata:
         encoder         : Lavc56.60.100 libx264
    Output #3, mp4, to './out/jz_10_huron_barstow/L/1_L.mp4':
     Metadata:
       encoder         : Lavf56.40.101
       Stream #3:0: Video: h264 (libx264), -1 reference frame ([33][0][0][0] / 0x0021), yuv420p, 200x200 [SAR 1:1 DAR 1:1], q=-1--1, 30 fps, 15360 tbn, 30 tbc (default)
       Metadata:
         encoder         : Lavc56.60.100 libx264
    Stream mapping:
     Stream #0:0 (h264) -> split
     setpts -> Stream #0:0 (libx264)
     setpts -> Stream #1:0 (libx264)
     setpts -> Stream #2:0 (libx264)
     setpts -> Stream #3:0 (libx264)
    Press [q] to stop, [?] for help
    [swscaler @ 0x7fdfd3800000] Warning: data is not aligned! This can lead to a speedloss
    [Parsed_overlay_7 @ 0x7fdfd250b020] [framesync @ 0x7fdfd250b708] Buffer queue overflow, dropping.
       Last message repeated 210 times
    frame=    0 fps=0.0 q=0.0 q=0.0 q=0.0 q=0.0 size=       0kB time=00:00:00.00 bitrate=N/A    
    [Parsed_overlay_7 @ 0x7fdfd250b020] [framesync @ 0x7fdfd250b708] Buffer queue overflow, dropping.
       Last message repeated 262 times
    frame=    0 fps=0.0 q=0.0 q=0.0 q=0.0 q=0.0 size=       0kB time=00:00:00.00 bitrate=N/A    
    [Parsed_overlay_7 @ 0x7fdfd250b020] [framesync @ 0x7fdfd250b708] Buffer queue overflow, dropping.
       Last message repeated 239 times
    frame=    0 fps=0.0 q=0.0 q=0.0 q=0.0 q=0.0 size=       0kB time=00:00:00.00 bitrate=N/A    
    [Parsed_overlay_7 @ 0x7fdfd250b020] [framesync @ 0x7fdfd250b708] Buffer queue overflow, dropping.
       Last message repeated 195 times
    frame=    0 fps=0.0 q=0.0 q=0.0 q=0.0 q=0.0 size=       0kB time=00:00:00.00 bitrate=N/A    
    [Parsed_overlay_7 @ 0x7fdfd250b020] [framesync @ 0x7fdfd250b708] Buffer queue overflow, dropping.
       Last message repeated 211 times
    frame=    0 fps=0.0 q=0.0 q=0.0 q=0.0 q=0.0 size=       0kB time=00:00:00.00 bitrate=N/A    
    [Parsed_overlay_7 @ 0x7fdfd250b020] [framesync @ 0x7fdfd250b708] Buffer queue overflow, dropping.
       Last message repeated 255 times
    frame=    0 fps=0.0 q=0.0 q=0.0 q=0.0 q=0.0 size=       0kB time=00:00:00.00 bitrate=N/A    
    [Parsed_overlay_7 @ 0x7fdfd250b020] [framesync @ 0x7fdfd250b708] Buffer queue overflow, dropping.
       Last message repeated 148 times
    frame=    0 fps=0.0 q=0.0 q=0.0 q=0.0 q=0.0 size=       0kB time=00:00:00.00 bitrate=N/A    
    [Parsed_overlay_7 @ 0x7fdfd250b020] [framesync @ 0x7fdfd250b708] Buffer queue overflow, dropping.
       Last message repeated 174 times
    frame=    0 fps=0.0 q=0.0 q=0.0 q=0.0 q=0.0 size=       0kB time=00:00:00.00 bitrate=N/A    
    [Parsed_overlay_7 @ 0x7fdfd250b020] [framesync @ 0x7fdfd250b708] Buffer queue overflow, dropping.
       Last message repeated 182 times
    frame=    0 fps=0.0 q=0.0 q=0.0 q=0.0 q=0.0 size=       0kB time=00:00:00.00 bitrate=N/A    
    [Parsed_overlay_7 @ 0x7fdfd250b020] [framesync @ 0x7fdfd250b708] Buffer queue overflow, dropping.
       Last message repeated 193 times
    frame=    0 fps=0.0 q=0.0 q=0.0 q=29.0 q=0.0 size=       0kB time=00:00:00.26 bitrate=   1.4kbits/s    
    [Parsed_overlay_7 @ 0x7fdfd250b020] [framesync @ 0x7fdfd250b708] Buffer queue overflow, dropping.
       Last message repeated 156 times
    frame=    0 fps=0.0 q=0.0 q=0.0 q=29.0 q=0.0 size=       0kB time=00:00:00.53 bitrate=   0.7kbits/s    
    [Parsed_overlay_7 @ 0x7fdfd250b020] [framesync @ 0x7fdfd250b708] Buffer queue overflow, dropping.
       Last message repeated 154 times
    frame=    0 fps=0.0 q=0.0 q=0.0 q=29.0 q=0.0 size=       0kB time=00:00:00.76 bitrate=   0.5kbits/s    
    [Parsed_overlay_7 @ 0x7fdfd250b020] [framesync @ 0x7fdfd250b708] Buffer queue overflow, dropping.
       Last message repeated 155 times
    frame=    0 fps=0.0 q=0.0 q=0.0 q=29.0 q=0.0 size=       0kB time=00:00:01.03 bitrate=   0.4kbits/s    
    [Parsed_overlay_7 @ 0x7fdfd250b020] [framesync @ 0x7fdfd250b708] Buffer queue overflow, dropping.
       Last message repeated 231 times
    frame=    0 fps=0.0 q=0.0 q=0.0 q=29.0 q=0.0 size=       0kB time=00:00:01.43 bitrate=   0.3kbits/s    
    [Parsed_overlay_7 @ 0x7fdfd250b020] [framesync @ 0x7fdfd250b708] Buffer queue overflow, dropping.
       Last message repeated 260 times
    frame=    0 fps=0.0 q=0.0 q=0.0 q=29.0 q=0.0 size=       0kB time=00:00:01.86 bitrate=   0.2kbits/s    
    [Parsed_overlay_7 @ 0x7fdfd250b020] [framesync @ 0x7fdfd250b708] Buffer queue overflow, dropping.
       Last message repeated 256 times
    frame=    0 fps=0.0 q=0.0 q=0.0 q=29.0 q=0.0 size=       0kB time=00:00:02.30 bitrate=   0.2kbits/s    
    [Parsed_overlay_7 @ 0x7fdfd250b020] [framesync @ 0x7fdfd250b708] Buffer queue overflow, dropping.
       Last message repeated 209 times
    frame=    0 fps=0.0 q=0.0 q=0.0 q=29.0 q=0.0 size=       0kB time=00:00:02.63 bitrate=   0.1kbits/s    
    [Parsed_overlay_7 @ 0x7fdfd250b020] [framesync @ 0x7fdfd250b708] Buffer queue overflow, dropping.
       Last message repeated 253 times
    frame=    0 fps=0.0 q=0.0 q=0.0 q=29.0 q=0.0 size=       0kB time=00:00:03.06 bitrate=   0.1kbits/s    
    [Parsed_overlay_7 @ 0x7fdfd250b020] [framesync @ 0x7fdfd250b708] Buffer queue overflow, dropping.
       Last message repeated 160 times
    frame=    0 fps=0.0 q=0.0 q=0.0 q=29.0 q=0.0 size=       0kB time=00:00:03.33 bitrate=   0.1kbits/s    
    [Parsed_overlay_7 @ 0x7fdfd250b020] [framesync @ 0x7fdfd250b708] Buffer queue overflow, dropping.
       Last message repeated 189 times
    frame=    0 fps=0.0 q=0.0 q=0.0 q=29.0 q=0.0 size=       0kB time=00:00:03.63 bitrate=   0.1kbits/s    
    [Parsed_overlay_7 @ 0x7fdfd250b020] [framesync @ 0x7fdfd250b708] Buffer queue overflow, dropping.
       Last message repeated 201 times
    frame=    0 fps=0.0 q=0.0 q=0.0 q=29.0 q=0.0 size=       0kB time=00:00:03.96 bitrate=   0.1kbits/s    
    [Parsed_overlay_7 @ 0x7fdfd250b020] [framesync @ 0x7fdfd250b708] Buffer queue overflow, dropping.
       Last message repeated 251 times
    frame=    0 fps=0.0 q=0.0 q=0.0 q=29.0 q=0.0 size=       0kB time=00:00:04.40 bitrate=   0.1kbits/s    
    [Parsed_overlay_7 @ 0x7fdfd250b020] [framesync @ 0x7fdfd250b708] Buffer queue overflow, dropping.
       Last message repeated 246 times
    frame=    0 fps=0.0 q=0.0 q=0.0 q=29.0 q=0.0 size=       0kB time=00:00:04.80 bitrate=   0.1kbits/s    
    [Parsed_overlay_7 @ 0x7fdfd250b020] [framesync @ 0x7fdfd250b708] Buffer queue overflow, dropping.
       Last message repeated 257 times
    frame=    0 fps=0.0 q=0.0 q=0.0 q=29.0 q=0.0 size=       0kB time=00:00:05.23 bitrate=   0.1kbits/s    
    [Parsed_overlay_7 @ 0x7fdfd250b020] [framesync @ 0x7fdfd250b708] Buffer queue overflow, dropping.
       Last message repeated 258 times
    frame=    0 fps=0.0 q=0.0 q=0.0 q=29.0 q=0.0 size=       0kB time=00:00:05.66 bitrate=   0.1kbits/s    
    [Parsed_overlay_7 @ 0x7fdfd250b020] [framesync @ 0x7fdfd250b708] Buffer queue overflow, dropping.
       Last message repeated 251 times
    frame=    0 fps=0.0 q=0.0 q=0.0 q=29.0 q=0.0 size=       0kB time=00:00:06.10 bitrate=   0.1kbits/s    
    [Parsed_overlay_7 @ 0x7fdfd250b020] [framesync @ 0x7fdfd250b708] Buffer queue overflow, dropping.
       Last message repeated 274 times
    frame=    0 fps=0.0 q=0.0 q=0.0 q=29.0 q=0.0 size=       0kB time=00:00:06.56 bitrate=   0.1kbits/s    
    [Parsed_overlay_7 @ 0x7fdfd250b020] [framesync @ 0x7fdfd250b708] Buffer queue overflow, dropping.
       Last message repeated 282 times
    frame=    0 fps=0.0 q=0.0 q=0.0 q=29.0 q=0.0 size=       0kB time=00:00:07.03 bitrate=   0.1kbits/s    
    [Parsed_overlay_7 @ 0x7fdfd250b020] [framesync @ 0x7fdfd250b708] Buffer queue overflow, dropping.
       Last message repeated 185 times
    frame=    0 fps=0.0 q=0.0 q=0.0 q=29.0 q=0.0 size=       0kB time=00:00:07.26 bitrate=   0.1kbits/s    
    frame=    0 fps=0.0 q=0.0 q=0.0 q=29.0 q=0.0 size=       0kB time=00:00:07.26 bitrate=   0.1kbits/s    
    frame=    0 fps=0.0 q=0.0 q=0.0 q=29.0 q=0.0 size=       0kB time=00:00:07.26 bitrate=   0.1kbits/s    
    frame=    0 fps=0.0 q=0.0 q=0.0 q=29.0 q=0.0 size=       0kB time=00:00:07.26 bitrate=   0.1kbits/s    
    frame=    0 fps=0.0 q=0.0 q=0.0 q=29.0 q=0.0 size=       0kB time=00:00:07.26 bitrate=   0.1kbits/s    
    frame=    0 fps=0.0 q=0.0 q=0.0 q=29.0 q=0.0 size=       0kB time=00:00:07.26 bitrate=   0.1kbits/s    
    frame=    0 fps=0.0 q=0.0 q=29.0 q=29.0 q=29.0 size=       0kB time=00:00:07.26 bitrate=   0.1kbits/s    
    frame=    0 fps=0.0 q=0.0 q=29.0 q=29.0 q=29.0 size=       0kB time=00:00:07.26 bitrate=   0.1kbits/s    
    frame=    0 fps=0.0 q=0.0 q=29.0 q=29.0 q=29.0 size=       0kB time=00:00:07.26 bitrate=   0.1kbits/s    
    frame=    0 fps=0.0 q=0.0 q=29.0 q=29.0 q=29.0 size=       0kB time=00:00:07.26 bitrate=   0.1kbits/s    
    frame=    0 fps=0.0 q=0.0 q=29.0 q=29.0 q=29.0 size=       0kB time=00:00:07.26 bitrate=   0.1kbits/s    
    […]  
    frame=    0 fps=0.0 q=0.0 q=29.0 q=29.0 q=29.0 size=       0kB time=00:00:07.26 bitrate=   0.1kbits/s    
    [Parsed_overlay_7 @ 0x7fdfd250b020] [framesync @ 0x7fdfd250b708] Sync level 1
    No more output streams to write to, finishing.
    frame=    0 fps=0.0 q=0.0 Lq=-1.0 q=-1.0 q=-1.0 size=       0kB time=00:00:08.93 bitrate=   0.2kbits/s    
    video:620kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: unknown
    Input file #0 (./dataset_test/videos/jz_10_huron_barstow.mkv):
     Input stream #0:0 (video): 43323 packets read (347030822 bytes); 43323 frames decoded;
     Input stream #0:1 (audio): 4 packets read (3072 bytes);
     Total: 43327 packets (347033894 bytes) demuxed
    Output file #0 (./out/jz_10_huron_barstow/F/0_F.mp4):
     Output stream #0:0 (video): 0 frames encoded; 0 packets muxed (0 bytes);
     Total: 0 packets (0 bytes) muxed
    Output file #1 (./out/jz_10_huron_barstow/F/1_F.mp4):
     Output stream #1:0 (video): 270 frames encoded; 270 packets muxed (309743 bytes);
     Total: 270 packets (309743 bytes) muxed
    Output file #2 (./out/jz_10_huron_barstow/L/0_L.mp4):
     Output stream #2:0 (video): 270 frames encoded; 270 packets muxed (169687 bytes);
     Total: 270 packets (169687 bytes) muxed
    Output file #3 (./out/jz_10_huron_barstow/L/1_L.mp4):
     Output stream #3:0 (video): 270 frames encoded; 270 packets muxed (155502 bytes);
     Total: 270 packets (155502 bytes) muxed
    [libx264 @ 0x7fdfd400f600] frame I:2     Avg QP:25.08  size:  3204
    [libx264 @ 0x7fdfd400f600] frame P:140   Avg QP:26.63  size:  1426
    [libx264 @ 0x7fdfd400f600] frame B:128   Avg QP:28.64  size:   805
    [libx264 @ 0x7fdfd400f600] consecutive B-frames:  5.2% 94.8%  0.0%  0.0%
    [libx264 @ 0x7fdfd400f600] mb I  I16..4:  8.6% 62.7% 28.7%
    [libx264 @ 0x7fdfd400f600] mb P  I16..4:  2.5% 12.5%  3.4%  P16..4: 39.2% 21.4%  9.3%  0.0%  0.0%    skip:11.6%
    [libx264 @ 0x7fdfd400f600] mb B  I16..4:  0.5%  4.0%  1.0%  B16..8: 36.5% 16.7%  4.0%  direct: 5.5%  skip:31.8%  L0:43.4% L1:46.9% BI: 9.7%
    [libx264 @ 0x7fdfd400f600] 8x8 transform intra:68.6% inter:67.7%
    [libx264 @ 0x7fdfd400f600] coded y,uvDC,uvAC intra: 63.1% 48.6% 17.9% inter: 34.5% 21.1% 3.6%
    [libx264 @ 0x7fdfd400f600] i16 v,h,dc,p: 24% 23% 12% 41%
    [libx264 @ 0x7fdfd400f600] i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 17% 19% 26%  7%  5%  5%  7%  6%  8%
    [libx264 @ 0x7fdfd400f600] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 22% 29% 18%  6%  6%  5%  5%  4%  5%
    [libx264 @ 0x7fdfd400f600] i8c dc,h,v,p: 63% 21% 14%  3%
    [libx264 @ 0x7fdfd400f600] Weighted P-Frames: Y:14.3% UV:1.4%
    [libx264 @ 0x7fdfd400f600] ref P L0: 49.2% 20.4% 17.3% 11.2%  1.9%
    [libx264 @ 0x7fdfd400f600] ref B L0: 75.4% 24.6%
    [libx264 @ 0x7fdfd400f600] kb/s:274.71
    [libx264 @ 0x7fdfd4018e00] frame I:2     Avg QP:23.87  size:  2294
    [libx264 @ 0x7fdfd4018e00] frame P:133   Avg QP:25.45  size:   864
    [libx264 @ 0x7fdfd4018e00] frame B:135   Avg QP:28.99  size:   367
    [libx264 @ 0x7fdfd4018e00] consecutive B-frames: 17.4% 38.5% 27.8% 16.3%
    [libx264 @ 0x7fdfd4018e00] mb I  I16..4: 14.5% 54.1% 31.4%
    [libx264 @ 0x7fdfd4018e00] mb P  I16..4:  6.4%  9.6%  2.1%  P16..4: 33.3% 16.7%  5.9%  0.0%  0.0%    skip:26.0%
    [libx264 @ 0x7fdfd4018e00] mb B  I16..4:  1.6%  2.0%  0.3%  B16..8: 29.6%  9.3%  1.4%  direct: 2.2%  skip:53.6%  L0:41.9% L1:51.4% BI: 6.7%
    [libx264 @ 0x7fdfd4018e00] 8x8 transform intra:52.8% inter:73.8%
    [libx264 @ 0x7fdfd4018e00] coded y,uvDC,uvAC intra: 40.7% 41.7% 8.9% inter: 20.7% 16.6% 0.2%
    [libx264 @ 0x7fdfd4018e00] i16 v,h,dc,p: 22% 50%  8% 21%
    [libx264 @ 0x7fdfd4018e00] i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 18% 30% 23%  6%  2%  2%  5%  5%  9%
    [libx264 @ 0x7fdfd4018e00] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 29% 29% 14%  5%  3%  4%  5%  6%  5%
    [libx264 @ 0x7fdfd4018e00] i8c dc,h,v,p: 62% 23% 12%  3%
    [libx264 @ 0x7fdfd4018e00] Weighted P-Frames: Y:1.5% UV:0.8%
    [libx264 @ 0x7fdfd4018e00] ref P L0: 56.1% 15.8% 17.7% 10.2%  0.1%
    [libx264 @ 0x7fdfd4018e00] ref B L0: 75.4% 20.8%  3.9%
    [libx264 @ 0x7fdfd4018e00] ref B L1: 92.6%  7.4%
    [libx264 @ 0x7fdfd4018e00] kb/s:150.22
    [libx264 @ 0x7fdfd4022600] frame I:2     Avg QP:23.86  size:  2208
    [libx264 @ 0x7fdfd4022600] frame P:139   Avg QP:24.90  size:   784
    [libx264 @ 0x7fdfd4022600] frame B:129   Avg QP:28.25  size:   322
    [libx264 @ 0x7fdfd4022600] consecutive B-frames: 17.8% 50.4% 15.6% 16.3%
    [libx264 @ 0x7fdfd4022600] mb I  I16..4: 15.7% 53.3% 31.1%
    [libx264 @ 0x7fdfd4022600] mb P  I16..4:  8.3%  9.9%  1.5%  P16..4: 33.8% 14.8%  5.0%  0.0%  0.0%    skip:26.7%
    [libx264 @ 0x7fdfd4022600] mb B  I16..4:  1.6%  1.8%  0.1%  B16..8: 28.8%  8.2%  1.1%  direct: 2.1%  skip:56.4%  L0:45.5% L1:47.6% BI: 6.9%
    [libx264 @ 0x7fdfd4022600] 8x8 transform intra:50.6% inter:75.8%
    [libx264 @ 0x7fdfd4022600] coded y,uvDC,uvAC intra: 34.0% 44.3% 10.0% inter: 18.8% 17.9% 0.4%
    [libx264 @ 0x7fdfd4022600] i16 v,h,dc,p: 18% 54%  8% 20%
    [libx264 @ 0x7fdfd4022600] i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 19% 28% 26%  6%  2%  2%  4%  5%  8%
    [libx264 @ 0x7fdfd4022600] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 32% 31% 14%  4%  2%  2%  3%  7%  5%
    [libx264 @ 0x7fdfd4022600] i8c dc,h,v,p: 60% 25% 13%  2%
    [libx264 @ 0x7fdfd4022600] Weighted P-Frames: Y:2.2% UV:0.7%
    [libx264 @ 0x7fdfd4022600] ref P L0: 57.9% 16.8% 16.1%  8.9%  0.2%
    [libx264 @ 0x7fdfd4022600] ref B L0: 76.5% 21.0%  2.5%
    [libx264 @ 0x7fdfd4022600] ref B L1: 95.0%  5.0%
    [libx264 @ 0x7fdfd4022600] kb/s:137.61
  • Converting uint8_t data to AVFrame with FFmpeg

    30 octobre 2017, par J.Lefebvre

    I am currently working in C++ with the Autodesk 3DStudio Max 2014 SDK (toolset 100) and the Ffmpeg library in Visual Studio 2015 and trying to convert a DIB (Device Independent Bitmap) to uint8_t pointer array and then convert these data to an AVFrame.

    I don’t have any errors, but my video is still black and without meta data.
    (no time display, etc)

    I made approximatively the same with a Visual Studio Console application to convert jpeg image sequence from disk and this is working fine.
    (The only difference is that instead of converting jpeg to AVFrame with the Ffmpeg library, I try to convert raw data to an AVFrame.)

    So I think the problem could be either on the DIB conversion to the uint8_t data or the uint8_t data to the AVFrame.
    (The second is more plausible, because I used the SFML library to display a window with my rgb uint8_t* data for debuging and it is working fine.)

    I first initialize the ffmpeg library :

    This function is called once at the beginning.

    int Converter::Initialize(AVCodecID codec_id, int width, int height, int fps, const char *filename)
    {
       avcodec_register_all();
       av_register_all();

       AVCodec *codec;
       inputFrame = NULL;
       codecContext = NULL;
       pkt = NULL;
       file = NULL;
       outputFilename = new char[strlen(filename)]();
       *outputFilename = '\0';
       strcpy(outputFilename, filename);

       int ret;

       //Initializing AVCodecContext and getting PixelFormat supported by encoder
       codec = avcodec_find_encoder(codec_id);
       if (!codec)
           return 1;

       AVPixelFormat pixFormat = codec->pix_fmts[0];
       codecContext = avcodec_alloc_context3(codec);
       if (!codecContext)
           return 1;

       codecContext->bit_rate = 400000;
       codecContext->width = width;
       codecContext->height = height;
       codecContext->time_base.num = 1;
       codecContext->time_base.den = fps;
       codecContext->gop_size = 10;
       codecContext->max_b_frames = 1;
       codecContext->pix_fmt = pixFormat;

       if (codec_id == AV_CODEC_ID_H264)
           av_opt_set(codecContext->priv_data, "preset", "slow", 0);

       //Actually opening the encoder
       if (avcodec_open2(codecContext, codec, NULL) < 0)
           return 1;

       file = fopen(outputFilename, "wb");
       if (!file)
           return 1;

       inputFrame = av_frame_alloc();
       inputFrame->format = codecContext->pix_fmt;
       inputFrame->width = codecContext->width;
       inputFrame->height = codecContext->height;

       ret = av_image_alloc(inputFrame->data, inputFrame->linesize, codecContext->width, codecContext->height, codecContext->pix_fmt, 32);

       if (ret < 0)
           return 1;

       return 0;
    }

    Then for each frame, I get the DIB and convert to a uint8_t* it with this function :

    uint8_t* Util::ToUint8_t(RGBQUAD *data, int width, int height)
    {
       uint8_t* buf = (uint8_t*)data;

       int imageSize = width * height;
       size_t rgbquad_size = sizeof(RGBQUAD);
       size_t total_bytes = imageSize * rgbquad_size;
       uint8_t * pCopyBuffer = new uint8_t[total_bytes];

       for (int x = 0; x < width; x++)
       {
           for (int y = 0; y < height; y++)
           {
               int index = (x + width * y) * rgbquad_size;
               int invertIndex = (x + width* (height - y - 1)) * rgbquad_size;

               //BGRA to RGBA
               pCopyBuffer[index] = buf[invertIndex + 2];
               pCopyBuffer[index + 1] = buf[invertIndex + 1];
               pCopyBuffer[index + 2] = buf[invertIndex];
               pCopyBuffer[index + 3] = 0xFF;
           }
       }

       return pCopyBuffer;
    }

    void GetDIBBuffer(Interface* ip, BITMAPINFO *bmi, uint8_t** outBuffer)
    {
       int size;

       ViewExp& view = ip->GetActiveViewExp();

       view.getGW()->getDIB(NULL, &size);

       bmi = (BITMAPINFO *)malloc(size);
       BITMAPINFOHEADER *bmih = (BITMAPINFOHEADER *)bmi;
       view.getGW()->getDIB(bmi, &size);

       uint8_t * pCopyBuffer = Util::ToUint8_t(bmi->bmiColors, bmih->biWidth, bmih->biHeight);

       *outBuffer = pCopyBuffer;
    }

    This function is used to get the DIB :

    void GetViewportDIB(Interface* ip, BITMAPINFO *bmi, BITMAPINFOHEADER *bmih, BitmapInfo biFile, Bitmap *map)
    {
       int size;

       if (!biFile.Name()[0])
           return;

       ViewExp& view = ip->GetActiveViewExp();

       view.getGW()->getDIB(NULL, &size);

       bmi = (BITMAPINFO *)malloc(size);
       bmih = (BITMAPINFOHEADER *)bmi;

       view.getGW()->getDIB(bmi, &size);

       biFile.SetWidth((WORD)bmih->biWidth);
       biFile.SetHeight((WORD)bmih->biHeight);
       biFile.SetType(BMM_TRUE_32);

       map = TheManager->Create(&biFile);
       map->OpenOutput(&biFile);
       map->FromDib(bmi);
       map->Write(&biFile);
       map->Close(&biFile);
    }

    And after the conversion to AVFrame and video encoding :

    The EncodeFromMem function is call each frame.

    int Converter::EncodeFromMem(const char *outputDir, int frameNumber, uint8_t* data)
    {
       int ret;

       inputFrame->pts = frameNumber;
       EncodeFrame(data, codecContext, inputFrame, &pkt, file);

       return 0;
    }

    static void RgbToYuv(uint8_t *rgb, AVCodecContext *c, AVFrame *frame)
    {
       struct SwsContext *swsCtx = NULL;
       const int in_linesize[1] = { 3 * c->width };// RGB stride
       swsCtx = sws_getCachedContext(swsCtx, c->width, c->height, AV_PIX_FMT_RGB24, c->width, c->height, AV_PIX_FMT_YUV420P, 0, 0, 0, 0);
       sws_scale(swsCtx, (const uint8_t * const *)&rgb, in_linesize, 0, c->height, frame->data, frame->linesize);
    }

    static void EncodeFrame(uint8_t *rgb, AVCodecContext *c, AVFrame *frame, AVPacket **pkt, FILE *file)
    {
       int ret, got_output;

       RgbToYuv(rgb, c, frame);

       *pkt = av_packet_alloc();
       av_init_packet(*pkt);
       (*pkt)->data = NULL;
       (*pkt)->size = 0;

       ret = avcodec_encode_video2(c, *pkt, frame, &got_output);
       if (ret < 0)
       {
           fprintf(stderr, "Error encoding frame/n");
           exit(1);
       }
       if (got_output)
       {
           fwrite((*pkt)->data, 1, (*pkt)->size, file);
           av_packet_unref(*pkt);
       }
    }

    To finish I have a function that write the packets and free the memory :
    This function is called once at the end of the time range.

    int Converter::Finalize()
    {
       int ret, got_output;
       uint8_t endcode[] = { 0, 0, 1, 0xb7 };

       /* get the delayed frames */
       do
       {
           fflush(stdout);
           ret = avcodec_encode_video2(codecContext, pkt, NULL, &got_output);
           if (ret < 0)
           {
               fprintf(stderr, "Error encoding frame/n");
               return 1;
           }
           if (got_output)
           {
               fwrite(pkt->data, 1, pkt->size, file);
               av_packet_unref(pkt);
           }
       } while (got_output);

       fwrite(endcode, 1, sizeof(endcode), file);
       fclose(file);

       avcodec_close(codecContext);
       av_free(codecContext);

       av_frame_unref(inputFrame);
       av_frame_free(&inputFrame);
       //av_freep(&inputFrame->data[0]); //Crash

       delete outputFilename;
       outputFilename = 0;

       return 0;
    }

    EDIT :

    I modify my RgbToYuv function and create another one to convert back the yuv frame to an rgb one.

    This not really solve the problem, but maybe focus the problem on the conversion from YuvToRgb.

    This is the result of the conversion from YUV to RGB :

     ![YuvToRgb result] : https://img42.com/kHqpt+

    static void YuvToRgb(AVCodecContext *c, AVFrame *frame)
    {
       struct SwsContext *img_convert_ctx = sws_getContext(c->width, c->height, AV_PIX_FMT_YUV420P, c->width, c->height, AV_PIX_FMT_RGB24, SWS_BICUBIC, NULL, NULL, NULL);
       AVFrame * rgbPictInfo = av_frame_alloc();
       avpicture_fill((AVPicture*)rgbPictInfo, *(frame)->data, AV_PIX_FMT_RGB24, c->width, c->height);
       sws_scale(img_convert_ctx, frame->data, frame->linesize, 0, c->height, rgbPictInfo->data, rgbPictInfo->linesize);

       Util::DebugWindow(c->width, c->height, rgbPictInfo->data[0]);
    }
    static void RgbToYuv(uint8_t *rgb, AVCodecContext *c, AVFrame *frame)
    {
       AVFrame * rgbPictInfo = av_frame_alloc();
       avpicture_fill((AVPicture*)rgbPictInfo, rgb, AV_PIX_FMT_RGBA, c->width, c->height);

       struct SwsContext *swsCtx = sws_getContext(c->width, c->height, AV_PIX_FMT_RGBA, c->width, c->height, AV_PIX_FMT_YUV420P, SWS_BICUBIC, NULL, NULL, NULL);
       avpicture_fill((AVPicture*)frame, rgb, AV_PIX_FMT_YUV420P, c->width, c->height);    
       sws_scale(swsCtx, rgbPictInfo->data, rgbPictInfo->linesize, 0, c->height, frame->data, frame->linesize);

       YuvToRgb(c, frame);
    }
  • recording from webcam using ffmpeg at high framerate

    14 novembre 2017, par Zorglub29

    I have a webcam (model Brio 4K stream edition from Logitech) that is able to record at resolution 1280x720 and 60 fps in guvcview on Ubuntu 16.04. I then use a video codec ’raw camera input’. This is working fine and as expected, and the result is well a 60 fps video at the desired resolution.

    However, I need to record using command line and not GUI. The guvcview GUI crashes on my machine (segmentation fault, this has been reported by other users before), so I want to use ffmpeg instead.

    Unfortunately, when I use the command (in terminal) :

    ffmpeg -i /dev/video1 -framerate 60 -video_size 1280x720 out.mkv

    I only get around 30 fps out. This is of course not due to the camera by itself (it works at 60 fps in guvcview), but I cannot understand why I get 30 fps when I ask for 60 fps explicitely. It also looks in the output of ffmpeg as it records at 30 fps :

    Metadata:
       encoder         : Lavf56.40.101
       Stream #0:0: Video: h264 (libx264) (H264 / 0x34363248), yuv422p, 1280x720, q=-1--1, 30 fps, 1k tbn, 30 tbc

    Any suggestion how I can solve this and record at 60 fps using ffmpeg ?

    Note : I also tried something like this, with the same result (only 30 fps) :

    ffmpeg -f video4linux2 -i /dev/video1 -framerate 60.0 -video_size 1280x720 out.mkv

    Edit 1 thank you for the help in comment : order of arguments matters. Now using :

    ffmpeg -framerate 60 -video_size 1280x720 -i /dev/video1 out.mkv

    I get still around 30 fps, and a new (probably more understandable) warning message :

    [video4linux2,v4l2 @ 0x1ddc4e0] The driver changed the time per frame from 1/60 to 1/30
    Input #0, video4linux2,v4l2, from '/dev/video1':
     Duration: N/A, start: 256338.694616, bitrate: 442368 kb/s
       Stream #0:0: Video: rawvideo (YUY2 / 0x32595559), yuyv422, 1280x720, 442368 kb/s, 30 fps, 30 tbr, 1000k tbn, 1000k tbc

    I find several entries for this problem (video4linux2 + The driver changed the time per frame), but no clear solution.

    Edit 2 + 3 :

    v4l2-ctl -d 1 --list-formats-ext
    ioctl: VIDIOC_ENUM_FMT
       Index       : 0
       Type        : Video Capture
       Pixel Format: 'YUYV'
       Name        : YUYV 4:2:2
           Size: Discrete 640x480
               Interval: Discrete 0.033s (30.000 fps)
               Interval: Discrete 0.042s (24.000 fps)
               Interval: Discrete 0.050s (20.000 fps)
               Interval: Discrete 0.067s (15.000 fps)
               Interval: Discrete 0.100s (10.000 fps)
               Interval: Discrete 0.133s (7.500 fps)
               Interval: Discrete 0.200s (5.000 fps)
           Size: Discrete 160x120
               Interval: Discrete 0.033s (30.000 fps)
               Interval: Discrete 0.042s (24.000 fps)
               Interval: Discrete 0.050s (20.000 fps)
               Interval: Discrete 0.067s (15.000 fps)
               Interval: Discrete 0.100s (10.000 fps)
               Interval: Discrete 0.133s (7.500 fps)
               Interval: Discrete 0.200s (5.000 fps)
           Size: Discrete 176x144
               Interval: Discrete 0.033s (30.000 fps)
               Interval: Discrete 0.042s (24.000 fps)
               Interval: Discrete 0.050s (20.000 fps)
               Interval: Discrete 0.067s (15.000 fps)
               Interval: Discrete 0.100s (10.000 fps)
               Interval: Discrete 0.133s (7.500 fps)
               Interval: Discrete 0.200s (5.000 fps)
           Size: Discrete 320x180
               Interval: Discrete 0.033s (30.000 fps)
               Interval: Discrete 0.042s (24.000 fps)
               Interval: Discrete 0.050s (20.000 fps)
               Interval: Discrete 0.067s (15.000 fps)
               Interval: Discrete 0.100s (10.000 fps)
               Interval: Discrete 0.133s (7.500 fps)
               Interval: Discrete 0.200s (5.000 fps)
           Size: Discrete 320x240
               Interval: Discrete 0.033s (30.000 fps)
               Interval: Discrete 0.042s (24.000 fps)
               Interval: Discrete 0.050s (20.000 fps)
               Interval: Discrete 0.067s (15.000 fps)
               Interval: Discrete 0.100s (10.000 fps)
               Interval: Discrete 0.133s (7.500 fps)
               Interval: Discrete 0.200s (5.000 fps)
           Size: Discrete 352x288
               Interval: Discrete 0.033s (30.000 fps)
               Interval: Discrete 0.042s (24.000 fps)
               Interval: Discrete 0.050s (20.000 fps)
               Interval: Discrete 0.067s (15.000 fps)
               Interval: Discrete 0.100s (10.000 fps)
               Interval: Discrete 0.133s (7.500 fps)
               Interval: Discrete 0.200s (5.000 fps)
           Size: Discrete 340x340
               Interval: Discrete 0.033s (30.000 fps)
           Size: Discrete 424x240
               Interval: Discrete 0.033s (30.000 fps)
               Interval: Discrete 0.042s (24.000 fps)
               Interval: Discrete 0.050s (20.000 fps)
               Interval: Discrete 0.067s (15.000 fps)
               Interval: Discrete 0.100s (10.000 fps)
               Interval: Discrete 0.133s (7.500 fps)
               Interval: Discrete 0.200s (5.000 fps)
           Size: Discrete 440x440
               Interval: Discrete 0.033s (30.000 fps)
           Size: Discrete 480x270
               Interval: Discrete 0.033s (30.000 fps)
               Interval: Discrete 0.042s (24.000 fps)
               Interval: Discrete 0.050s (20.000 fps)
               Interval: Discrete 0.067s (15.000 fps)
               Interval: Discrete 0.100s (10.000 fps)
               Interval: Discrete 0.133s (7.500 fps)
               Interval: Discrete 0.200s (5.000 fps)
           Size: Discrete 640x360
               Interval: Discrete 0.033s (30.000 fps)
               Interval: Discrete 0.042s (24.000 fps)
               Interval: Discrete 0.050s (20.000 fps)
               Interval: Discrete 0.067s (15.000 fps)
               Interval: Discrete 0.100s (10.000 fps)
               Interval: Discrete 0.133s (7.500 fps)
               Interval: Discrete 0.200s (5.000 fps)
           Size: Discrete 800x448
               Interval: Discrete 0.033s (30.000 fps)
               Interval: Discrete 0.042s (24.000 fps)
               Interval: Discrete 0.050s (20.000 fps)
               Interval: Discrete 0.067s (15.000 fps)
               Interval: Discrete 0.100s (10.000 fps)
               Interval: Discrete 0.133s (7.500 fps)
               Interval: Discrete 0.200s (5.000 fps)
           Size: Discrete 800x600
               Interval: Discrete 0.033s (30.000 fps)
               Interval: Discrete 0.042s (24.000 fps)
               Interval: Discrete 0.050s (20.000 fps)
               Interval: Discrete 0.067s (15.000 fps)
               Interval: Discrete 0.100s (10.000 fps)
               Interval: Discrete 0.133s (7.500 fps)
               Interval: Discrete 0.200s (5.000 fps)
           Size: Discrete 848x480
               Interval: Discrete 0.033s (30.000 fps)
               Interval: Discrete 0.042s (24.000 fps)
               Interval: Discrete 0.050s (20.000 fps)
               Interval: Discrete 0.067s (15.000 fps)
               Interval: Discrete 0.100s (10.000 fps)
               Interval: Discrete 0.133s (7.500 fps)
               Interval: Discrete 0.200s (5.000 fps)
           Size: Discrete 960x540
               Interval: Discrete 0.033s (30.000 fps)
               Interval: Discrete 0.042s (24.000 fps)
               Interval: Discrete 0.050s (20.000 fps)
               Interval: Discrete 0.067s (15.000 fps)
               Interval: Discrete 0.100s (10.000 fps)
               Interval: Discrete 0.133s (7.500 fps)
               Interval: Discrete 0.200s (5.000 fps)
           Size: Discrete 1024x576
               Interval: Discrete 0.033s (30.000 fps)
               Interval: Discrete 0.042s (24.000 fps)
               Interval: Discrete 0.050s (20.000 fps)
               Interval: Discrete 0.067s (15.000 fps)
               Interval: Discrete 0.100s (10.000 fps)
               Interval: Discrete 0.133s (7.500 fps)
               Interval: Discrete 0.200s (5.000 fps)
           Size: Discrete 1280x720
               Interval: Discrete 0.033s (30.000 fps)
               Interval: Discrete 0.042s (24.000 fps)
               Interval: Discrete 0.050s (20.000 fps)
               Interval: Discrete 0.067s (15.000 fps)
               Interval: Discrete 0.100s (10.000 fps)
               Interval: Discrete 0.133s (7.500 fps)
               Interval: Discrete 0.200s (5.000 fps)
           Size: Discrete 1600x896
               Interval: Discrete 0.033s (30.000 fps)
               Interval: Discrete 0.042s (24.000 fps)
               Interval: Discrete 0.050s (20.000 fps)
               Interval: Discrete 0.067s (15.000 fps)
               Interval: Discrete 0.100s (10.000 fps)
               Interval: Discrete 0.133s (7.500 fps)
               Interval: Discrete 0.200s (5.000 fps)
           Size: Discrete 1920x1080
               Interval: Discrete 0.033s (30.000 fps)
               Interval: Discrete 0.042s (24.000 fps)
               Interval: Discrete 0.050s (20.000 fps)
               Interval: Discrete 0.067s (15.000 fps)
               Interval: Discrete 0.100s (10.000 fps)
               Interval: Discrete 0.133s (7.500 fps)
               Interval: Discrete 0.200s (5.000 fps)

       Index       : 1
       Type        : Video Capture
       Pixel Format: 'MJPG' (compressed)
       Name        : Motion-JPEG
           Size: Discrete 640x480
               Interval: Discrete 0.008s (120.000 fps)
               Interval: Discrete 0.011s (90.000 fps)
               Interval: Discrete 0.017s (60.000 fps)
               Interval: Discrete 0.033s (30.000 fps)
               Interval: Discrete 0.042s (24.000 fps)
               Interval: Discrete 0.050s (20.000 fps)
               Interval: Discrete 0.067s (15.000 fps)
               Interval: Discrete 0.100s (10.000 fps)
               Interval: Discrete 0.133s (7.500 fps)
               Interval: Discrete 0.200s (5.000 fps)
           Size: Discrete 160x120
               Interval: Discrete 0.033s (30.000 fps)
               Interval: Discrete 0.042s (24.000 fps)
               Interval: Discrete 0.050s (20.000 fps)
               Interval: Discrete 0.067s (15.000 fps)
               Interval: Discrete 0.100s (10.000 fps)
               Interval: Discrete 0.133s (7.500 fps)
               Interval: Discrete 0.200s (5.000 fps)
           Size: Discrete 176x144
               Interval: Discrete 0.033s (30.000 fps)
               Interval: Discrete 0.042s (24.000 fps)
               Interval: Discrete 0.050s (20.000 fps)
               Interval: Discrete 0.067s (15.000 fps)
               Interval: Discrete 0.100s (10.000 fps)
               Interval: Discrete 0.133s (7.500 fps)
               Interval: Discrete 0.200s (5.000 fps)
           Size: Discrete 320x180
               Interval: Discrete 0.033s (30.000 fps)
               Interval: Discrete 0.042s (24.000 fps)
               Interval: Discrete 0.050s (20.000 fps)
               Interval: Discrete 0.067s (15.000 fps)
               Interval: Discrete 0.100s (10.000 fps)
               Interval: Discrete 0.133s (7.500 fps)
               Interval: Discrete 0.200s (5.000 fps)
           Size: Discrete 320x240
               Interval: Discrete 0.033s (30.000 fps)
               Interval: Discrete 0.042s (24.000 fps)
               Interval: Discrete 0.050s (20.000 fps)
               Interval: Discrete 0.067s (15.000 fps)
               Interval: Discrete 0.100s (10.000 fps)
               Interval: Discrete 0.133s (7.500 fps)
               Interval: Discrete 0.200s (5.000 fps)
           Size: Discrete 352x288
               Interval: Discrete 0.033s (30.000 fps)
               Interval: Discrete 0.042s (24.000 fps)
               Interval: Discrete 0.050s (20.000 fps)
               Interval: Discrete 0.067s (15.000 fps)
               Interval: Discrete 0.100s (10.000 fps)
               Interval: Discrete 0.133s (7.500 fps)
               Interval: Discrete 0.200s (5.000 fps)
           Size: Discrete 424x240
               Interval: Discrete 0.033s (30.000 fps)
               Interval: Discrete 0.042s (24.000 fps)
               Interval: Discrete 0.050s (20.000 fps)
               Interval: Discrete 0.067s (15.000 fps)
               Interval: Discrete 0.100s (10.000 fps)
               Interval: Discrete 0.133s (7.500 fps)
               Interval: Discrete 0.200s (5.000 fps)
           Size: Discrete 480x270
               Interval: Discrete 0.033s (30.000 fps)
               Interval: Discrete 0.042s (24.000 fps)
               Interval: Discrete 0.050s (20.000 fps)
               Interval: Discrete 0.067s (15.000 fps)
               Interval: Discrete 0.100s (10.000 fps)
               Interval: Discrete 0.133s (7.500 fps)
               Interval: Discrete 0.200s (5.000 fps)
           Size: Discrete 640x360
               Interval: Discrete 0.033s (30.000 fps)
               Interval: Discrete 0.042s (24.000 fps)
               Interval: Discrete 0.050s (20.000 fps)
               Interval: Discrete 0.067s (15.000 fps)
               Interval: Discrete 0.100s (10.000 fps)
               Interval: Discrete 0.133s (7.500 fps)
               Interval: Discrete 0.200s (5.000 fps)
           Size: Discrete 800x448
               Interval: Discrete 0.033s (30.000 fps)
               Interval: Discrete 0.042s (24.000 fps)
               Interval: Discrete 0.050s (20.000 fps)
               Interval: Discrete 0.067s (15.000 fps)
               Interval: Discrete 0.100s (10.000 fps)
               Interval: Discrete 0.133s (7.500 fps)
               Interval: Discrete 0.200s (5.000 fps)
           Size: Discrete 800x600
               Interval: Discrete 0.033s (30.000 fps)
               Interval: Discrete 0.042s (24.000 fps)
               Interval: Discrete 0.050s (20.000 fps)
               Interval: Discrete 0.067s (15.000 fps)
               Interval: Discrete 0.100s (10.000 fps)
               Interval: Discrete 0.133s (7.500 fps)
               Interval: Discrete 0.200s (5.000 fps)
           Size: Discrete 848x480
               Interval: Discrete 0.033s (30.000 fps)
               Interval: Discrete 0.042s (24.000 fps)
               Interval: Discrete 0.050s (20.000 fps)
               Interval: Discrete 0.067s (15.000 fps)
               Interval: Discrete 0.100s (10.000 fps)
               Interval: Discrete 0.133s (7.500 fps)
               Interval: Discrete 0.200s (5.000 fps)
           Size: Discrete 960x540
               Interval: Discrete 0.033s (30.000 fps)
               Interval: Discrete 0.042s (24.000 fps)
               Interval: Discrete 0.050s (20.000 fps)
               Interval: Discrete 0.067s (15.000 fps)
               Interval: Discrete 0.100s (10.000 fps)
               Interval: Discrete 0.133s (7.500 fps)
               Interval: Discrete 0.200s (5.000 fps)
           Size: Discrete 1024x576
               Interval: Discrete 0.033s (30.000 fps)
               Interval: Discrete 0.042s (24.000 fps)
               Interval: Discrete 0.050s (20.000 fps)
               Interval: Discrete 0.067s (15.000 fps)
               Interval: Discrete 0.100s (10.000 fps)
               Interval: Discrete 0.133s (7.500 fps)
               Interval: Discrete 0.200s (5.000 fps)
           Size: Discrete 1280x720
               Interval: Discrete 0.011s (90.000 fps)
               Interval: Discrete 0.017s (60.000 fps)
               Interval: Discrete 0.033s (30.000 fps)
               Interval: Discrete 0.042s (24.000 fps)
               Interval: Discrete 0.050s (20.000 fps)
               Interval: Discrete 0.067s (15.000 fps)
               Interval: Discrete 0.100s (10.000 fps)
               Interval: Discrete 0.133s (7.500 fps)
               Interval: Discrete 0.200s (5.000 fps)
           Size: Discrete 1600x896
               Interval: Discrete 0.033s (30.000 fps)
               Interval: Discrete 0.042s (24.000 fps)
               Interval: Discrete 0.050s (20.000 fps)
               Interval: Discrete 0.067s (15.000 fps)
               Interval: Discrete 0.100s (10.000 fps)
               Interval: Discrete 0.133s (7.500 fps)
               Interval: Discrete 0.200s (5.000 fps)
           Size: Discrete 1920x1080
               Interval: Discrete 0.017s (60.000 fps)
               Interval: Discrete 0.033s (30.000 fps)
               Interval: Discrete 0.042s (24.000 fps)
               Interval: Discrete 0.050s (20.000 fps)
               Interval: Discrete 0.067s (15.000 fps)
               Interval: Discrete 0.100s (10.000 fps)
               Interval: Discrete 0.133s (7.500 fps)
               Interval: Discrete 0.200s (5.000 fps)
           Size: Discrete 2560x1440
               Interval: Discrete 0.033s (30.000 fps)
               Interval: Discrete 0.042s (24.000 fps)
               Interval: Discrete 0.050s (20.000 fps)
               Interval: Discrete 0.067s (15.000 fps)
               Interval: Discrete 0.100s (10.000 fps)
               Interval: Discrete 0.133s (7.500 fps)
               Interval: Discrete 0.200s (5.000 fps)
           Size: Discrete 3840x2160
               Interval: Discrete 0.033s (30.000 fps)
               Interval: Discrete 0.042s (24.000 fps)
               Interval: Discrete 0.050s (20.000 fps)
               Interval: Discrete 0.067s (15.000 fps)
               Interval: Discrete 0.100s (10.000 fps)
               Interval: Discrete 0.133s (7.500 fps)
               Interval: Discrete 0.200s (5.000 fps)
           Size: Discrete 4096x2160
               Interval: Discrete 0.033s (30.000 fps)
               Interval: Discrete 0.042s (24.000 fps)
               Interval: Discrete 0.050s (20.000 fps)
               Interval: Discrete 0.067s (15.000 fps)
               Interval: Discrete 0.100s (10.000 fps)
               Interval: Discrete 0.133s (7.500 fps)
               Interval: Discrete 0.200s (5.000 fps)

       Index       : 2
       Type        : Video Capture
       Pixel Format: 'NV12'
       Name        : Y/CbCr 4:2:0
           Size: Discrete 640x480
               Interval: Discrete 0.033s (30.000 fps)
               Interval: Discrete 0.042s (24.000 fps)
               Interval: Discrete 0.050s (20.000 fps)
               Interval: Discrete 0.067s (15.000 fps)
               Interval: Discrete 0.100s (10.000 fps)
               Interval: Discrete 0.133s (7.500 fps)
               Interval: Discrete 0.200s (5.000 fps)
           Size: Discrete 640x360
               Interval: Discrete 0.033s (30.000 fps)
               Interval: Discrete 0.042s (24.000 fps)
               Interval: Discrete 0.050s (20.000 fps)
               Interval: Discrete 0.067s (15.000 fps)
               Interval: Discrete 0.100s (10.000 fps)
               Interval: Discrete 0.133s (7.500 fps)
               Interval: Discrete 0.200s (5.000 fps)
           Size: Discrete 1280x720
               Interval: Discrete 0.033s (30.000 fps)
               Interval: Discrete 0.042s (24.000 fps)
               Interval: Discrete 0.050s (20.000 fps)
               Interval: Discrete 0.067s (15.000 fps)
               Interval: Discrete 0.100s (10.000 fps)
               Interval: Discrete 0.133s (7.500 fps)
               Interval: Discrete 0.200s (5.000 fps)
           Size: Discrete 1920x1080
               Interval: Discrete 0.033s (30.000 fps)
               Interval: Discrete 0.042s (24.000 fps)
               Interval: Discrete 0.050s (20.000 fps)
               Interval: Discrete 0.067s (15.000 fps)
               Interval: Discrete 0.100s (10.000 fps)
               Interval: Discrete 0.133s (7.500 fps)
               Interval: Discrete 0.200s (5.000 fps)

    Edit 4 :

    It looks like there may still be a problem using :

    ffmpeg -f v4l2 -framerate 60 -video_size 1280x720 -input_format mjpeg -i /dev/video1 out.mkv

    As the output of ffmpeg looks like :

    Output #0, matroska, to 'out.mkv':
     Metadata:
     encoder         : Lavf56.40.101
    Stream #0:0: Video: h264 (libx264) (H264 / 0x34363248), yuvj422p(pc), 1280x720, q=-1--1, 60 fps, 1k tbn, 60 tbc
     Metadata:
     encoder         : Lavc56.60.100 libx264
    Stream mapping:
    Stream #0:0 -> #0:0 (mjpeg (native) -> h264 (libx264))
    Press [q] to stop, [?] for help
    frame=  198 fps= 37 q=-1.0 Lsize=    1043kB time=00:00:05.38 bitrate=1587.4kbits/s

    Is the fps indicated in the last line (37 instead of 60) reliable ? It was working at 60 fps with guvcview, so I do not think the laptop write speeed or CPU is the problem.

    Edit 5 :

    Thank you for the great help @LordNeckbeard , now it looks like everything works using your additional output argument command ffmpeg -f v4l2 -framerate 60 -video_size 1280x720 -input_format mjpeg -i /dev/video1 -preset faster -pix_fmt yuv420p out.mkv :

    $ ffmpeg -f v4l2 -framerate 60 -video_size 1280x720 -input_format mjpeg -i /dev/video1 -preset faster -pix_fmt yuv420p out.mkv
    ffmpeg version 2.8.11-0ubuntu0.16.04.1 Copyright (c) 2000-2017 the FFmpeg developers
     built with gcc 5.4.0 (Ubuntu 5.4.0-6ubuntu1~16.04.4) 20160609
     configuration: --prefix=/usr --extra-version=0ubuntu0.16.04.1 --build-suffix=-ffmpeg --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --cc=cc --cxx=g++ --enable-gpl --enable-shared --disable-stripping --disable-decoder=libopenjpeg --disable-decoder=libschroedinger --enable-avresample --enable-avisynth --enable-gnutls --enable-ladspa --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libmodplug --enable-libmp3lame --enable-libopenjpeg --enable-libopus --enable-libpulse --enable-librtmp --enable-libschroedinger --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxvid --enable-libzvbi --enable-openal --enable-opengl --enable-x11grab --enable-libdc1394 --enable-libiec61883 --enable-libzmq --enable-frei0r --enable-libx264 --enable-libopencv
     libavutil      54. 31.100 / 54. 31.100
     libavcodec     56. 60.100 / 56. 60.100
     libavformat    56. 40.101 / 56. 40.101
     libavdevice    56.  4.100 / 56.  4.100
     libavfilter     5. 40.101 /  5. 40.101
     libavresample   2.  1.  0 /  2.  1.  0
     libswscale      3.  1.101 /  3.  1.101
     libswresample   1.  2.101 /  1.  2.101
     libpostproc    53.  3.100 / 53.  3.100
    [mjpeg @ 0x1d6f320] Changeing bps to 8
    Input #0, video4linux2,v4l2, from '/dev/video1':
     Duration: N/A, start: 259410.922692, bitrate: N/A
       Stream #0:0: Video: mjpeg, yuvj422p(pc, bt470bg/unknown/unknown), 1280x720, -10 kb/s, 60 fps, 60 tbr, 1000k tbn, 1000k tbc
    [swscaler @ 0x1d7e480] deprecated pixel format used, make sure you did set range correctly
    [libx264 @ 0x1d72620] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX FMA3 AVX2 LZCNT BMI2
    [libx264 @ 0x1d72620] profile High, level 3.2
    [libx264 @ 0x1d72620] 264 - core 148 r2643 5c65704 - H.264/MPEG-4 AVC codec - Copyleft 2003-2015 - http://www.videolan.org/x264.html - options: cabac=1 ref=2 deblock=1:0:0 analyse=0x3:0x113 me=hex subme=4 psy=1 psy_rd=1.00:0.00 mixed_ref=0 me_range=16 chroma_me=1 trellis=1 8x8dct=1 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=3 b_pyramid=2 b_adapt=1 b_bias=0 direct=1 weightb=1 open_gop=0 weightp=1 keyint=250 keyint_min=25 scenecut=40 intra_refresh=0 rc_lookahead=20 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, matroska, to 'out.mkv':
     Metadata:
       encoder         : Lavf56.40.101
       Stream #0:0: Video: h264 (libx264) (H264 / 0x34363248), yuv420p, 1280x720, q=-1--1, 60 fps, 1k tbn, 60 tbc
       Metadata:
         encoder         : Lavc56.60.100 libx264
    Stream mapping:
     Stream #0:0 -> #0:0 (mjpeg (native) -> h264 (libx264))
    Press [q] to stop, [?] for help
    frame=  467 fps= 59 q=-1.0 Lsize=     914kB time=00:00:07.83 bitrate= 955.8kbits/s    
    video:910kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.434447%
    [libx264 @ 0x1d72620] frame I:2     Avg QP:21.96  size: 61186
    [libx264 @ 0x1d72620] frame P:118   Avg QP:26.01  size:  4695
    [libx264 @ 0x1d72620] frame B:347   Avg QP:27.54  size:   734
    [libx264 @ 0x1d72620] consecutive B-frames:  0.4%  1.3%  0.6% 97.6%
    [libx264 @ 0x1d72620] mb I  I16..4: 14.7% 45.2% 40.0%
    [libx264 @ 0x1d72620] mb P  I16..4:  1.4%  3.7%  0.0%  P16..4: 29.9%  4.1%  0.5%  0.0%  0.0%    skip:60.4%
    [libx264 @ 0x1d72620] mb B  I16..4:  0.2%  0.4%  0.0%  B16..8:  5.4%  0.2%  0.0%  direct: 4.3%  skip:89.6%  L0:53.4% L1:42.7% BI: 3.9%
    [libx264 @ 0x1d72620] 8x8 transform intra:66.4% inter:71.8%
    [libx264 @ 0x1d72620] coded y,uvDC,uvAC intra: 38.1% 50.7% 12.7% inter: 2.8% 7.6% 0.1%
    [libx264 @ 0x1d72620] i16 v,h,dc,p: 36% 36% 16% 11%
    [libx264 @ 0x1d72620] i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 16% 32% 37%  2%  2%  2%  4%  1%  5%
    [libx264 @ 0x1d72620] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 18% 46%  8%  2%  3%  3%  4%  3% 12%
    [libx264 @ 0x1d72620] i8c dc,h,v,p: 56% 26% 16%  3%
    [libx264 @ 0x1d72620] Weighted P-Frames: Y:9.3% UV:7.6%
    [libx264 @ 0x1d72620] ref P L0: 58.6% 41.4%
    [libx264 @ 0x1d72620] ref B L0: 56.9% 43.1%
    [libx264 @ 0x1d72620] ref B L1: 85.5% 14.5%
    [libx264 @ 0x1d72620] kb/s:946.85