I'm new with ffmpeg and your help is welcome I would like to have a line command that allows me to detect black-frames in my avi files.
And, if it's possible, I would like to be inform (with timestamps?) when black-frames occurr in the video and their duration.
I already saw some post about blackframe and how to list them, but there are listing blackframe while ffmpeg is encoding. And in my case, I don't want to encode. I just want to collect blackframe informations about my video without encoding. Is it possible?!
On Wed, 14 Mar 2012 03:07:31 -0700 (PDT)
LsBender <[hidden email]> wrote:
> Thank for your help Clement,
> I tried your command but i have this: "unrecognized option '-vf'":
> lefebvre@lefebvre-laptop:~/Bureau$ ffmpeg -i test.avi -vf blackframe=98:32
> -f null-
> FFmpeg version SVN-r0.5.1-4:0.5.1-1ubuntu1.3, Copyright (c) 2000-2009
> Fabrice Bellard, et al.
> configuration: --extra-version=4:0.5.1-1ubuntu1.3 --prefix=/usr
> --enable-avfilter --enable-avfilter-lavf --enable-vdpau --enable-bzlib
> --enable-libgsm --enable-libschroedinger --enable-libspeex
> --enable-libtheora --enable-libvorbis --enable-pthreads --enable-zlib
> --disable-stripping --disable-vhook --enable-runtime-cpudetect --enable-gpl
> --enable-postproc --enable-swscale --enable-x11grab --enable-libdc1394
> --enable-shared --disable-static
> libavutil 49.15. 0 / 49.15. 0
> libavcodec 52.20. 1 / 52.20. 1
> libavformat 52.31. 0 / 52.31. 0
> libavdevice 52. 1. 0 / 52. 1. 0
> libavfilter 0. 4. 0 / 0. 4. 0
> libswscale 0. 7. 1 / 0. 7. 1
> libpostproc 51. 2. 0 / 51. 2. 0
> built on Dec 21 2011 18:37:21, gcc: 4.4.3
> Input #0, avi, from 'test.avi':
> Duration: 01:02:12.22, start: 0.000000, bitrate: 1012 kb/s
> Stream #0.0: Video: mpeg4, yuv420p, 704x576 [PAR 1:1 DAR 11:9], 12.50
> tbr, 12.50 tbn, 12.50 tbc
> Stream #0.1: Audio: mp2, 32000 Hz, stereo, s16, 64 kb/s
> ffmpeg: unrecognized option '-vf'/
> I already saw some post about blackframe and how to list them, but there are
> listing blackframe while ffmpeg is encoding. And in my case, I don't want to
> encode. I just want to collect blackframe informations about my video
> without encoding. Is it possible?!
Your version of ffmpeg from the Ubuntu repository does not have
filtering capability. You can compile the most recent FFmpeg to gain
filtering, bug fixes, and other features. For step-by-step compiling
Thanks Clement and Lou-2.
Effectively you were right, my version was out of date.
As you recommended me, I upgraded my ubuntu version from 10.04 to 11.10 and my ffmpeg version from 0.5 to 0.9.1
I now have the blackdetect filter and I think this one is better than the blackframe filter for what I want to do.
But I still have to understand how to use this filter, in order to have a list of when blackframes occurs in my avi files (if it's possible without encoding).
As soon as I manage to get it work, I tell you.