On Mon, 05 Jan 2009 19:51:26 -0500, Clive Taylor <[email protected]>  
wrote:
[...]
> 1) I need to be able to get the duration of a video, and most of the
> time when I use dump_format I get "Duration: N/A" displayed. Is there a
> simple way of getting the duration of the video stream in the files? I'm
> quite happy with either a time or frame count (as long as I can get the
> frame rate).
> 2) I'm looking for timecode discontinuities (either when the timecode
> that I'm reading from the frames jumps ahead, or freezes for one or more
> frames). Rather than process each frame in turn, I need to be able to
> jump around inside the file to find the points at which these
> discontinuities occur, and to be able to relate the timecode read from
> the frame to the time/frame number of the frame. I'm probably missing
> something here, but i can't seem to make the av_seek_frame function
> work.
[...]

Lots of people run into this problem.  The av_seek_frame seems to not work  
very well for this sort of stuff, so a few months ago someone posted a  
library they wrote for the exact sort of purpose you describe.

http://sourceforge.net/projects/ffmpeg-fas

I haven't used it myself, but I've been meaning to see if it could clean  
up the code I use for playback of video files.  It has a very nice clean  
API.

And, even if their library doesn't meet your needs, you can look at their  
code to see what approach they use.

-- 
Michael Conrad
IntelliTree Solutions llc.
513-552-6362
[email protected]
_______________________________________________
libav-user mailing list
[email protected]
https://lists.mplayerhq.hu/mailman/listinfo/libav-user

Reply via email to