Recherche avancée

Médias (0)

Mot : - Tags -/signalement

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

Autres articles (99)

  • Personnaliser les catégories

    21 juin 2013, par

    Formulaire de création d’une catégorie
    Pour ceux qui connaissent bien SPIP, une catégorie peut être assimilée à une rubrique.
    Dans le cas d’un document de type catégorie, les champs proposés par défaut sont : Texte
    On peut modifier ce formulaire dans la partie :
    Administration > Configuration des masques de formulaire.
    Dans le cas d’un document de type média, les champs non affichés par défaut sont : Descriptif rapide
    Par ailleurs, c’est dans cette partie configuration qu’on peut indiquer le (...)

  • Publier sur MédiaSpip

    13 juin 2013

    Puis-je poster des contenus à partir d’une tablette Ipad ?
    Oui, si votre Médiaspip installé est à la version 0.2 ou supérieure. Contacter au besoin l’administrateur de votre MédiaSpip pour le savoir

  • MediaSPIP Player : problèmes potentiels

    22 février 2011, par

    Le lecteur ne fonctionne pas sur Internet Explorer
    Sur Internet Explorer (8 et 7 au moins), le plugin utilise le lecteur Flash flowplayer pour lire vidéos et son. Si le lecteur ne semble pas fonctionner, cela peut venir de la configuration du mod_deflate d’Apache.
    Si dans la configuration de ce module Apache vous avez une ligne qui ressemble à la suivante, essayez de la supprimer ou de la commenter pour voir si le lecteur fonctionne correctement : /** * GeSHi (C) 2004 - 2007 Nigel McNie, (...)

Sur d’autres sites (9791)

  • 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 ?

  • Video frame difference with FFMPEG

    18 octobre 2018, 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 ?

  • How Media Analytics for Piwik gives you the insights you need to measure how effective your video and audio marketing is – Part 2

    https://piwik.org/media.mp4
    2 février 2017, par InnoCraft — Community

    In Part 1 we have covered some of the Media Analytics features and explained why you cannot afford to not measure the media usage on your website. Chances are, you are wasting or losing money and time by not making the most out of your marketing strategy this very second. In this part, we continue showing you some more insights you can expect to get from Media Analytics and how nicely it is integrated into Piwik.

    Video, Audio and Media Player reports

    Media Analytics adds several new reports around videos, audios and media players. They are all quite similar and give you similar insights so we will mainly focus on the Video Titles report.

    Metrics

    The above mentioned reports give you all the same insights and features so we will mainly focus on the “Video Titles” report. When you open such a report for the first time, you will see a report like this with the following metrics :

    • “Impressions”, the number of times a visitor has viewed a page where this media was included.
    • “Plays”, the number of times a visitor watched or listened to this media.
    • “Play rate”, the percentage of visitors that watched or listened to a media after they have visited a page where this media was included.
    • “Finishes”, the percentage of visitors who played a media and finished it.
    • “Avg. time spent”, the average amount of time a visitor spent watching or listening to this media.
    • “Avg. media length” the average length of a video or audio media file. This number may vary for example if the media is a stream.
    • “Avg completion” the percentage of how much visitors have watched of a video.

    If you are not sure what a certain metric means, simply hover the metric title in the UI and you will get a detailed explanation. By changing the visualization to the “All Columns Table” in the bottom of the report, you get to see even more metrics like “Plays by unique visitors”, “Impressions by unique visitors”, “Finish rate”, “Avg. time to play aka hesitation time”, “Fullscreen rate” and we are always adding more metrics.

    These metrics are available for the following reports :

    • “Video / Audio Titles” shows you all metrics aggregated by video or audio title
    • “Video / Audio Resource URLs” shows you all metrics aggregated by the video or audio resource URL, for example “https://piwik.org/media.mp4”.
    • “Video / Audio Resource URLs grouped” removes some information from the URLs like subdomain, file extensions and other information to get aggregated metrics when you provide the same media in different formats.
    • “Videos per hour in website’s timezone” lets you find out how your media content is consumed depending on the hour of the day. You might realize that your media is consumed very differently in the morning vs at night.
    • “Video Resolutions” lets you discover how your video is consumed depending on the resolution.
    • “Media players” report is useful if you use different media players on your websites or apps and want to see how engagement with your media compares by media player.

    Row evolution

    At InnoCraft, we understand that static numbers are not so useful. When you see for example that yesterday 20 visitors played a certain media, would you know whether this is good or bad ? This is why we always give you the possibility to see the data in relation to the recorded data in the past. To see how a specific media performs over time, simply hover a media title or media resource URL and click on the “Row Evolution” icon.

    Now you can see whether actually more or less visitors played your chosen video for the selected period. Simply click on any metric name and the chosen metrics will be plotted in the big evolution graph.

    This feature is similar to the Media Overall evolution graph introduced in Part 1, but shows you a detailed evolution for an individual media title or resource.

    Media details

    Now that you know some of the most important media metrics, you might want to look a bit deeper into the user behaviour. For example we mentioned before the “Avg time spent on media” metric. Such an average number doesn’t let you know whether most visitors spent about the same time watching the video, or whether there were many more visitors that watched it only for a few seconds and a few that watched it for very long.

    One of the ways to get this insight is by again hovering any media title or resource URL and clicking on the “Media details” icon. It will open a new popup showing you a new set of reports like these :

    The “Time spent watching” and “How far visitors reached in the media” bar charts show you on the X-Axis how much time each visitor spent on watching a video and how far in the video they reached. On the Y-Axis you see the number of visitors. This lets you discover whether your users for example jump often to the middle or end of the video and which parts of your video was seen most often.

    The “How often the media was watched in a certain hour” and “Which resolutions the media was watched” is similar to the reports introduced in Part 1 of the blog post. However, this time instead of showing aggregated video or audio content data, they display data for a specific media title or media resource URL.

    Segmented audience log

    In Part 1 we have already introduced the Audience Log and explained that it is useful to better understand the user behaviour. Just a quick recap : The Audience Log shows you chronologically every action a specific visitor has performed on your website : Which pages they viewed, how they interacted with your media, when they clicked somewhere, and much more.

    By hovering a media title or a media resource and then selecting “Segmented audience log” you get to see the same log, but this time it will show only visitors that have interacted with the selected media. This will be useful for you for example when you notice an unusual value for a metric and then want to better understand why a metric is like that.

    Applying segments

    Media Analytics lets you apply any Piwik segment to the media reports allowing you to dice your visitors or personas multiplying the value that you get out of Media Analytics. For example you may want to apply a segment and analyze the media usage for visitors that have visited your website or mobile app for the first time vs. recurring visitors. Sometimes it may be interesting how visitors that converted a specific goal or purchased something consume your media, the possibilities are endless. We really recommend to take advantage of segments to understand your different target groups even better.

    The plugin also adds a lot of new segments to your Piwik letting you segment any Piwik report by visitors that have viewed or interacted with your media. For example you could go to the “Visitors => Devices” report and apply a media segment to see which devices were used the most to view your media. You can also combine segments to see for example how often your goals were converted when a visitor viewed media for longer than 10 seconds after waiting for at least 20 seconds before playing your media and when they played at least 3 videos during their visit.

    Widgets, Scheduled Reports, and more.

    This is not where the fun ends. Media Analytics defines more than 15 new widgets that you can add to your dashboard or export it into a third party website. You can set up Scheduled Reports to receive the Media reports automatically via email or sms or download the report to share it with your colleagues. It works also very well with Custom Alerts and you can view the Media reports in the Piwik Mobile app for Android and iOS. Via the HTTP Reporting API you can fetch any report in various formats. The plugin is really nicely integrated into Piwik we would need some more blog posts to fully cover all the ways Media Analytics advances your Piwik experience and how you can use and dig into all the data to increase your conversions and sales.

    How to get Media Analytics and related features

    You can get Media Analytics on the Piwik Marketplace. If you want to learn more about this feature, you might be also interested in the Media Analytics User Guide and the Media Analytics FAQ.