audio streaming - FFMPEG libavformat internal buffering -
i'm using ffmpeg c++ audio streaming , playback application.
i use avformat_open_input function open url external compressed audio file , step through stream using av_read_frame. each packet directly decode data , queue in audio buffer using openal.
my question if ffmpeg internally prebuffers compressed data external url?
does ffmpeg keep downloading data in background if don't call av_read_frame?
or responsibility maintain intermediate buffer download many packets possible ahead of time avoid starving audio-playback?
if so, how buffer/download internally? can configure this?
i have been looking through documentation have not found information on this.
thanks.
update: according thread http://ffmpeg.zeranoe.com/forum/viewtopic.php?f=15&t=376 libav should default prebuffer 5mb depending on avformatcontext::max_analyze_duration. haven't noticed behavior , doesn't seem change if alter max_analyze_duration.
if monitor memory consumption of process doesn't increase after call avformat_open_input , if simulate slow-network, av_read_frame directly stops working if didn't have packets buffered.
Comments
Post a Comment