[FFmpeg-user] Question for using blackdetect video filter

Wu-bin Zhen vvubin at gmail.com
Sat Jan 26 21:11:48 CET 2013


On Sat, Jan 26, 2013 at 4:25 AM, Paul B Mahol <onemda at gmail.com> wrote:

> On 1/26/13, Wu-bin Zhen <vvubin at gmail.com> wrote:
> > On Fri, Jan 25, 2013 at 9:58 PM, Carl Eugen Hoyos <cehoyos at ag.or.at>
> wrote:
> >
> >> Wu-bin Zhen <vvubin <at> gmail.com> writes:
> >>
> >> > Thanks for the quick reply. I am using live http streaming,
> >> > so it won't stop transferring data as long as the
> >> > connection is alive.
> >>
> >> The following produces identical output here
> >> for the http stream and a local file:
> >>
> >> $ ffmpeg -loglevel info -i
> >> http://samples.ffmpeg.org/V-codecs/SVQ3/Vertical400kbit.sorenson3.mov-vf
> >> blackdetect=d=0.1 -f null -t 10 -
> >>
> >> Please do not top-post here, it is considered rude.
> >>
> >> Carl Eugen
> >>
> >> _______________________________________________
> >> ffmpeg-user mailing list
> >> ffmpeg-user at ffmpeg.org
> >> http://ffmpeg.org/mailman/listinfo/ffmpeg-user
> >>
> >
> > Thank you for the reminder. Now I learned this netiquette for English
> > speakers and I will keep it in mind here.
> >
> > So after comparing with your sample, I think the blackdetect filter is
> not
> > working with the non-stop streaming urls. My temporary solution is:
> >> ./ffmpeg -i http://<non-stop-streaming-server>/live.flv -vcodec copy
> -an
> > -t 5 ./blackvideo.flv
> >> ./ffmpeg -v info -i ./blackvideo.flv -vf blackdetect=d=2 -f null -
> >
> > This works, but it has two issues: (1) causing more I/O access, (2) time
> > delay for the black video detection.
> > So I am trying hard to detect the black video without creating small
> files.
> > Any suggestion will be appreciated.
>
> The blackdetect gives output in info only at EOF.
>

No. I tried it with bigger movie files, and found that it reports
"black_start" and "black_end" info immediately when it detects black.

Press [q] to stop, [?] for help
[null @ 0x1d83f40] Encoder did not produce proper pts, making some up.
black_start:5.04671 black_end:6.54821 black_duration:1.5015=N/A dup=1
drop=0
black_start:13.7638 black_end:14.0557 black_duration:0.291967/A dup=1
drop=0
black_start:17.3507 black_end:17.5592 black_duration:0.208544/A dup=1
drop=0
black_start:19.5195 black_end:19.6446 black_duration:0.125133/A dup=1
drop=0
black_start:41.5832 black_end:41.7501 black_duration:0.166833/A dup=1
drop=0
black_start:45.3787 black_end:45.629 black_duration:0.250244N/A dup=1
drop=0
black_start:48.632 black_end:48.7988 black_duration:0.166833N/A dup=1
drop=0
black_start:57.4324 black_end:58.1415 black_duration:0.709044/A dup=1
drop=0
[blackdetect @ 0x1eee9a0] black_start:59.1425 black_end:59.4344
black_duration:0.291967
black_start:60.6857 black_end:60.8942 black_duration:0.208544/A dup=1
drop=0
black_start:78.4952 black_end:79.7881 black_duration:1.29296N/A dup=1
drop=0
black_start:86.5449 black_end:86.8785 black_duration:0.333667/A dup=1
drop=0
black_start:89.5896 black_end:89.7564 black_duration:0.166833/A dup=1
drop=0
black_start:110.11 black_end:111.153 black_duration:1.04271=N/A dup=1
drop=0
[blackdetect @ 0x1eee9a0] black_start:113.53 black_end:114.448
black_duration:0.917589
frame= 2745 fps=144 q=0.0 Lsize=N/A time=00:01:54.56 bitrate=N/A dup=1
drop=0
video:257kB audio:21476kB subtitle:0 global headers:0kB muxing overhead
-100.000099%


> _______________________________________________
> > ffmpeg-user mailing list
> > ffmpeg-user at ffmpeg.org
> > http://ffmpeg.org/mailman/listinfo/ffmpeg-user
> >
> _______________________________________________
> ffmpeg-user mailing list
> ffmpeg-user at ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/ffmpeg-user
>


More information about the ffmpeg-user mailing list