[FFmpeg-user] How do I make ffplay play without high latency?
Jesse Gordon
tojesseg at gmail.com
Sun Nov 25 08:46:37 CET 2012
On 11/24/2012 01:08 PM, Carl Eugen Hoyos wrote:
> Jesse Gordon <tojesseg <at> gmail.com> writes:
>
>> Anyway, so I tried that command above with a fresh git
>> from a couple or few days ago and it does play the
>> video stream from the HTTP cam nicely but the delay is
>> still about a quarter of a second, or maybe only a
>> tenth of a second longer than mplayer -benchmark
> Sorry to insist, but could you test again
> that -probesize makes no difference?
> That seems unlikely to me.
>
> Carl Eugen
>
I just went and tried -probesize again. By the way, the build I tested
with is Nov 21, 2012 from git. (It's on my robot control laptop, not my
email laptop.)
I played around a bit with different probesizes. If I specify less than
32, it complains that it's gotta be bewteen 32 and 2*10^9 or something.
If I specify greater than 31 but less than 2048, it fails, saying that
it doesn't have enough data to probe the file or some such.
(I'm reading from an http stream.)
With -probesize 2048, it buffers then pops up the play window in about
1-2 seconds after starting ffplay. With a probesize of 2,048,000 through
20,480,000 it takes about 3-4 seconds to pop up the play window.
Theoretically, if I tell it to load 20M to buffer it should wait several
minutes before playing because that's how long it takes for 20M to come
from the camera since it's a low bit rate camera. But evidently
-probesize is just a limit, and ffplay stops probing once it has what it
needs, which makes sense I guess.
But regardless of whether I use 2K, ~20K, 2M or 20M, the play latency
appears to the human eye to be about the same.
I didn't video it and count frames to see if there was a frame's
difference -- I just waved my hand in front of the camera, watching it
on the screen as well, but it seemed to always have almost a second of
latency.
The man page says that -probesize is the number of bytes used in probing.
Do you really think that -probesize will affect how many milliseconds of
playbuffer ffplay will try to keep or what frame rate will be used?
Thanks again,
~Jesse
More information about the ffmpeg-user
mailing list