[Libav-user] avformat_find_stream_info/avformat_open_input speed
Carl Eugen Hoyos
ceffmpeg at gmail.com
Wed May 17 04:05:25 EEST 2017
2017-05-15 11:09 GMT+02:00 Nikola Spiric <nikola.spiric.ns at gmail.com>:
> I tried reducing "probesize" and "analyzeduration" parameters with
> mixed results. Sometimes it indeed does speed up mentioned function
> calls; however they often just result in the functions failing (i.e. they
> don't get enough data to provide me with all the information I need).
Yes, there is no free lunch.
You will have to find values that work for you and are smaller than
the default.
> So my question is: Is there a way to tell FFMPEG to stop analyzing the
> stream once it gathers all the basic information (video width/height,
> h.264/HEVC extra data or audio sample rate/number of channels) ?
How do you know you have gathered "all the basic information" of
a transport stream?
(There was a sample stream for which -probesize 2G was not enough
so we increased the range for the option.)
> I really need a way of speeding up these two function calls (5
> seconds is not acceptable for my needs).
5 seconds seem extremely long on current hardware.
Carl Eugen
More information about the Libav-user
mailing list