On Jul 16, 2009, at 11:45 AM, Art Clarke wrote:
If you're not using libavformat to demux, then for many codecs
libavcodec
relies on you to set timestamps on objects. If you don't set them, it
defaults to NO_PTS_VALUE which happens to be the number you see.
So, either set and manage timestamps yourself, or use libavformat to
demux
(you'll still need to worry about the time-bases of different
timestamps --
they are not directly comparable across different streams).
See the ffmpeg.c source code for some of the stuff it does to track
timestamps.
- Art
If I understand correctly, I am using libavformat to read the
streams, as I'm using the functions listed in avformat to read the
video files in (av_open_input_file(), av_find_stream()). I'm not
trying to do different streams, just one at a time, so that should
simplify things. My opening code is really close to that used in
Martin Böhme's tutorial, with some syntactic sugar for Objective-C. My
current code to seek to frames only works (well, it kinda/not really
works for all frames, but the P-frames show only the changes, as
they're supposed to) for keyframes. the duration of a packet was found
by decoding one packet and pulling duration out, and when I want to go
to frame n, I seek to n * packet.duration. The problem I have is I
have no way of knowing in code where I am.
-Will Ross
_______________________________________________
libav-user mailing list
[email protected]
https://lists.mplayerhq.hu/mailman/listinfo/libav-user