Non-monotonous DTS in output stream 0:1

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

Non-monotonous DTS in output stream 0:1

Mustafa Al Ani
Hi,

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?

PS: I've already tried -fflags +igndts with no success!

R,
Mustafa
_______________________________________________
ffmpeg-user mailing list
[hidden email]
http://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
[hidden email] with subject "unsubscribe".
Reply | Threaded
Open this post in threaded view
|

Re: Non-monotonous DTS in output stream 0:1

Carl Eugen Hoyos-2
2018-09-01 20:18 GMT+02:00, Mustafa Al Ani <[hidden email]>:

> 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
_______________________________________________
ffmpeg-user mailing list
[hidden email]
http://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
[hidden email] with subject "unsubscribe".
Reply | Threaded
Open this post in threaded view
|

Re: Non-monotonous DTS in output stream 0:1

Mustafa Al Ani
Hi,

After applying the patch, it can't even find sources anymore.

Here is the console output:

ffmpeg -f libndi_newtek -find_sources 1 -i dummy -loglevel debug
ffmpeg version 3.4.git Copyright (c) 2000-2018 the FFmpeg developers
  built with gcc 5.4.0 (Ubuntu 5.4.0-6ubuntu1~16.04.10) 20160609
  configuration: --enable-libndi_newtek
--extra-cflags='-I/home/ls/iohub/ndi/include
-I/home/ls/iohub/bm_sdk/Linux/include'
--extra-ldflags=-L/home/ls/iohub/ndi/lib/x86_64-linux-gnu
--enable-libsrt --enable-ffplay --enable-decklink --enable-libx264
--enable-nonfree --enable-gpl --enable-libfdk-aac --enable-libx265
--enable-openssl
  libavutil      56. 19.100 / 56. 19.100
  libavcodec     58. 27.101 / 58. 27.101
  libavformat    58. 17.106 / 58. 17.106
  libavdevice    58.  4.101 / 58.  4.101
  libavfilter     7. 26.100 /  7. 26.100
  libswscale      5.  2.100 /  5.  2.100
  libswresample   3.  2.100 /  3.  2.100
  libpostproc    55.  2.100 / 55.  2.100
Splitting the commandline.
Reading option '-f' ... matched as option 'f' (force format) with
argument 'libndi_newtek'.
Reading option '-find_sources' ... matched as AVOption 'find_sources'
with argument '1'.
Reading option '-i' ... matched as input url with argument 'dummy'.
Reading option '-loglevel' ... matched as option 'loglevel' (set
logging level) with argument 'debug'.
Finished splitting the commandline.
Parsing a group of options: global .
Applying option loglevel (set logging level) with argument debug.
Successfully parsed a group of options.
Parsing a group of options: input url dummy.
Applying option f (force format) with argument libndi_newtek.
Successfully parsed a group of options.
Opening an input file: dummy.
[libndi_newtek @ 0x3857380] Opening 'dummy' for reading
[file @ 0x3857c40] Setting default whitelist 'file,crypto'
dummy: No such file or directory

R,
Mustafa

On Tue, Sep 4, 2018 at 12:40 AM Carl Eugen Hoyos <[hidden email]> wrote:

> 2018-09-01 20:18 GMT+02:00, Mustafa Al Ani <[hidden email]>:
>
> > 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
> _______________________________________________
> ffmpeg-user mailing list
> [hidden email]
> http://ffmpeg.org/mailman/listinfo/ffmpeg-user
>
> To unsubscribe, visit link above, or email
> [hidden email] with subject "unsubscribe".
_______________________________________________
ffmpeg-user mailing list
[hidden email]
http://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
[hidden email] with subject "unsubscribe".
Reply | Threaded
Open this post in threaded view
|

Re: Non-monotonous DTS in output stream 0:1

Carl Eugen Hoyos-2
2018-09-04 11:35 GMT+02:00, Mustafa Al Ani <[hidden email]>:
> Hi,
>
> After applying the patch, it can't even find sources anymore.
>
> Here is the console output:
>
> ffmpeg -f libndi_newtek -find_sources 1 -i dummy -loglevel debug

Then it's probably just wrong but feel free to post the console
output without the patch.

Carl Eugen
_______________________________________________
ffmpeg-user mailing list
[hidden email]
http://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
[hidden email] with subject "unsubscribe".
Reply | Threaded
Open this post in threaded view
|

Re: Non-monotonous DTS in output stream 0:1

Mustafa Al Ani
without the patch:

ffmpeg -f libndi_newtek -find_sources 1 -i dummy -loglevel debug
ffmpeg version 3.4.git Copyright (c) 2000-2018 the FFmpeg developers
  built with gcc 5.4.0 (Ubuntu 5.4.0-6ubuntu1~16.04.10) 20160609
  configuration: --enable-libndi_newtek
--extra-cflags='-I/home/ls/iohub/ndi/include
-I/home/ls/iohub/bm_sdk/Linux/include'
--extra-ldflags=-L/home/ls/iohub/ndi/lib/x86_64-linux-gnu
--enable-libsrt --enable-ffplay --enable-decklink --enable-libx264
--enable-nonfree --enable-gpl --enable-libfdk-aac --enable-libx265
--enable-openssl
  libavutil      56. 19.100 / 56. 19.100
  libavcodec     58. 27.101 / 58. 27.101
  libavformat    58. 17.106 / 58. 17.106
  libavdevice    58.  4.101 / 58.  4.101
  libavfilter     7. 26.100 /  7. 26.100
  libswscale      5.  2.100 /  5.  2.100
  libswresample   3.  2.100 /  3.  2.100
  libpostproc    55.  2.100 / 55.  2.100
