Flyleaf
Flyleaf copied to clipboard
reduce avformat_find_stream_info execute duration
If i know network stream audio and video metadata before open, Is there any method to reduce avformat_find_stream_info execute duration. audio and video metadata as below:
{
"videoInfo": {
"Bitrate": 537,
"Codec": "h265",
"Fps": 24,
"Width": 1920,
"Height": 1080
},
"audioInfo": {
"Codec": "g711a",
"SampleBit": 16,
"SampleRate": 8000
}
}
I think it's the analyzeduration/probesize ffmpeg options so yes you can change them from Config.Demuxer.FormatOpt["analyzeduration"] etc.
Check here the defaults
If the analyzeduration/probesize ffmpeg options was too small, ffmpeg can not acquire the network stream metadata correctly.
I'm not sure if that possible. Requires more ffmpeg research to check whether is possible to achieve faster open with known data (eg. re-open). Maybe this link has some info but I can't really do that research currently.
ffplay has a option find_stream_info which also maybe used in flyleaf
ffplay.exe -i xxx -fflags nobuffer -nofind_stream_info
That just skips avformat_find_stream_info. If you do that to Flyleaf currently it will crash as it requires to find pixel format color spaces etc. to work properly. I guess ffplay will fill the codec's default values. I will need to review those.