This one is bugging me. I have scanned the archives and see many people confused by this one but none of the proposed explanations seem clarify things at all!
I have dumped the first few frames of an mpeg2 file and get: F1 - dts 16501 F2 - dts 18001 F3 - dts 19501 F4 - dts 21001 Etc. The codec context time_base for the stream has num=1, den=60 (60fps). I want to convert the dts values into 'double seconds' but if I try using the timebase converters (presumably incorrectly) I get crazy numbers. Clearly the frames are separated by 1500 - but how does this relate to the 60fps (time_base)? Also - while we are at it - has anyone noticed that if you av_seek_frame to a timestamp and read off a few frames - the frame_number field of the codecContext might report frames 1..n. If I repeat the seek and read off the same frames, the codecContext reports frame numbers n+1..n+N (i.e. they continue from the last frame decoded). Surely they should read the same each time I decode the same frames? This is really annoying for me since I need to use the frame_number's for referencing the image! Any help would be welcome? Gary Smart _______________________________________________ libav-user mailing list [email protected] https://lists.mplayerhq.hu/mailman/listinfo/libav-user
