Recherche avancée

Médias (0)

Mot : - Tags -/page unique

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

Autres articles (47)

  • List of compatible distributions

    26 avril 2011, par

    The table below is the list of Linux distributions compatible with the automated installation script of MediaSPIP. Distribution nameVersion nameVersion number Debian Squeeze 6.x.x Debian Weezy 7.x.x Debian Jessie 8.x.x Ubuntu The Precise Pangolin 12.04 LTS Ubuntu The Trusty Tahr 14.04
    If you want to help us improve this list, you can provide us access to a machine whose distribution is not mentioned above or send the necessary fixes to add (...)

  • Personnaliser en ajoutant son logo, sa bannière ou son image de fond

    5 septembre 2013, par

    Certains thèmes prennent en compte trois éléments de personnalisation : l’ajout d’un logo ; l’ajout d’une bannière l’ajout d’une image de fond ;

  • Configuration spécifique pour PHP5

    4 février 2011, par

    PHP5 est obligatoire, vous pouvez l’installer en suivant ce tutoriel spécifique.
    Il est recommandé dans un premier temps de désactiver le safe_mode, cependant, s’il est correctement configuré et que les binaires nécessaires sont accessibles, MediaSPIP devrait fonctionner correctement avec le safe_mode activé.
    Modules spécifiques
    Il est nécessaire d’installer certains modules PHP spécifiques, via le gestionnaire de paquet de votre distribution ou manuellement : php5-mysql pour la connectivité avec la (...)

