[FFmpeg-devel] [PATCH 1/2] avdevice/decklink_dec: use a custom memory allocator

Marton Balint cus at passwd.hu
Tue Jun 5 20:17:20 EEST 2018

On Tue, 5 Jun 2018, Dave Rice wrote:

>> On Jun 4, 2018, at 4:21 PM, Marton Balint <cus at passwd.hu> wrote:
>> The default memory allocator is limited in the max number of frames available,
>> and therefore caused frame drops if the frames were not freed fast enough.
> I’ve been testing this patchset today. Yesterday I was occasionally getting “Decklink input buffer overrun!” errors with this command:
> /usr/local/opt/ffmpegdecklink/bin/ffmpeg-dl -v info -nostdin -nostats -t 1980 -f decklink -draw_bars 0 -audio_input embedded -video_input sdi -format_code ntsc -channels 8 -raw_format yuv422p10 -i "UltraStudio Express" -metadata:s:v:0 encoder="FFV1 version 3" -color_primaries smpte170m -color_trc bt709 -colorspace smpte170m -color_range mpeg -metadata creation_time=now -f_strict unofficial -c:v ffv1 -level 3 -g 1 -slices 16 -slicecrc 1 -c:a pcm_s24le -filter_complex "[0:v:0]setfield=bff,setsar=40/27,setdar=4/3; [0:a:0]pan=stereo| c0=c0 | c1=c1[stereo1];[0:a:0]pan=stereo| c0=c2 | c1=c3[stereo2]" -map "[stereo1]" -map "[stereo2]" -f matroska output.mkv -an -f framemd5 output.framemd5
> With the patchset applied, I haven’t had that buffer overrun error re-occur.

That is very strange, it should work the opposite way. Without the patch, 
the decklink driver is dropping frames (silently), so you should never 
get a Decklink input buffer overrun error message, but silent frame drops 
instead if you don't release (transcode) the frames fast enough.

With the patch, you won't get silent frame drops, but you might fill the 
internal queue and therefore get Decklink input buffer overruns. On the 
other hand, if you get Decklink input buffer overruns, that typically 
means that your computer is too slow to handle transcoding in real time...


More information about the ffmpeg-devel mailing list