[FFmpeg-user] Duplicated frames when streaming to decklink

Valentin Schweitzer vs at nativewaves.com
Thu Oct 17 19:33:35 EEST 2019


I am trying to stream audio and video in an endless loop from a file to
a DeckLink Duo 2 on Windows 10. When streaming in this loop,
ffmpeg reports duplicated frames approximately at the time
the loop starts anew. The command I'm using is the following:
.\ffmpeg.exe -loglevel verbose -re -stream_loop -1 -i trailer_stereo.mp4 
-pix_fmt uyvy422 -f decklink "81:4108a8c0:00000000"  2>stereo.log
where trailer_stereo.mp4 is a file containing a h264 stream at 25fps
and a resolution of 1920x1080 and an aac stream at 48000Hz.

The trailer_stereo.mp4 file was created by converting the
original (see 1.) from 5.1 audio to stereo with
.\ffmpeg.exe -i .\trailer_1080p.mov -vcodec copy -acodec aac -ac 2 

After approximately every loop there seems to be a buffer underrun
for both video and audio and a few frames are duplicated.
When running this for a longer time period
the decklink stream becomes unusable.

As the audio and video streams do not appear to be equal in length,
I then tried to cut the file down to the length of the shortest stream.
The file was truncated using -shortest (again, starting from the
file linked below (see 1.)) with this command:
.\ffmpeg.exe -i .\trailer_1080p.mov -vcodec copy -acodec aac -ac 2 
-shortest trailer_stereo_shortest.mp4

Now, duplicate frames still appear, but no buffer underrun is reported
(at least not this early on), when streaming it with:
.\ffmpeg.exe -loglevel verbose -re -stream_loop -1 -i 
trailer_stereo_shortest.mp4 -pix_fmt uyvy422 -f decklink 
"81:4108a8c0:00000000" 2> shortest.log

Attached are the log for the first stream (video + stereo audio,
no shortening) as stereo.log and the log for the second stream
(video + stereo audio, truncated with -shortest) as shortest.log.

If anyone knows a way to avoid these duplicates while streaming,
any advice would be much appreciated.


-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: shortest.log
URL: <http://ffmpeg.org/pipermail/ffmpeg-user/attachments/20191017/da135223/attachment.ksh>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: stereo.log
URL: <http://ffmpeg.org/pipermail/ffmpeg-user/attachments/20191017/da135223/attachment-0001.ksh>

More information about the ffmpeg-user mailing list