Sur d’autres sites (8721)

  • How to pipe sequence of thumbnails/screenshots from ffmpeg to nodejs for further processing ?

    30 décembre 2015, par Dmitry Ivanov

    What I want to achieve is to take screenshots continuously and pass them to nodejs application in order to process each one separately and do some other stuff. I need this for Linux environment only. I picked ffmpeg with x11grab as a screenshots provider. The following command works just fine :

    ffmpeg -t 10 -s 1366x768 -f x11grab -i :0.0+0,0 -vf fps=30 output_%d.png -y

    It creates 300 consequent frames of my screen during 10 seconds period. Then I want to redirect the output to my nodejs app rather than just to write files on the hard drive. So I’m calling ffmpeg from node :

    var spawn = require('child_process').spawn,
       fps = 30,
       duration = 10,
       screenSize = {w: 1366, h: 768},
       args = [
           '-t',
           duration,
           '-s',
           screenSize.w + 'x' + screenSize.h,
           '-f',
           'x11grab',
           '-i',
           ':0.0',
           '-vf',
           'fps=' + fps,
           '-f',
           'mjpeg',
           'pipe:1'
       ],
       ff = spawn('ffmpeg', args);

    ff.stdout.on('data', function (data) {
       console.log('Data size: ' + data.length);
    });

    ff.stdout.on('end', function (data) {
       console.log('Stream end');
    });

    ff.stderr.on('data', function (data) {
       console.log('ff error: ' + data);
    });

    I apologize for a long log, but it’s important :

    ff error: ffmpeg version N-77455-g4707497 Copyright (c) 2000-2015 the FFmpeg developers
     built with gcc 4.8 (Ubuntu 4.8.4-2ubuntu1~14.04)
     configuration: --extra-libs=-ldl --prefix=/opt/ffmpeg --mandir=/usr/share/man --enable-avresample --disable-debug --enable-nonfree --enable-gpl --enable-version3 --enable-libopencore-amrnb --enable-libopencore-amrwb --disable-decoder=amrnb --disable-decoder=amrwb --enable-libpulse --enable-libdcadec --enable-libfreetype --enable-libx264 --enable-libx265 --enable-libfdk-aac --enable-libvorbis --enable-libmp3lame --enable-libopus --enable-libvpx --enable-libspeex --enable-libass --enable-avisynth --enable-libsoxr --enable-libxvid --enable-libvo-aacenc --enable-libvidstab
     libavutil      55. 11.100 / 55. 11.100
     libavcodec     57. 20.100 / 57. 20.100
     libavformat    57. 20.100 / 57. 20.100
     libavdevice    57.  0.100 / 57.  0.100
     libavfilter     6. 21.101 /  6. 21.101
     libavresample   3.  0.  0 /  3.  0.  0
     libswscale      4.  0.100 /  4.  0.100
     libswresample   2.  0.101 /  2.  0.101
     libpostproc    54.  0.100 / 54.  0.100

    ff error: Input #0, x11grab, from ':0.0':
     Duration: N/A, start: 1451414448.216650, bitrate: N/A
       Stream #0:0: Video: rawvideo (BGR[0] / 0x524742), bgr0, 1366x768, 29.97 fps, 29.97 tbr, 1000k tbn,
    ff error: 29.97 tbc

    ff error: [swscaler @ 0x34238a0] deprecated pixel format used, make sure you did set range correctly

    ff error: Output #0, mjpeg, to 'pipe:1':
     Metadata:
       encoder         :
    ff error: Lavf57.20.100
       Stream #0:0: Video: mjpeg, yuvj444p(pc), 1366x768, q=2-31, 200 kb/s, 30 fps, 30 tbn, 30 tbc
       Metadata:
         encoder         : Lavc57.20.100 mjpeg
       Side data:
         unknown side data type 10 (24 bytes)
    Stream mapping:
     Stream #0:0 -> #0:0 (rawvideo (native) -> mjpeg (native))
    Press [q] to stop, [?] for help

    ff error: [swscaler @ 0x34238a0] Warning: data is not aligned! This can lead to a speedloss

    Data size: 65536
    Data size: 65536
    Data size: 21413
    Data size: 65536
    Data size: 65536
    Data size: 45581
    Data size: 65536
    Data size: 65536
    Data size: 62377
    Data size: 65536
    Data size: 65536
    Data size: 45581
    Data size: 65536
    Data size: 65536
    Data size: 21413
    Data size: 65536
    Data size: 60933
    Data size: 65536
    Data size: 49550
    Data size: 65536
    Data size: 36709
    Data size: 65536
    Data size: 27035
    Data size: 65536
    Data size: 20131
    Data size: 65536
    Data size: 15887
    Data size: 65536
    Data size: 15887
    Data size: 65536
    Data size: 15887
    Data size: 65536
    Data size: 15911
    Data size: 65536
    Data size: 15911
    Data size: 65536
    Data size: 15911
    ff error: frame=   16 fps=0.0 q=24.8 size=    1819kB time=00:00:00.53 bitrate=27935.6kbits/s speed=1.04x    
    Data size: 65536
    Data size: 15911
    Data size: 65536
    Data size: 15911
    Data size: 65536
    Data size: 15919
    Data size: 65536
    Data size: 15919
    Data size: 65536
    Data size: 15919
    Data size: 65536
    Data size: 15919
    Data size: 65536
    Data size: 15919
    Data size: 65536
    Data size: 15911
    Data size: 65536
    Data size: 15911
    Data size: 65536
    Data size: 15906
    Data size: 65536
    Data size: 15906
    Data size: 65536
    Data size: 15917
    Data size: 65536
    Data size: 15999
    Data size: 65536
    Data size: 15949
    Data size: 65536
    Data size: 15997
    Data size: 65536
    Data size: 15965
    ff error: frame=   32 fps= 30 q=24.8 size=    3092kB time=00:00:01.06 bitrate=23743.7kbits/s speed=1.01x    
    Data size: 65536
    Data size: 16025
    Data size: 65536
    Data size: 15978
    Data size: 65536
    Data size: 15963
    Data size: 65536
    Data size: 16028
    Data size: 65536
    Data size: 15976
    Data size: 65536
    Data size: 15958
    Data size: 65536
    Data size: 15940
    Data size: 65536
    Data size: 15992
    Data size: 65536
    Data size: 15962
    Data size: 65536
    Data size: 16010
    Data size: 65536
    Data size: 15941
    Data size: 65536
    Data size: 15941
    Data size: 65536
    Data size: 15973
    Data size: 65536
    Data size: 15943
    Data size: 65536
    Data size: 15947
    Data size: 65536
    Data size: 15947
    ff error: frame=   48 fps= 30 q=24.8 size=    4365kB time=00:00:01.60 bitrate=22349.6kbits/s speed=1.01x    
    Data size: 65536
    Data size: 15982
    Data size: 65536
    Data size: 15982
    Data size: 65536
    Data size: 15956
    Data size: 65536
    Data size: 15956
    Data size: 65536
    Data size: 15956
    Data size: 65536
    Data size: 16001
    Data size: 65536
    Data size: 15930
    Data size: 65536
    Data size: 15922
    Data size: 65536
    Data size: 15924
    Data size: 65536
    Data size: 15924
    Data size: 65536
    Data size: 15924
    Data size: 65536
    Data size: 15924
    Data size: 65536
    Data size: 15911
    Data size: 65536
    Data size: 15924
    Data size: 65536
    Data size: 15985
    Data size: 65536
    Data size: 15985
    ff error: frame=   64 fps= 30 q=24.8 size=    5638kB time=00:00:02.13 bitrate=21651.3kbits/s speed=1.01x    
    Data size: 65536
    Data size: 15985
    Data size: 65536
    Data size: 15924
    Data size: 65536
    Data size: 15976
    Data size: 65536
    Data size: 15976
    Data size: 65536
    Data size: 15958
    Data size: 65536
    Data size: 16319
    Data size: 65536
    Data size: 16558
    Data size: 65536
    Data size: 16576
    Data size: 65536
    Data size: 16564
    Data size: 65536
    Data size: 16582
    Data size: 65536
    Data size: 16589
    Data size: 65536
    Data size: 16587
    Data size: 65536
    Data size: 16446
    Data size: 65536
    Data size: 16450
    Data size: 65536
    Data size: 16450
    Data size: 65536
    Data size: 16450
    ff error: frame=   80 fps= 30 q=24.8 size=    6918kB time=00:00:02.66 bitrate=21251.0kbits/s speed=1.01x    
    Data size: 65536
    Data size: 16568
    Data size: 65536
    Data size: 16575
    Data size: 65536
    Data size: 16585
    Data size: 65536
    Data size: 18182
    Data size: 65536
    Data size: 17203
    Data size: 65536
    Data size: 16769
    Data size: 65536
    Data size: 16734
    Data size: 65536
    Data size: 16823
    Data size: 65536
    Data size: 16338
    Data size: 65536
    Data size: 16455
    Data size: 65536
    Data size: 16406
    Data size: 65536
    Data size: 16645
    Data size: 65536
    Data size: 16800
    Data size: 65536
    Data size: 16800
    Data size: 65536
    Data size: 16800
    Data size: 65536
    Data size: 16806
    ff error: frame=   96 fps= 30 q=24.8 size=    8204kB time=00:00:03.20 bitrate=21001.8kbits/s speed=   1x    
    Data size: 65536
    Data size: 16795
    Data size: 65536
    Data size: 16804
    Data size: 65536
    Data size: 16770
    Data size: 65536
    Data size: 16760
    Data size: 65536
    Data size: 16813
    Data size: 65536
    Data size: 16445
    Data size: 65536
    Data size: 16259
    Data size: 65536
    Data size: 16260
    Data size: 65536
    Data size: 16265
    Data size: 65536
    Data size: 16284
    Data size: 65536
    Data size: 16233
    Data size: 65536
    Data size: 16233
    Data size: 65536
    Data size: 16182
    Data size: 65536
    Data size: 16058
    Data size: 60561
    ff error: frame=  111 fps= 30 q=24.8 size=    9384kB time=00:00:03.70 bitrate=20776.1kbits/s speed=   1x    
    Data size: 61813
    Data size: 61813
    Data size: 61813
    Data size: 61813
    Data size: 61813
    Data size: 61781
    Data size: 61784
    Data size: 61796
    Data size: 61842
    Data size: 61839
    Data size: 61793
    Data size: 61810
    Data size: 61844
    Data size: 61844
    Data size: 61850
    Data size: 61841
    ff error: frame=  127 fps= 30 q=24.8 size=   10350kB time=00:00:04.23 bitrate=20027.8kbits/s speed=   1x    
    Data size: 61858
    Data size: 61853
    Data size: 61833
    Data size: 61867
    Data size: 61867
    Data size: 61867
    Data size: 61867
    Data size: 61867
    Data size: 61867
    Data size: 61867
    Data size: 61867
    Data size: 61867
    Data size: 61867
    Data size: 61867
    Data size: 61867
    ff error: frame=  142 fps= 30 q=24.8 size=   11256kB time=00:00:04.73 bitrate=19480.5kbits/s speed=   1x    
    Data size: 61867
    Data size: 61867
    Data size: 61867
    Data size: 61867
    Data size: 61867
    Data size: 61867
    Data size: 61867
    Data size: 61867
    Data size: 61867
    Data size: 61867
    Data size: 61867
    Data size: 61867
    Data size: 61867
    Data size: 61867
    Data size: 61867
    Data size: 61867
    ff error: frame=  158 fps= 30 q=24.8 size=   12223kB time=00:00:05.26 bitrate=19011.4kbits/s speed=   1x    
    Data size: 61867
    Data size: 61867
    Data size: 61867
    Data size: 61867
    Data size: 61867
    Data size: 61867
    Data size: 61867
    Data size: 61867
    Data size: 61867
    Data size: 61867
    Data size: 61850
    Data size: 61850
    Data size: 61850
    Data size: 61850
    Data size: 61850
    ff error: frame=  173 fps= 30 q=24.8 size=   13129kB time=00:00:05.76 bitrate=18650.3kbits/s speed=   1x    
    Data size: 61850
    Data size: 61850
    Data size: 61850
    Data size: 61850
    Data size: 61850
    Data size: 61850
    Data size: 61850
    Data size: 61850
    Data size: 61850
    Data size: 61850
    Data size: 61850
    Data size: 61850
    Data size: 61850
    Data size: 61850
    Data size: 61850
    ff error: frame=  188 fps= 30 q=24.8 size=   14035kB time=00:00:06.26 bitrate=18346.6kbits/s speed=   1x    
    Data size: 61850
    Data size: 61850
    Data size: 61850
    Data size: 61850
    Data size: 61850
    Data size: 61850
    Data size: 61850
    Data size: 61850
    Data size: 61850
    Data size: 61850
    Data size: 61850
    Data size: 61850
    Data size: 61850
    Data size: 61850
    Data size: 61850
    ff error: frame=  203 fps= 30 q=24.8 size=   14941kB time=00:00:06.76 bitrate=18087.8kbits/s speed=   1x    
    Data size: 61850
    Data size: 61850
    Data size: 61850
    Data size: 61850
    Data size: 61850
    Data size: 61850
    Data size: 61850
    Data size: 61850
    Data size: 61850
    Data size: 61850
    Data size: 61850
    Data size: 61850
    Data size: 61850
    Data size: 61850
    Data size: 61850
    Data size: 61850
    ff error: frame=  219 fps= 30 q=24.8 size=   15907kB time=00:00:07.30 bitrate=17850.8kbits/s speed=   1x    
    Data size: 61850
    Data size: 61850
    Data size: 61850
    Data size: 61850
    Data size: 61850
    Data size: 61850
    Data size: 61850
    Data size: 61850
    Data size: 61850
    Data size: 61850
    Data size: 61850
    Data size: 61850
    Data size: 61850
    Data size: 61850
    Data size: 61850
    ff error: frame=  234 fps= 30 q=24.8 size=   16813kB time=00:00:07.80 bitrate=17658.1kbits/s speed=   1x    
    Data size: 61850
    Data size: 61850
    Data size: 61850
    Data size: 61850
    Data size: 61850
    Data size: 61850
    Data size: 61850
    Data size: 61850
    Data size: 61850
    Data size: 61850
    Data size: 61850
    Data size: 61850
    Data size: 61850
    Data size: 61850
    Data size: 61850
    Data size: 61850
    ff error: frame=  250 fps= 30 q=24.8 size=   17780kB time=00:00:08.33 bitrate=17478.0kbits/s speed=   1x    
    Data size: 61850
    Data size: 61712
    Data size: 61712
    Data size: 61712
    Data size: 61712
    Data size: 61712
    Data size: 61712
    Data size: 60638
    Data size: 60638
    Data size: 60638
    Data size: 60638
    Data size: 60638
    Data size: 60638
    Data size: 60638
    Data size: 60638
    ff error: frame=  265 fps= 30 q=24.8 size=   18675kB time=00:00:08.83 bitrate=17319.4kbits/s speed=   1x    
    Data size: 60638
    Data size: 60638
    Data size: 60638
    Data size: 60638
    Data size: 60638
    Data size: 60638
    Data size: 60638
    Data size: 60638
    Data size: 60638
    Data size: 60638
    Data size: 60638
    Data size: 60638
    Data size: 60638
    Data size: 60638
    Data size: 60638
    ff error: frame=  280 fps= 30 q=24.8 size=   19563kB time=00:00:09.33 bitrate=17171.2kbits/s speed=   1x    
    Data size: 60638
    Data size: 60638
    Data size: 60638
    Data size: 60638
    Data size: 60638
    Data size: 60638
    Data size: 60638
    Data size: 60638
    Data size: 60638
    Data size: 60638
    Data size: 60638
    Data size: 60638
    Data size: 60638
    Data size: 60638
    Data size: 60638
    ff error: frame=  295 fps= 30 q=24.8 size=   20452kB time=00:00:09.83 bitrate=17038.0kbits/s speed=   1x    
    Data size: 60638
    Data size: 60638
    Data size: 60638
    Data size: 60638
    Data size: 60638
    ff error: frame=  300 fps= 30 q=24.8 Lsize=   20748kB time=00:00:10.00 bitrate=16996.6kbits/s speed=0.998x    
    video:20748kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.000000%

    Stream end

    The error messages are weird too, but not the biggest problem for now, so let’s omit them.

    Looking at all the data coming from ffmpeg I assume that the images are coming as a single stream without any separation. I don’t think that looking into binary data and seeking for certain flag bytes is a good idea to solve the problem and separate the images. The command line I mentioned in the top of the post does separate writes to hard drive that means it produces separate writable streams per each screenshot. And it doesn’t do so for a spawned process from nodejs.

    What am I missing ?

  • FFMPEG extract h264 video (can't see video)

    28 décembre 2015, par Marco Ronchi

    I’m trying to extract a portion of video from another video with FFMPEG. I use this command line :

    ffmpeg -i C:\Temp\test.avi -ss 00:00:30.0 -c copy -t 00:00:10.0 C:\Temp\out.avi

    and this is the output messages :

    ffmpeg version N-77504-gbaf4c48 Copyright (c) 2000-2015 the FFmpeg developers
     built with gcc 5.2.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-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libopus --enable-librtmp --enable-libschroedinger --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvo-aacenc --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. 11.100 / 55. 11.100
     libavcodec     57. 20.100 / 57. 20.100
     libavformat    57. 20.100 / 57. 20.100
     libavdevice    57.  0.100 / 57.  0.100
     libavfilter     6. 22.100 /  6. 22.100
     libswscale      4.  0.100 /  4.  0.100
     libswresample   2.  0.101 /  2.  0.101
     libpostproc    54.  0.100 / 54.  0.100
    [h264 @ 0000024bf533c6c0] illegal aspect ratio
    [h264 @ 0000024bf533c6c0] AVC: nal size 1296048104
    [h264 @ 0000024bf533c6c0] missing picture in access unit with size 4382
    [h264 @ 0000024bf533c6c0] illegal reordering_of_pic_nums_idc 13
       Last message repeated 18 times
    Input #0, avi, from 'C:\Temp\test.avi':
     Metadata:
       encoder         : Lavf56.25.101
     Duration: 00:01:51.48, start: 0.000000, bitrate: 864 kb/s
       Stream #0:0: Video: h264 (Main) (H264 / 0x34363248), yuv420p, 854x480 [SAR 1:1 DAR 427:240], 719 kb/s, 59.94 fps, 29.97 tbr, 59.94 tbn, 59.94 tbc
       Stream #0:1: Audio: aac (LC) ([255][0][0][0] / 0x00FF), 44100 Hz, stereo, fltp, 125 kb/s
    Output #0, avi, to 'C:\Temp\out.avi':
     Metadata:
       ISFT            : Lavf57.20.100
       Stream #0:0: Video: h264 (H264 / 0x34363248), yuv420p, 854x480 [SAR 1:1 DAR 427:240], q=2-31, 719 kb/s, 59.94 fps, 29.97 tbr, 59.94 tbn, 59.94 tbc
       Stream #0:1: Audio: aac ([255][0][0][0] / 0x00FF), 44100 Hz, stereo, 125 kb/s
    Stream mapping:
     Stream #0:0 -> #0:0 (copy)
     Stream #0:1 -> #0:1 (copy)
    Press [q] to stop, [?] for help
    [NULL @ 0000024bf533c6c0] illegal reordering_of_pic_nums_idc 13
       Last message repeated 11 times
    [NULL @ 0000024bf533c6c0] AVC: nal size 100779136
    [NULL @ 0000024bf533c6c0] missing picture in access unit with size 22411
    [NULL @ 0000024bf533c6c0] illegal reordering_of_pic_nums_idc 13
       Last message repeated 25 times
    [NULL @ 0000024bf533c6c0] AVC: nal size 100779136
    [NULL @ 0000024bf533c6c0] missing picture in access unit with size 41687
    [NULL @ 0000024bf533c6c0] illegal reordering_of_pic_nums_idc 13
       Last message repeated 16 times
    [NULL @ 0000024bf533c6c0] illegal aspect ratio
    [NULL @ 0000024bf533c6c0] AVC: nal size 1296048104
    [NULL @ 0000024bf533c6c0] missing picture in access unit with size 44957
    [NULL @ 0000024bf533c6c0] illegal reordering_of_pic_nums_idc 13
       Last message repeated 20 times
    [NULL @ 0000024bf533c6c0] AVC: nal size 100779136
    [NULL @ 0000024bf533c6c0] missing picture in access unit with size 63683
    [NULL @ 0000024bf533c6c0] illegal reordering_of_pic_nums_idc 13
       Last message repeated 39 times
    [NULL @ 0000024bf533c6c0] AVC: nal size 100779136
    [NULL @ 0000024bf533c6c0] missing picture in access unit with size 39072
    [NULL @ 0000024bf533c6c0] illegal reordering_of_pic_nums_idc 13
       Last message repeated 32 times
    [NULL @ 0000024bf533c6c0] illegal aspect ratio
    [NULL @ 0000024bf533c6c0] AVC: nal size 1296048104
    [NULL @ 0000024bf533c6c0] missing picture in access unit with size 31894
    [NULL @ 0000024bf533c6c0] illegal reordering_of_pic_nums_idc 13
       Last message repeated 37 times
    [NULL @ 0000024bf533c6c0] AVC: nal size 100779136
    [NULL @ 0000024bf533c6c0] missing picture in access unit with size 44447
    [NULL @ 0000024bf533c6c0] illegal reordering_of_pic_nums_idc 13
       Last message repeated 19 times
    [NULL @ 0000024bf533c6c0] AVC: nal size 100779136
    [NULL @ 0000024bf533c6c0] missing picture in access unit with size 29614
    [NULL @ 0000024bf533c6c0] illegal reordering_of_pic_nums_idc 13
       Last message repeated 20 times
    [NULL @ 0000024bf533c6c0] illegal aspect ratio
    [NULL @ 0000024bf533c6c0] AVC: nal size 1296048104
    [NULL @ 0000024bf533c6c0] missing picture in access unit with size 33664
    [NULL @ 0000024bf533c6c0] illegal reordering_of_pic_nums_idc 13
       Last message repeated 20 times
    [NULL @ 0000024bf533c6c0] AVC: nal size 100779136
    [NULL @ 0000024bf533c6c0] missing picture in access unit with size 26399
    [NULL @ 0000024bf533c6c0] illegal reordering_of_pic_nums_idc 13
       Last message repeated 23 times
    frame=    0 fps=0.0 q=-1.0 size=      10kB time=00:00:02.02 bitrate=  39.7kbits/[NULL @ 0000024bf533c6c0] illegal reordering_of_pic_nums_idc 13
       Last message repeated 44 times
    [NULL @ 0000024bf533c6c0] AVC: nal size 100779136
    [NULL @ 0000024bf533c6c0] missing picture in access unit with size 58844
    [NULL @ 0000024bf533c6c0] illegal reordering_of_pic_nums_idc 13
       Last message repeated 3 times
    [NULL @ 0000024bf533c6c0] illegal aspect ratio
    [NULL @ 0000024bf533c6c0] AVC: nal size 1296048104
    [NULL @ 0000024bf533c6c0] missing picture in access unit with size 72293
    [NULL @ 0000024bf533c6c0] illegal reordering_of_pic_nums_idc 13
       Last message repeated 92 times
    [NULL @ 0000024bf533c6c0] AVC: nal size 100779136
    [NULL @ 0000024bf533c6c0] missing picture in access unit with size 40496
    [NULL @ 0000024bf533c6c0] illegal reordering_of_pic_nums_idc 13
       Last message repeated 10 times
    [NULL @ 0000024bf533c6c0] AVC: nal size 100779136
    [NULL @ 0000024bf533c6c0] missing picture in access unit with size 47336
    [NULL @ 0000024bf533c6c0] illegal reordering_of_pic_nums_idc 13
       Last message repeated 19 times
    [NULL @ 0000024bf533c6c0] illegal aspect ratio
    [NULL @ 0000024bf533c6c0] AVC: nal size 1296048104
    [NULL @ 0000024bf533c6c0] missing picture in access unit with size 46490
    [NULL @ 0000024bf533c6c0] illegal reordering_of_pic_nums_idc 13
       Last message repeated 45 times
    [NULL @ 0000024bf533c6c0] AVC: nal size 100779136
    [NULL @ 0000024bf533c6c0] missing picture in access unit with size 59161
    [NULL @ 0000024bf533c6c0] illegal reordering_of_pic_nums_idc 13
       Last message repeated 43 times
    [NULL @ 0000024bf533c6c0] AVC: nal size 100779136
    [NULL @ 0000024bf533c6c0] missing picture in access unit with size 30588
    [NULL @ 0000024bf533c6c0] illegal reordering_of_pic_nums_idc 13
       Last message repeated 6 times
    [NULL @ 0000024bf533c6c0] illegal aspect ratio
    [NULL @ 0000024bf533c6c0] AVC: nal size 1296048104
    [NULL @ 0000024bf533c6c0] missing picture in access unit with size 35601
    [NULL @ 0000024bf533c6c0] illegal reordering_of_pic_nums_idc 13
       Last message repeated 4 times
    frame=    0 fps=0.0 q=-1.0 size=      10kB time=00:00:02.02 bitrate=  39.7kbits/[NULL @ 0000024bf533c6c0] illegal reordering_of_pic_nums_idc 13
       Last message repeated 21 times
    [NULL @ 0000024bf533c6c0] AVC: nal size 100779136
    [NULL @ 0000024bf533c6c0] missing picture in access unit with size 42018
    [NULL @ 0000024bf533c6c0] illegal reordering_of_pic_nums_idc 13
       Last message repeated 28 times
    [NULL @ 0000024bf533c6c0] AVC: nal size 100779136
    [NULL @ 0000024bf533c6c0] missing picture in access unit with size 55838
    [NULL @ 0000024bf533c6c0] illegal reordering_of_pic_nums_idc 13
       Last message repeated 25 times
    [NULL @ 0000024bf533c6c0] AVC: nal size 100779136
    [NULL @ 0000024bf533c6c0] missing picture in access unit with size 17035
    [NULL @ 0000024bf533c6c0] illegal reordering_of_pic_nums_idc 13
    [NULL @ 0000024bf533c6c0] illegal aspect ratio
    [NULL @ 0000024bf533c6c0] AVC: nal size 1296048104
    [NULL @ 0000024bf533c6c0] missing picture in access unit with size 21226
    [NULL @ 0000024bf533c6c0] illegal reordering_of_pic_nums_idc 13
       Last message repeated 17 times
    [NULL @ 0000024bf533c6c0] AVC: nal size 100779136
    [NULL @ 0000024bf533c6c0] missing picture in access unit with size 44613
    [NULL @ 0000024bf533c6c0] illegal reordering_of_pic_nums_idc 13
       Last message repeated 48 times
    [NULL @ 0000024bf533c6c0] AVC: nal size 100779136
    [NULL @ 0000024bf533c6c0] missing picture in access unit with size 29342
    [NULL @ 0000024bf533c6c0] illegal reordering_of_pic_nums_idc 13
       Last message repeated 8 times
    [NULL @ 0000024bf533c6c0] illegal aspect ratio
    [NULL @ 0000024bf533c6c0] AVC: nal size 1296048104
    [NULL @ 0000024bf533c6c0] missing picture in access unit with size 30664
    [NULL @ 0000024bf533c6c0] illegal reordering_of_pic_nums_idc 13
       Last message repeated 32 times
    [NULL @ 0000024bf533c6c0] AVC: nal size 100779136
    [NULL @ 0000024bf533c6c0] missing picture in access unit with size 67394
    [NULL @ 0000024bf533c6c0] illegal reordering_of_pic_nums_idc 13
       Last message repeated 57 times
    frame=    0 fps=0.0 q=-1.0 size=      10kB time=00:00:02.02 bitrate=  39.7kbits/[NULL @ 0000024bf533c6c0] illegal reordering_of_pic_nums_idc 13
       Last message repeated 4 times
    [NULL @ 0000024bf533c6c0] AVC: nal size 100779136
    [NULL @ 0000024bf533c6c0] missing picture in access unit with size 35793
    [NULL @ 0000024bf533c6c0] illegal reordering_of_pic_nums_idc 13
       Last message repeated 7 times
    [NULL @ 0000024bf533c6c0] illegal aspect ratio
    [NULL @ 0000024bf533c6c0] AVC: nal size 1296048104
    [NULL @ 0000024bf533c6c0] missing picture in access unit with size 38809
    [NULL @ 0000024bf533c6c0] illegal reordering_of_pic_nums_idc 13
       Last message repeated 12 times
    [NULL @ 0000024bf533c6c0] AVC: nal size 100779136
    [NULL @ 0000024bf533c6c0] missing picture in access unit with size 63104
    [NULL @ 0000024bf533c6c0] illegal reordering_of_pic_nums_idc 13
       Last message repeated 35 times
    [NULL @ 0000024bf533c6c0] AVC: nal size 100779136
    [NULL @ 0000024bf533c6c0] missing picture in access unit with size 39476
    [NULL @ 0000024bf533c6c0] illegal reordering_of_pic_nums_idc 13
       Last message repeated 30 times
    [NULL @ 0000024bf533c6c0] AVC: nal size 100779136
    [NULL @ 0000024bf533c6c0] missing picture in access unit with size 27844
    [NULL @ 0000024bf533c6c0] illegal reordering_of_pic_nums_idc 13
       Last message repeated 2 times
    [NULL @ 0000024bf533c6c0] illegal aspect ratio
    [NULL @ 0000024bf533c6c0] AVC: nal size 1296048104
    [NULL @ 0000024bf533c6c0] missing picture in access unit with size 31435
    [NULL @ 0000024bf533c6c0] illegal reordering_of_pic_nums_idc 13
       Last message repeated 20 times
    [NULL @ 0000024bf533c6c0] AVC: nal size 100779136
    [NULL @ 0000024bf533c6c0] missing picture in access unit with size 40483
    [NULL @ 0000024bf533c6c0] illegal reordering_of_pic_nums_idc 13
       Last message repeated 29 times
    [NULL @ 0000024bf533c6c0] AVC: nal size 100779136
    [NULL @ 0000024bf533c6c0] missing picture in access unit with size 29305
    [NULL @ 0000024bf533c6c0] illegal reordering_of_pic_nums_idc 13
       Last message repeated 12 times
    [NULL @ 0000024bf533c6c0] illegal aspect ratio
    [NULL @ 0000024bf533c6c0] AVC: nal size 1296048104
    [NULL @ 0000024bf533c6c0] missing picture in access unit with size 34270
    [NULL @ 0000024bf533c6c0] illegal reordering_of_pic_nums_idc 13
       Last message repeated 25 times
    [NULL @ 0000024bf533c6c0] AVC: nal size 100779136
    [NULL @ 0000024bf533c6c0] missing picture in access unit with size 74136
    [NULL @ 0000024bf533c6c0] illegal reordering_of_pic_nums_idc 13
       Last message repeated 53 times
    [NULL @ 0000024bf533c6c0] AVC: nal size 100779136
    [NULL @ 0000024bf533c6c0] missing picture in access unit with size 63513
    [NULL @ 0000024bf533c6c0] illegal reordering_of_pic_nums_idc 13
       Last message repeated 8 times
    frame=    0 fps=0.0 q=-1.0 size=      10kB time=00:00:02.02 bitrate=  39.7kbits/[NULL @ 0000024bf533c6c0] illegal reordering_of_pic_nums_idc 13
       Last message repeated 29 times
    [NULL @ 0000024bf533c6c0] AVC: nal size 100779136
    [NULL @ 0000024bf533c6c0] missing picture in access unit with size 45954
    [NULL @ 0000024bf533c6c0] illegal reordering_of_pic_nums_idc 13
       Last message repeated 3 times
    [NULL @ 0000024bf533c6c0] illegal aspect ratio
    [NULL @ 0000024bf533c6c0] AVC: nal size 1296048104
    [NULL @ 0000024bf533c6c0] missing picture in access unit with size 52952
    [NULL @ 0000024bf533c6c0] illegal reordering_of_pic_nums_idc 13
       Last message repeated 20 times
    [NULL @ 0000024bf533c6c0] AVC: nal size 100779136
    [NULL @ 0000024bf533c6c0] missing picture in access unit with size 78552
    [NULL @ 0000024bf533c6c0] illegal reordering_of_pic_nums_idc 13
       Last message repeated 39 times
    [NULL @ 0000024bf533c6c0] AVC: nal size 100779136
    [NULL @ 0000024bf533c6c0] missing picture in access unit with size 33986
    [NULL @ 0000024bf533c6c0] illegal reordering_of_pic_nums_idc 13
       Last message repeated 27 times
    [NULL @ 0000024bf533c6c0] illegal aspect ratio
    [NULL @ 0000024bf533c6c0] AVC: nal size 1296048104
    [NULL @ 0000024bf533c6c0] missing picture in access unit with size 32874
    [NULL @ 0000024bf533c6c0] illegal reordering_of_pic_nums_idc 13
       Last message repeated 70 times
    [NULL @ 0000024bf533c6c0] AVC: nal size 100779136
    [NULL @ 0000024bf533c6c0] missing picture in access unit with size 63801
    [NULL @ 0000024bf533c6c0] illegal reordering_of_pic_nums_idc 13
       Last message repeated 12 times
    [NULL @ 0000024bf533c6c0] illegal aspect ratio
    [NULL @ 0000024bf533c6c0] AVC: nal size 1296048104
    [NULL @ 0000024bf533c6c0] missing picture in access unit with size 78008
    [NULL @ 0000024bf533c6c0] illegal reordering_of_pic_nums_idc 13
       Last message repeated 44 times
    [NULL @ 0000024bf533c6c0] AVC: nal size 100779136
    [NULL @ 0000024bf533c6c0] missing picture in access unit with size 21138
    [NULL @ 0000024bf533c6c0] illegal reordering_of_pic_nums_idc 13
       Last message repeated 20 times
    frame=    0 fps=0.0 q=-1.0 size=      10kB time=00:00:02.02 bitrate=  39.7kbits/[NULL @ 0000024bf533c6c0] illegal reordering_of_pic_nums_idc 13
       Last message repeated 17 times
    [NULL @ 0000024bf533c6c0] AVC: nal size 100779136
    [NULL @ 0000024bf533c6c0] missing picture in access unit with size 63108
    [NULL @ 0000024bf533c6c0] illegal reordering_of_pic_nums_idc 13
       Last message repeated 8 times
    [NULL @ 0000024bf533c6c0] illegal aspect ratio
    [NULL @ 0000024bf533c6c0] AVC: nal size 1296048104
    [NULL @ 0000024bf533c6c0] missing picture in access unit with size 57850
    [NULL @ 0000024bf533c6c0] illegal reordering_of_pic_nums_idc 13
       Last message repeated 43 times
    [NULL @ 0000024bf533c6c0] AVC: nal size 100779136
    [NULL @ 0000024bf533c6c0] missing picture in access unit with size 20832
    [NULL @ 0000024bf533c6c0] illegal reordering_of_pic_nums_idc 13
       Last message repeated 37 times
    [NULL @ 0000024bf533c6c0] AVC: nal size 100779136
    [NULL @ 0000024bf533c6c0] missing picture in access unit with size 32282
    [NULL @ 0000024bf533c6c0] illegal reordering_of_pic_nums_idc 13
       Last message repeated 12 times
    [NULL @ 0000024bf533c6c0] illegal aspect ratio
    [NULL @ 0000024bf533c6c0] AVC: nal size 1296048104
    [NULL @ 0000024bf533c6c0] missing picture in access unit with size 38413
    [NULL @ 0000024bf533c6c0] illegal reordering_of_pic_nums_idc 13
       Last message repeated 46 times
    [NULL @ 0000024bf533c6c0] AVC: nal size 100779136
    [NULL @ 0000024bf533c6c0] missing picture in access unit with size 24824
    [NULL @ 0000024bf533c6c0] illegal reordering_of_pic_nums_idc 13
       Last message repeated 24 times
    [NULL @ 0000024bf533c6c0] illegal aspect ratio
    [NULL @ 0000024bf533c6c0] AVC: nal size 1296048104
    [NULL @ 0000024bf533c6c0] missing picture in access unit with size 31691
    [NULL @ 0000024bf533c6c0] illegal reordering_of_pic_nums_idc 13
       Last message repeated 57 times
    [NULL @ 0000024bf533c6c0] AVC: nal size 100779136
    [NULL @ 0000024bf533c6c0] missing picture in access unit with size 25181
    [NULL @ 0000024bf533c6c0] illegal reordering_of_pic_nums_idc 13
       Last message repeated 14 times
    frame=    0 fps=0.0 q=-1.0 size=      10kB time=00:00:02.02 bitrate=  39.7kbits/[NULL @ 0000024bf533c6c0] illegal reordering_of_pic_nums_idc 13
       Last message repeated 16 times
    [NULL @ 0000024bf533c6c0] illegal aspect ratio
    [NULL @ 0000024bf533c6c0] AVC: nal size 1296048104
    [NULL @ 0000024bf533c6c0] missing picture in access unit with size 11491
    [NULL @ 0000024bf533c6c0] illegal reordering_of_pic_nums_idc 13
       Last message repeated 79 times
    [NULL @ 0000024bf533c6c0] illegal aspect ratio
    [NULL @ 0000024bf533c6c0] AVC: nal size 1296048104
    [NULL @ 0000024bf533c6c0] missing picture in access unit with size 65374
    [NULL @ 0000024bf533c6c0] illegal reordering_of_pic_nums_idc 13
       Last message repeated 74 times
    [NULL @ 0000024bf533c6c0] AVC: nal size 100779136
    [NULL @ 0000024bf533c6c0] missing picture in access unit with size 18231
    [NULL @ 0000024bf533c6c0] illegal reordering_of_pic_nums_idc 13
       Last message repeated 1 times
    [NULL @ 0000024bf533c6c0] illegal aspect ratio
    [NULL @ 0000024bf533c6c0] AVC: nal size 1296048104
    [NULL @ 0000024bf533c6c0] missing picture in access unit with size 17750
    [NULL @ 0000024bf533c6c0] illegal reordering_of_pic_nums_idc 13
       Last message repeated 62 times
    frame=    0 fps=0.0 q=-1.0 Lsize=      43kB time=00:00:02.02 bitrate= 173.8kbits/s speed= 0.6x
    video:0kB audio:31kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 38.359665%

    The audio was extracted correctly, but I can’t see video (it’s all black). Can someone help me ?

    Thanks in advance

  • Video frame difference with FFMPEG

    27 décembre 2015, par StepTNT

    I need to compute the frame differences between a source video and a compressed one.
    For now I’m using OpenCV with Java, by extracting each frame and doing a simple difference, but it’s quite slow (working a 0.5 fps, meaning that a 500 frames video will take more than 15 mins) so I was thinking to move to FFMPEG.

    FFMPEG feels a lot faster (everything’s done under 1 minute) but it has one big issue that makes the results useless : when compressing the source file, done with FFMPEG too, an extra gray frame is added at the beginning and this fakes the results because different frames are compared.

    This is what I’m doing now (knowing that the extra frame messes it all) :

    ffmpeg -y -i src.avi -i compressed.avi -filter_complex "blend=all_mode=difference,hue=s=0" -c:v libx264 -crf 18 -c:a copy difference.avi

    To fix the frame issue I was trying to remove the first frame by re-encoding the compressed video with this command

    ffmpeg -y -ss 0.02 -i compressed.mpg -an -f mpeg2video compressed-cut.mpg"

    (Note that -ss is 0.02 because it’s a 50 fps video, so I did 1/FPS as suggested here)

    But I get this response

    Output file is empty, nothing was encoded (check -ss / -t / -frames parameters if used)

    So, finally, the question is : since extracting all the frames and then compute differences with OpenCV is really slow, how can I use FFMPEG to produce a video containing the difference between two sources while keeping in mind that one of them has an extra frame at the beginning ?

    EDIT : I wanted to avoid posting endless console outputs but since you asked for it, here we go.

    1) Encoding

    Input

    ffmpeg -i "720p50_mobcal_ter.avi" -an -f mpeg2video -y "720p50_mobcal_ter.mpg"

    Output

    ffmpeg version N-76684-g1fe82ab Copyright (c) 2000-2015 the FFmpeg developers
     built with gcc 5.2.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-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libopus --enable-librtmp --enable-libschroedinger --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvo-aacenc --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.  6.100 / 55.  6.100
     libavcodec     57. 15.100 / 57. 15.100
     libavformat    57. 14.100 / 57. 14.100
     libavdevice    57.  0.100 / 57.  0.100
     libavfilter     6. 15.100 /  6. 15.100
     libswscale      4.  0.100 /  4.  0.100
     libswresample   2.  0.101 /  2.  0.101
     libpostproc    54.  0.100 / 54.  0.100
    Input #0, avi, from '720p50_mobcal_ter.avi':
     Metadata:
       encoder         : Lavf57.14.100
     Duration: 00:00:10.08, start: 0.000000, bitrate: 552974 kb/s
       Stream #0:0: Video: rawvideo (I420 / 0x30323449), yuv420p, 1280x720, 554059 kb/s, SAR 1:1 DAR 16:9, 50 fps, 50 tbr, 50 tbn, 50 tbc
    Output #0, mpeg2video, to '720p50_mobcal_ter.mpg':
     Metadata:
       encoder         : Lavf57.14.100
       Stream #0:0: Video: mpeg2video, yuv420p, 1280x720 [SAR 1:1 DAR 16:9], q=2-31, 200 kb/s, 50 fps, 50 tbn, 50 tbc
       Metadata:
         encoder         : Lavc57.15.100 mpeg2video
    Stream mapping:
     Stream #0:0 -> #0:0 (rawvideo (native) -> mpeg2video (native))
    Press [q] to stop, [?] for help
    frame=   41 fps=0.0 q=31.0 size=     984kB time=00:00:00.78 bitrate=10330.5kbits/frame=   80 fps= 78 q=31.0 size=    1323kB time=00:00:01.56 bitrate=6948.1kbits/frame=  124 fps= 80 q=31.0 size=    1725kB time=00:00:02.44 bitrate=5790.0kbits/frame=  168 fps= 81 q=31.0 size=    2084kB time=00:00:03.32 bitrate=5142.8kbits/frame=  212 fps= 81 q=31.0 size=    2482kB time=00:00:04.20 bitrate=4841.4kbits/frame=  255 fps= 82 q=31.0 size=    2840kB time=00:00:05.06 bitrate=4597.2kbits/frame=  296 fps= 82 q=31.0 size=    3133kB time=00:00:05.88 bitrate=4364.5kbits/frame=  338 fps= 82 q=24.8 size=    3453kB time=00:00:06.72 bitrate=4209.2kbits/frame=  382 fps= 82 q=31.0 size=    3723kB time=00:00:07.60 bitrate=4013.4kbits/frame=  426 fps= 83 q=31.0 size=    4005kB time=00:00:08.48 bitrate=3869.1kbits/frame=  470 fps= 83 q=24.8 size=    4276kB time=00:00:09.36 bitrate=3742.5kbits/frame=  504 fps= 83 q=31.0 Lsize=    4469kB time=00:00:10.06 bitrate=3639.3kbits/s
    video:4469kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.000000%

    This adds the extra grey frame at the beginning, it just duplicates the first one

    2) Removing first frame

    Input

    ffmpeg -y -i "720p50_mobcal_ter.mpg" -an -f mpeg2video -vf select=gte(n\,1) "CUT-720p50_mobcal_ter.mpg"

    Output

    ffmpeg version N-76684-g1fe82ab Copyright (c) 2000-2015 the FFmpeg developers
     built with gcc 5.2.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-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libopus --enable-librtmp --enable-libschroedinger --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvo-aacenc --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.  6.100 / 55.  6.100
     libavcodec     57. 15.100 / 57. 15.100
     libavformat    57. 14.100 / 57. 14.100
     libavdevice    57.  0.100 / 57.  0.100
     libavfilter     6. 15.100 /  6. 15.100
     libswscale      4.  0.100 /  4.  0.100
     libswresample   2.  0.101 /  2.  0.101
     libpostproc    54.  0.100 / 54.  0.100
    Input #0, mpegvideo, from '720p50_mobcal_ter.mpg':
     Duration: N/A, bitrate: N/A
       Stream #0:0: Video: mpeg2video (Main), yuv420p(tv), 1280x720 [SAR 1:1 DAR 16:9], max. 104857 kb/s, 50 fps, 50 tbr, 1200k tbn, 100 tbc
    Output #0, mpeg2video, to 'CUT-720p50_mobcal_ter.mpg':
     Metadata:
       encoder         : Lavf57.14.100
       Stream #0:0: Video: mpeg2video, yuv420p, 1280x720 [SAR 1:1 DAR 16:9], q=2-31, 200 kb/s, 50 fps, 50 tbn, 50 tbc
       Metadata:
         encoder         : Lavc57.15.100 mpeg2video
    Stream mapping:
     Stream #0:0 -> #0:0 (mpeg2video (native) -> mpeg2video (native))
    Press [q] to stop, [?] for help
    frame=  255 fps=0.0 q=31.0 size=    2781kB time=00:00:05.10 bitrate=4467.3kbits/frame=  503 fps=0.0 q=31.0 Lsize=    4415kB time=00:00:10.08 bitrate=3588.5kbits/s
    video:4415kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.000000%

    3) Frame difference

    Input

    ffmpeg -y -i "720p50_mobcal_ter.avi" -i "CUT-720p50_mobcal_ter.mpg" -filter_complex "blend=all_mode=difference,hue=s=0" -c:v libx264 -crf 18 -c:a copy "DIFF-720p50_mobcal_ter.mpg"

    Output

    ffmpeg version N-76684-g1fe82ab Copyright (c) 2000-2015 the FFmpeg developers
     built with gcc 5.2.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-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libopus --enable-librtmp --enable-libschroedinger --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvo-aacenc --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.  6.100 / 55.  6.100
     libavcodec     57. 15.100 / 57. 15.100
     libavformat    57. 14.100 / 57. 14.100
     libavdevice    57.  0.100 / 57.  0.100
     libavfilter     6. 15.100 /  6. 15.100
     libswscale      4.  0.100 /  4.  0.100
     libswresample   2.  0.101 /  2.  0.101
     libpostproc    54.  0.100 / 54.  0.100
    Input #0, avi, from '720p50_mobcal_ter.avi':
     Metadata:
       encoder         : Lavf57.14.100
     Duration: 00:00:10.08, start: 0.000000, bitrate: 552974 kb/s
       Stream #0:0: Video: rawvideo (I420 / 0x30323449), yuv420p, 1280x720, 554059 kb/s, SAR 1:1 DAR 16:9, 50 fps, 50 tbr, 50 tbn, 50 tbc
    Input #1, mpegvideo, from 'CUT-720p50_mobcal_ter.mpg':
     Duration: N/A, bitrate: N/A
       Stream #1:0: Video: mpeg2video (Main), yuv420p(tv), 1280x720 [SAR 1:1 DAR 16:9], max. 104857 kb/s, 50 fps, 50 tbr, 1200k tbn, 100 tbc
    [libx264 @ 000002784dbeb980] using SAR=1/1
    [libx264 @ 000002784dbeb980] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX FMA3 AVX2 LZCNT BMI2
    [libx264 @ 000002784dbeb980] profile High, level 3.2
    [mpeg @ 000002784dbeaf20] VBV buffer size not set, using default size of 130KB
    If you want the mpeg file to be compliant to some specification
    Like DVD, VCD or others, make sure you set the correct buffer size
    Output #0, mpeg, to 'D:\DOWNLOADS\TMP\Video TDI\AVI\DIFF-720p50_mobcal_ter.mpg':
     Metadata:
       encoder         : Lavf57.14.100
       Stream #0:0: Video: h264 (libx264), yuv420p, 1280x720 [SAR 1:1 DAR 16:9], q=-1--1, 50 fps, 90k tbn, 50 tbc (default)
       Metadata:
         encoder         : Lavc57.15.100 libx264
    Stream mapping:
     Stream #0:0 (rawvideo) -> blend:top
     Stream #1:0 (mpeg2video) -> blend:bottom
     hue -> Stream #0:0 (libx264)
    Press [q] to stop, [?] for help
    frame=  504 fps= 39 q=-1.0 Lsize=   32182kB time=00:00:10.04 bitrate=26258.5kbits/s
    video:32061kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.377054%
    [libx264 @ 000002784dbeb980] frame I:30    Avg QP:19.69  size:149974
    [libx264 @ 000002784dbeb980] frame P:299   Avg QP:23.28  size: 69423
    [libx264 @ 000002784dbeb980] frame B:175   Avg QP:24.48  size: 43280
    [libx264 @ 000002784dbeb980] consecutive B-frames: 30.6% 69.4%  0.0%  0.0%
    [libx264 @ 000002784dbeb980] mb I  I16..4: 18.3% 51.4% 30.4%
    [libx264 @ 000002784dbeb980] mb P  I16..4:  0.6%  5.6%  2.4%  P16..4: 35.9% 22.9% 15.6%  0.0%  0.0%    skip:17.0%
    [libx264 @ 000002784dbeb980] mb B  I16..4:  0.2%  0.5%  0.3%  B16..8: 49.5% 12.4%  5.6%  direct:15.5%  skip:16.1%  L0:47.8% L1:42.1% BI:10.1%
    [libx264 @ 000002784dbeb980] 8x8 transform intra:57.5% inter:38.5%
    [libx264 @ 000002784dbeb980] coded y,uvDC,uvAC intra: 90.7% 0.0% 0.0% inter: 50.3% 0.0% 0.0%
    [libx264 @ 000002784dbeb980] i16 v,h,dc,p: 32% 23% 35% 10%
    [libx264 @ 000002784dbeb980] i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 11% 11% 41%  7%  5%  6%  5%  6%  8%
    [libx264 @ 000002784dbeb980] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 18% 14% 23%  8%  7%  7%  7%  7%  8%
    [libx264 @ 000002784dbeb980] i8c dc,h,v,p: 100%  0%  0%  0%
    [libx264 @ 000002784dbeb980] Weighted P-Frames: Y:33.8% UV:0.0%
    [libx264 @ 000002784dbeb980] ref P L0: 58.1% 16.3% 14.2%  9.4%  2.0%
    [libx264 @ 000002784dbeb980] ref B L0: 79.3% 20.7%
    [libx264 @ 000002784dbeb980] kb/s:26056.02

    The second command made everything work while the second one in the first part didn’t (the one with the -ss option), so I could be quite happy about it but I’m not that sure if FFMPEG duplicates the first frame for every video or if it’s just related to the one I’m using now, so it could be better to start off with a compressed video that has the same frame count of the original one.

    So let’s get to one final question : why does FFMPEG add a duplicated first frame at the beginning of the compressed video and how can I avoid that ?