[Libav-user] newbie question: what is the appropriate/best way to obtain frame_rate from a video and how to control it when decoding video?
zhangjsj at gmail.com
Tue Dec 20 02:11:59 CET 2011
Thanks for your reply.By "control frame rate" I meant,say,the video file
itself is 25fps, and I wanna play the video with the speed of 10frame/s.
2011/12/20 Michael Chisholm <chisholm at mitre.org>
> I've struggled myself with this. There are a lot more framerate-related
> fields than that lying around. The ones I know of (in ffmpeg 0.6.3) are
> (stream=AVStream, cc=AVCodecContext):
> (you'd think you could maybe derive framerate from the last) I am no
> expert, but my guess is that not all containers contain a framerate field
> somewhere for tools to read. So libav* tries to estimate one from timing
> information. E.g. in my app I can read from a udp multicast network
> stream, and even for the same stream, each time I run the app, it shows a
> slightly different framerate (as shown by dump_format). Maybe because it
> sees a different subsequence of timestamps, or the relative distribution in
> time of those timestamps might be slightly different, ... I don't know. In
> my app, I settled on stream->avg_frame_rate for my purposes.
> As far as controlling it, I'm not sure what you mean... did you just want
> to decode at the frame rate of the stream, or somehow manipulate the the
> video to change its framerate?
> On 12/19/2011 1:25 AM, Yingzhou Zhang wrote:
>> hey there.
>> I have googled a little bit,found 2 way
>> 2:AVCodecContext-> streams->r_frame_rate?
>> However the output of the 2 ways are not the same??
>> Could you tell me what is the exact way to get frame_rate and how to
>> control it when decoding video?
>> Thanks a lot
>> Libav-user mailing list
>> Libav-user at ffmpeg.org
> Libav-user mailing list
> Libav-user at ffmpeg.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Libav-user