[Ffmpeg-devel] interlace, duration and vhooks
Tue Jul 26 15:09:21 CEST 2005
Marcus Engene said:
> ffmpeg -v 2 -i file1
> I get one duration of a file but if I convert the file to
> another format
> ffmpeg -v 2 -i file2
> the duration seems not always to be correct?
> I had one thing in mind to get around this; I convert files
> to another format and what if I use a vhook that just counts
> the frames and on exit writes # of frames to a file? Eg:
> ffmpeg -i infile -vhook '/.../counthook.so -f /.../apa.txt' outfile
> If this is alright, I will get a problem with interlace vs progressive.
> The fps output says the number of frames, not fields, and as it looks
> now, vhooks cannot say if they're processing a full frame or an
> interlaced frame (field?)?
The decoders always return complete frames. For interlaced content, each
frame has the top and bottom fields interlaced. At least for frame
coded pictures this is true. I don't think I've ever come across any
field coded material, so I'm not certain how that is dealt with.
> Would it be a lot of work to add in the probe output from ffmpeg that
> a file is interlaced?
There is no reliable way to determine whether a file is interlaced, so it
is more or less impossible.
mru at inprovide.com
More information about the ffmpeg-devel