[Libav-user] Reducing latency of file opening (when playing from http)
Kalileo
kalileo at universalx.net
Sun May 12 14:16:29 CEST 2013
On May 10, 2013, at 14:12 , Bjoern Drabeck wrote:
>>
> I just tested some more, it seems to make no real difference whether I
> set probesize/analyzeduration to 5000000 or 5000, both take more or
> less the same time (on the test file I was using today it was around
> 10 sec).. if I go much lower than 5000 at some point I start
> encountering "-22" errors
>
>
This is also what I noticed, when playing with probesize and analyzeduration trying to get the player to start more quickly (using mpegts (h264/aac) streams served through a memory buffer).
This leads to the question why does a known stream need to get probed / analyzed at all? If all values are known, they could be set before, and decoding / playing should start right away, skipping the step of av_find_stream_info. Unfortunately so far I did not manage to get this to work, av_find_stream_info seems to set something which is required for decoding to work.
I looked though the av_find_stream_info source code and did not find anything special happening there, or I did not recognize it.
So, to reduce latency, what has to be set for a codec / context to allow to skip the time-consuming step of av_find_stream_info?
More information about the Libav-user
mailing list