[FFmpeg-user] Non-monotonous DTS in output stream 0:1

Carl Eugen Hoyos ceffmpeg at gmail.com
Tue Sep 4 01:39:50 EEST 2018


2018-09-01 20:18 GMT+02:00, Mustafa Al Ani <mustafalani at gmail.com>:

> In my setup I'm playing out NDI stream using decklink. everything
> looks good and both the NDI and the decklink playout are very
> stable.. but when the NDI stream stops and starts again later.. the
> decklink starts giving Non-monotonous DTS in output stream 0:1
> which makes sense because the DTS has been changed since the
> last frame in previous NDI stream.
>
> Here is my command
>
> fmpeg -f libndi_newtek -i "NDI_SOURCE_NAME_1" -f decklink 'DeckLink Duo (1)'
>
> The same happens when I restream NDI to NDI.
>
> ffmpeg -f libndi_newtek -i "NDI_SOURCE_NAME_1" -f libndi_newtek
> NDI_SOURCE_NAME_2
>
> Is there any way I can force ffmpeg to ignore the DTS?

You could test adding the AVFMT_TS_DISCONT flag:
(inlined)

diff --git a/libavdevice/libndi_newtek_dec.c b/libavdevice/libndi_newtek_dec.c
index 4fb7197..04eec31 100644
--- a/libavdevice/libndi_newtek_dec.c
+++ b/libavdevice/libndi_newtek_dec.c
@@ -337,4 +337,5 @@ AVInputFormat ff_libndi_newtek_demuxer = {
     .read_header   = ndi_read_header,
     .read_packet   = ndi_read_packet,
     .read_close    = ndi_read_close,
+    .flags         = AVFMT_TS_DISCONT,
 };


Please report back, Carl Eugen


More information about the ffmpeg-user mailing list