[Ffmpeg-devel] API changes questions (in particular frame_rate)
egf05 at doc.ic.ac.uk
Sat Jun 10 20:50:05 CEST 2006
I had some questions about the API changes in libavcodec/libavformat between the
CVS and 0.4.9 version I used in one of my programs. I want to update my program
and thanks to Doxygen I could easily follow the modifications you made to the API.
I had a question about the frame_rate field that was in AVCodecContex. I have
understood it has been removed from the structure. I have found two other fields
that contain the frame rate data:
- in AVStream, there is an AVrational called r_frame_rate
- in AVCodecContext, there is an AVRational called time_base.
For example, I have a 25fps MPEG file that gives me:
r_frame_rate num = 25025 and dev = 1001
time_base num = 1001 and dev = 25025
Well, everything is fine and gives me the correct values, however, I would like
to know what the equivalent to previous frame_rate is, especially regarding
Martin Bohme's example, when he uses:
pCodecCtx->frame_rate = 1000
How to convert this ? Is it by just changing the r_frame_rate and time_base
values ? And what is the correspondance with frame_rate_base ?
Thank you very much for your suggestions and advice.
More information about the ffmpeg-devel