delay growth

About encoding, codec settings, muxers and filter usage
xdenser
Blank Cone
Blank Cone
Posts: 23
Joined: 30 Aug 2010 23:39
Contact:

delay growth

Postby xdenser » 03 Nov 2011 15:45

Trying to stream with BlackMagic Intensity Pro card under Ubuntu 11.10.

Using custom built vlc
VLC media player 1.2.0-git Twoflower (revision 1.1.0-pre1-6962-geb5b116)

started with following command line

Code: Select all

cvlc decklink:// --decklink-video-connection hdmi --decklink-mode hp60 --extraintf cli --lua-config cli={host='localhost:4000'} --sout #duplicate{dst='transcode{vcodec=FLV1,venc=ffmpeg{},acodec=no}:std{access=http,mux =ffmpeg{mux=flv},dst=:8081/stream.flv}',dst='transcode{venc=x264{subme=7, ref=4, bframes=16, b-adapt=1, bpyramid=none, weightp=0,preset=medium,tune=film,vbv-bufsize=1500, bitrate=1200, vbv-maxrate=1500}, vcodec=h264, vb=1200, width=720, acodec=no, threads=6}:udp{mux=ts,dst=255.255.255.255,port=1234}'}
everything works fine except growing delay of udp stream.
After several hours it delays about 30 mins. Have not waited more than 5-6 hours but suspect vlc will crash when there will be no memory for buffer.
There is no delay on FLV stream.

Constant delay is ok. How to eleminate growth?

Rémi Denis-Courmont
Developer
Developer
Posts: 15263
Joined: 07 Jun 2004 16:01
VLC version: master
Operating System: Linux
Contact:

Re: delay growth

Postby Rémi Denis-Courmont » 03 Nov 2011 18:45

Turn off multithreaded encoding, maybe,
Rémi Denis-Courmont
https://www.remlab.net/
Private messages soliciting support will be systematically discarded

xdenser
Blank Cone
Blank Cone
Posts: 23
Joined: 30 Aug 2010 23:39
Contact:

Re: delay growth

Postby xdenser » 04 Nov 2011 09:23

You mean use threads=1 ?
It does not help - delay still grows and vlc memory usage too, while making quality of stream unacceptable.

Rémi Denis-Courmont
Developer
Developer
Posts: 15263
Joined: 07 Jun 2004 16:01
VLC version: master
Operating System: Linux
Contact:

Re: delay growth

Postby Rémi Denis-Courmont » 04 Nov 2011 09:54

This might be a bug in the transcoder or the muxer then.
Rémi Denis-Courmont
https://www.remlab.net/
Private messages soliciting support will be systematically discarded

xdenser
Blank Cone
Blank Cone
Posts: 23
Joined: 30 Aug 2010 23:39
Contact:

Re: delay growth

Postby xdenser » 04 Nov 2011 19:29

changed vencoder to ffmpeg, dst to rtp.
The problem still there. I also have found that delay (and memory usage) starts growth after some time following vlc start.

xdenser
Blank Cone
Blank Cone
Posts: 23
Joined: 30 Aug 2010 23:39
Contact:

Re: delay growth

Postby xdenser » 07 Nov 2011 13:55

Further discovery with -vvv option shows that problem starts when following messages appear on stderr
..
main input warning: clock gap, unexpected stream discontinuity
main input warning: feeding synchro with a new reference point trying to recover from clock gap
...

Rémi Denis-Courmont
Developer
Developer
Posts: 15263
Joined: 07 Jun 2004 16:01
VLC version: master
Operating System: Linux
Contact:

Re: delay growth

Postby Rémi Denis-Courmont » 07 Nov 2011 16:32

Oh that... The source has a discontinuity. This might be a bug in the decklink plugin, a hardware problem, or plain stupid scheduling jitter... I guess VLC attempts to recover from the problem in a way that causes extra buffering.
Rémi Denis-Courmont
https://www.remlab.net/
Private messages soliciting support will be systematically discarded

xdenser
Blank Cone
Blank Cone
Posts: 23
Joined: 30 Aug 2010 23:39
Contact:

Re: delay growth

Postby xdenser » 09 Nov 2011 00:10

What is strange there is no delay growth with FLV1 http output.
And the problem starts after 35-45 minutes of streaming.
Now I've made workaround - just parsing stderr and restaring vlc on 'unexpected stream discontinuity'.


Return to “VLC stream-output (sout)”

Who is online

Users browsing this forum: No registered users and 6 guests