[FFmpeg-devel] ffplay playout buffer control question
cus at passwd.hu
Wed Dec 28 23:44:40 CET 2011
On Tue, 27 Dec 2011, Oliver O wrote:
> Hello everyone in FFmpeg-devel:)
> I am a beginner of ffmpeg learner for about one month more, and now I have
> a question about ffplay.
> My scenario: (ffmpeg version: 0.8.7)
You should use the git master if you do developing work.
> I want to use the ffplay player to play out the mpeg-ts/rtp streaming from
> a VLC server.
> My question is that now I have to control the rate(or speed) of each of the
> frame in ffplay playout buffer.
> Actually, all I want is control the playout rate of both video frames and
> audio frames according to the amount of the frames in the playout buffer.
You should check the -sync parameter and see how it works with different
settings. If you want to control the speed for both audio and video, then
you probably should modify the external clock based on what you want.
> I've trace the source code ffplay.c,
> but could anyone tell me where is the parameter of the playout buffer?(I
> can't make sure about this...)
There are packet queues for audio, video and subtitles, and a picture
queue for decoded pictures. The picture queue contains at most 2 decoded
pictures, so probably you need the packet queues, or the actual size of
them. These are printed in the status line, you should check that part of
the code to get an idea how to access them.
Keep in mind that ffplay only fills the packet queues to a point, where
they contain a specified amount of data - check the "if the queue are
full, no need to read more" part in the code.
> I really need this...any suggestion is really appreciated.
I still don't quite understand why you really need this, what is the
purpose of increasing the playing speed based on buffer fullness?
> Thanks in advance, sincerely.
More information about the ffmpeg-devel