Splitting the commandline.
Reading option '-f' ... matched as option 'f' (force format) with
argument 'libndi_newtek'.
Reading option '-find_sources' ... matched as AVOption 'find_sources'
with argument '1'.
Reading option '-i' ... matched as input url with argument 'dummy'.
Reading option '-loglevel' ... matched as option 'loglevel' (set
logging level) with argument 'debug'.
Finished splitting the commandline.
Parsing a group of options: global .
Applying option loglevel (set logging level) with argument debug.
Successfully parsed a group of options.
Parsing a group of options: input url dummy.
Applying option f (force format) with argument libndi_newtek.
Successfully parsed a group of options.
Opening an input file: dummy.
[libndi_newtek @ 0x347e380] Waiting for sources 1000 miliseconds
[libndi_newtek @ 0x347e380] NDIlib_find_wait_for_sources returns 1
[libndi_newtek @ 0x347e380] Waiting for sources 1000 miliseconds
[libndi_newtek @ 0x347e380] NDIlib_find_wait_for_sources returns 1
[libndi_newtek @ 0x347e380] Waiting for sources 1000 miliseconds
[libndi_newtek @ 0x347e380] NDIlib_find_wait_for_sources returns 1
[libndi_newtek @ 0x347e380] Waiting for sources 1000 miliseconds
[libndi_newtek @ 0x347e380] NDIlib_find_wait_for_sources returns 0
[libndi_newtek @ 0x347e380] Found 5 NDI sources:
[libndi_newtek @ 0x347e380]     'IO-ENC-01 (IO-ENC-01-NDI-01)'
'192.168.173.81:5961'
[libndi_newtek @ 0x347e380]     'IO-ENC-01 (IO-ENC-01-NDI-02)'
'192.168.173.81:5962'
[libndi_newtek @ 0x347e380]     'MED-GW-01 (IO-ENC-01-NDI-01_VR)'
 '192.168.173.80:5962'
[libndi_newtek @ 0x347e380]     'MED-GW-01 (IO-ENC-01-NDI-02_VR)'
 '192.168.173.80:5961'
[libndi_newtek @ 0x347e380]     'OTT-ENC-01 (NDI-TEST-01)'
'152.115.45.153:5961'
dummy: Immediate exit requested


R,

Mustafa


On Tue, Sep 4, 2018 at 2:19 PM Carl Eugen Hoyos <[hidden email]> wrote:

> 2018-09-04 11:35 GMT+02:00, Mustafa Al Ani <[hidden email]>:
> > Hi,
> >
> > After applying the patch, it can't even find sources anymore.
> >
> > Here is the console output:
> >
> > ffmpeg -f libndi_newtek -find_sources 1 -i dummy -loglevel debug
>
> Then it's probably just wrong but feel free to post the console
> output without the patch.
>
> Carl Eugen
> _______________________________________________
> ffmpeg-user mailing list
> [hidden email]
> http://ffmpeg.org/mailman/listinfo/ffmpeg-user
>
> To unsubscribe, visit link above, or email
> [hidden email] with subject "unsubscribe".
_______________________________________________
ffmpeg-user mailing list
[hidden email]
http://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
[hidden email] with subject "unsubscribe".
Reply | Threaded
Open this post in threaded view
|

Re: Non-monotonous DTS in output stream 0:1

Moritz Barsnick
On Wed, Sep 05, 2018 at 09:29:16 +0200, Mustafa Al Ani wrote:
> without the patch:
>
> ffmpeg -f libndi_newtek -find_sources 1 -i dummy -loglevel debug
> ffmpeg version 3.4.git Copyright (c) 2000-2018 the FFmpeg developers

Are you using the 3.4 branch from git? If so, is there any particular
reason for this, and not using master?

Just wondering,
Moritz
_______________________________________________
ffmpeg-user mailing list
[hidden email]
http://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
[hidden email] with subject "unsubscribe".
Reply | Threaded
Open this post in threaded view
|

Re: Non-monotonous DTS in output stream 0:1

Mustafa Al Ani
No particular reason but I can tell it happens on master build as well.

R,
Mustafa

> On Sep 5, 2018, at 9:57 AM, Moritz Barsnick <[hidden email]> wrote:
>
>> On Wed, Sep 05, 2018 at 09:29:16 +0200, Mustafa Al Ani wrote:
>> without the patch:
>>
>> ffmpeg -f libndi_newtek -find_sources 1 -i dummy -loglevel debug
>> ffmpeg version 3.4.git Copyright (c) 2000-2018 the FFmpeg developers
>
> Are you using the 3.4 branch from git? If so, is there any particular
> reason for this, and not using master?
>
> Just wondering,
> Moritz
> _______________________________________________
> ffmpeg-user mailing list
> [hidden email]
> http://ffmpeg.org/mailman/listinfo/ffmpeg-user
>
> To unsubscribe, visit link above, or email
> [hidden email] with subject "unsubscribe".
_______________________________________________
ffmpeg-user mailing list
[hidden email]
http://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
[hidden email] with subject "unsubscribe".