Hello,

does anyone have a clue how to determine the frame count of an MPEG file 
that has:

1. nb_frames == 0 in AVStream
2. duration value in AVStream is only the calculated value of filesize 
and bitrate

In my test cases the duration value gives only about 80% of the real 
MPEG video duration and
so I get a too small value for its frame count when I compute duration 
with time_base values.

When I try to position in the file with av_seek_frame with a very high 
target position and flags
AVSEEK_FLAG_ANY, AVSEEK_FLAG_BACKWARD set I get a cur_dts value in AVStream
that matches the real frame count ... but: The whole file will be read 
then which takes some minutes
on a 4.3G file. AVSEEK_FLAG_BYTE seems to work w'out reading the file 
but I don't get a valid
cur_dts value in this case.

Is there any way to get the frame count with libav w'out reading the 
whole file?

Regards, Konran

_______________________________________________
libav-user mailing list
[email protected]
https://lists.mplayerhq.hu/mailman/listinfo/libav-user

Reply via email to