[MPlayer-dev-eng] Black frame detection

Ivo ivop at euronet.nl
Tue Jul 11 18:29:24 CEST 2006


On Sunday 09 July 2006 08:53, Reynaldo H. Verdejo Pinochet wrote:
> On Thu, Jul 06, 2006 at 08:48:57AM +0100, Julian Hall wrote:
> > Yesterday, I finally decided to get off my backside and code one up.
> > I've written it as a filter for mplayer, and have attached the source
> > file in case anybody else would find it useful.  Primary application I
> > had in mind (i.e., what I wanted to use it for) was to produce chapter
> > lists for DVD production from downloaded AVIs that have fade-to-black
> > sequences at appropriate points.
>
> I havent looked through your code yet and Im probably not the one
> to decide wheter it gets applied or not (not too much into vfs), anyway
> a good idea may be to make your code spit out and EDL formated file, if
> it works as spected an user could use it latter to skipp comercials with
> -edl .

That's pretty hard to do, as the player has no easy way of knowing whether a 
part between two (ranges of) black frames has to be skipped (commercial) or 
not. One might look for the absence of a network logo or interact with an 
audio filter. Commercials are usually a lot louder than regular 
broadcasting and are run through a compressor/limitter for maximum dB 
output (similar to all those badly mastered CD's you find on the shelves 
nowadays). I think that's all beyond the scope of this filter. It's up to 
the user to create a suitable edit list or chapter list from the output of 
this filter. Attached there's a cleaned up version I worked on this 
afternoon between other things. I merged (was there any reason why the loop 
was split in upperhalf/lowerhalf of the image?), simplified and possibly 
sped up the loop, made it work on all planar yuv formats, and have it call 
the next filter in line (it's bad to have it just return from put_image). 
Typical command line is:

mplayer -quiet -vf blackframe -vo null -nosound -benchmark fubar.avi

If nobody objects, I will commit this in a few days (with docs).

--Ivo
-------------- next part --------------
A non-text attachment was scrubbed...
Name: vf_blackframe.patch
Type: text/x-diff
Size: 5186 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/mplayer-dev-eng/attachments/20060711/24766694/attachment.patch>


More information about the MPlayer-dev-eng mailing list