HLS streaming stops:"command 'quit' and I have no idea why !

For questions and discussion that is NOT (I repeat NOT) specific to a certain Operating System.
Enver
New Cone
New Cone
Posts: 6
Joined: 25 Apr 2013 11:29

HLS streaming stops:"command 'quit' and I have no idea why !

Postby Enver » 08 Jun 2013 22:49

Hey guys. Im still working on VLC and Http Live Streaming, which is working out pretty well. Output:

Code: Select all

[0x413158] access_output_livehttp access out: LiveHttpSegmentComplete: /stream-44.ts (44) [0x413158] access_output_livehttp access out: LiveHttpIndexComplete: /index.m3u8 [0x413158] access_output_livehttp access out debug: Successfully opened livehttp file: /stream-45.ts (45) Sending request: GET_PARAMETER rtsp://<stream url> RTSP/1.0 CSeq: 14 User-Agent: LibVLC/2.0.3 (LIVE555 Streaming Media v2012.05.17) Session: <some session key>
So up to above it is working fine, making .ts files and updating its m3u8. But then suddenly you will see the following line:

Code: Select all

[0x412f28] idummy demux: command `quit'
And it just stops. So I tried to recreate this but have then with more verbosity (vlc -vvv)
And then I see the following:

Code: Select all

[0x40d3c8] live555 demux debug: StreamClose [0x40b4f8] main input debug: EOF reached [0x40b4f8] main input debug: waiting decoder fifos to empty [0x40b4f8] main input debug: waiting decoder fifos to empty [0x4e1148] main playlist debug: finished input [0x3a4530] main decoder debug: removing module "packetizer_h264" [0x3a4530] main decoder debug: killing decoder fourcc `h264', 0 PES in FIFO [0x411548] main stream output debug: removing a sout input (sout_input:0x410d20) [0x40cb18] mux_ts mux debug: removing input pid=68 [0x40cb18] mux_ts mux debug: new PCR PID is 8191 [0x40cb18] main mux warning: no more input streams for this mux [0x40d3c8] main demux debug: removing module "live555" Sending request: TEARDOWN rtsp://<url> RTSP/1.0 CSeq: 15 User-Agent: LibVLC/2.0.3 (LIVE555 Streaming Media v2012.05.17) Session: <sessionkey> [0x40b4f8] main input debug: Program doesn't contain anymore ES [0x4e1148] main playlist debug: dead input [0x411548] main stream output debug: destroying useless sout [0x411910] main stream out debug: destroying chain... (name=std) [0x411910] main stream out debug: removing module "stream_out_standard" [0x40cb18] main mux debug: removing module "mux_ts" [0x413158] main access out debug: removing module "access_output_livehttp" [0x413158] access_output_livehttp access out: LiveHttpSegmentComplete: /stream-45.ts (45) [0x413158] access_output_livehttp access out: LiveHttpIndexComplete: /index.m3u8 [0x413158] access_output_livehttp access out debug: livehttp access output closed [0x411910] main stream out debug: destroying chain done [0x40b4f8] main input debug: TIMER input launching for 'rtsp://<sream>' : 531.905 ms - Total 531.905 ms / 1 intvls (Avg 531.905 ms) [0x4e1148] main playlist debug: changing item without a request (current 0/2) [0x4e1148] main playlist debug: using item 1 [0x4e1148] main playlist debug: starting playback of the new playlist item [0x4e1148] main playlist debug: resyncing on quit [0x4e1148] main playlist debug: quit is at 1 [0x4e1148] main playlist debug: creating new input thread [0x40b4f8] main input debug: Creating an input for 'quit' [0x40b4f8] main input debug: using timeshift granularity of 50 MiB, in path '/tmp' [0x40b4f8] main input debug: `vlc://quit' gives access `vlc' demux `' path `quit' [0x40b4f8] main input debug: creating demux: access='vlc' demux='' location='quit' file='(null)' [0x412f28] main demux debug: looking for access_demux module: 1 candidate [0x412f28] idummy demux: command `quit' [0x37cd30] main libvlc debug: exiting [0x37cd30] main libvlc debug: deactivating the playlist [0x4e1148] main playlist debug: deactivating the playlist [0x4e1148] main playlist debug: incoming request - stopping current input [0x4e1148] main playlist debug: dying input [0x412f28] main demux debug: using access_demux module "idummy" [0x412f28] main demux debug: TIMER module_need() : 79.100 ms - Total 79.100 ms / 1 intvls (Avg 79.100 ms) [0x413148] main demux meta debug: looking for meta reader module: 2 candidates [0x413148] lua demux meta debug: Trying Lua scripts in /home/pi/.local/share/vlc/lua/meta/reader [0x413148] lua demux meta debug: Trying Lua scripts in /usr/lib/vlc/lua/meta/reader [0x413148] lua demux meta debug: Trying Lua playlist script /usr/lib/vlc/lua/meta/reader/filename.luac [0x413148] lua demux meta debug: Trying Lua scripts in /usr/share/vlc/lua/meta/reader [0x413148] main demux meta debug: no meta reader module matching "any" could be loaded [0x413148] main demux meta debug: TIMER module_need() : 59.437 ms - Total 59.437 ms / 1 intvls (Avg 59.437 ms) [0x40b4f8] main input debug: `vlc://quit' successfully opened [0x4e1148] main playlist debug: dying input [0x4e1148] main playlist debug: dying input [0x412f28] main demux debug: removing module "idummy" [0x4e1148] main playlist debug: dead input [0x40b4f8] main input debug: TIMER input launching for 'quit' : 181.895 ms - Total 181.895 ms / 1 intvls (Avg 181.895 ms) [0x40b4f8] main playlist export debug: saving Media Library to file /home/pi/.local/share/vlc/ml.xspf [0x40b4f8] main playlist export debug: looking for playlist export module: 1 candidate [0x40b4f8] main playlist export debug: using playlist export module "export" [0x40b4f8] main playlist export debug: TIMER module_need() : 16.124 ms - Total 16.124 ms / 1 intvls (Avg 16.124 ms) [0x40b4f8] main playlist export debug: removing module "export" [0x4e1148] main playlist debug: playlist correctly deactivated [0x37cd30] main libvlc debug: removing all services discovery tasks [0x37cd30] main libvlc debug: removing all interfaces [0x39dad8] main interface debug: removing module "dummy" [0x414f88] main interface debug: removing module "hotkeys" [0x4e1148] main playlist debug: destroying [0x37cd30] main libvlc debug: TIMER ML Load : Total 237.591 ms / 1 intvls (Avg 237.591 ms) [0x37cd30] main libvlc debug: TIMER Items array build : Total 8.945 ms / 2 intvls (Avg 4.472 ms) [0x37cd30] main libvlc debug: TIMER Preparse run : Total 7.702 ms / 1 intvls (Avg 7.702 ms) [0x37cd30] main libvlc debug: TIMER ML Dump : Total 429.431 ms / 1 intvls (Avg 429.431 ms) [0x37cd30] main libvlc debug: removing stats [0x37cd30] main libvlc debug: removing module "memcpy"
It would seem the input died, but this is not the case. RTSP stream is on 24/7. Even if it did temporarely die or something: when I use my Desktop to RTSP stream a movie (mp4 file) instead - to for instance my Macbook, the same thing happens. So it isnt a dying input. Camera setup is over the internet which may cause trouble, but my Desktop setup is a local network (100Mbps).

It happens completely at random. Usually just having one VLC works out, where this problem occurs more often when I have a couple of VLC working on streams.After a minute or two it generally stops. But on one of my many testruns I had 8x VLC working fine until I stopped them myself (7 min). Strangely different results I have to say.

I really can't figure out a reason why VLC quits. I need it to stay alive ! Help is much appreciated!

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

Re: HLS streaming stops:"command 'quit' and I have no idea w

Postby Rémi Denis-Courmont » 09 Jun 2013 11:52

You have a "vlc://quit" item somewhere in your playlist or VLM configuration.
Rémi Denis-Courmont
https://www.remlab.net/
Private messages soliciting support will be systematically discarded

Enver
New Cone
New Cone
Posts: 6
Joined: 25 Apr 2013 11:29

Re: HLS streaming stops:"command 'quit' and I have no idea w

Postby Enver » 09 Jun 2013 13:30

Yes I did. Removing it seemed to work, but after some testing it doesnt appear to have helped. I still get the following, only VLC doesnt terminate itself now :P

Code: Select all

[0x14ca958] access_output_livehttp access out: LiveHttpIndexComplete: /index.m3u8 [0x14db958] access_output_livehttp access out: LiveHttpSegmentComplete: /stream-8.ts (8) Sending request: GET_PARAMETER rtsp://<ip> RTSP/1.0 CSeq: 8 User-Agent: LibVLC/2.0.3 (LIVE555 Streaming Media v2012.05.17) Session: <sess> [0x1237d48] live555 demux debug: StreamClose [0x11bd238] main input debug: EOF reached [0x11bd238] main input debug: waiting decoder fifos to empty [0x1231590] main playlist debug: finished input [0x123bb60] main decoder debug: removing module "packetizer_h264" [0x123bb60] main decoder debug: killing decoder fourcc `h264', 0 PES in FIFO [0x1237ea8] main stream output debug: removing a sout input (sout_input:0x123c3c0) [0x123b5e0] mux_ts mux debug: removing input pid=68 [0x123b5e0] mux_ts mux debug: new PCR PID is 8191 [0x123b5e0] main mux warning: no more input streams for this mux [0x1237d48] main demux debug: removing module "live555" Sending request: TEARDOWN rtsp://<ip> RTSP/1.0 CSeq: 9 User-Agent: LibVLC/2.0.3 (LIVE555 Streaming Media v2012.05.17) Session: <session>
Probably hard to get around, but the input stream is not dead at all. My input stream in these tests is VLC on a different PC, streaming out an mp4 in rtsp obviously. Over a wired LAN connection of 100Mb/s.

Seems that the issue is that I'm not getting a response from the GET_PARAMETER package. Because sometimes when streaming succesfully I see these lines:

Code: Select all

Sending request: GET_PARAMETER rtsp://<ip> RTSP/1.0 CSeq: 7 User-Agent: LibVLC/2.0.3 (LIVE555 Streaming Media v2012.05.17) Session: <sess> Received 166 new bytes of response data. Received a complete GET_PARAMETER response: RTSP/1.0 200 OK Server: VLC/2.0.6 Date: Sun, 09 Jun 2013 11:43:14 GMT Session: <sess>, timeout=60 Content-Length: 0 Cache-Control: no-cache Cseq: 7
Reckon there's any way I could fix this myself ? Like have VLC send more then one request if the first one wasnt a succes ?

Edit #10
Trying out to force a TCP connection to make sure the GET_PARAMETER response arrives. Since the destination is a LAN anyway, I guess the extra overhead is alright. It's working well thus far. (Past 4 minutes).. Ill get back to this in a bit.
Edit
Right. Okay, it seems I cant force TCP because I see "Transport not supported" in the debug info, after which VLC client sends a SETUP packet and then gets a response with UDP again. Pffffft... To be precise: on the VLC server I set Advanced settings -> Streaming -> Sout-stream-> RTP -> Transport Protocol to TCP. Also, when activating the stream I add "proto=tcp" in the generated command line code.
On the VLC client connecting and creating a HLS livestream I use --rtsp-tcp. I get these prints:

Code: Select all

Sending request: SETUP rtsp://<ip>/trackID=1 RTSP/1.0 CSeq: 4 User-Agent: LibVLC/2.0.3 (LIVE555 Streaming Media v2012.05.17) Transport: RTP/AVP/TCP;unicast;interleaved=0-1
Server seems to reply:

Code: Select all

Received 147 new bytes of response data. Received a complete SETUP response: RTSP/1.0 461 Unsupported transport Server: VLC/2.0.6 Date: Sun, 09 Jun 2013 12:56:43 GMT Content-Length: 0 Cache-Control: no-cache Cseq: 4
Client tries a new setup request but without defining the transport protocol.

Code: Select all

Sending request: SETUP rtsp://<ip>/trackID=1 RTSP/1.0 CSeq: 5 User-Agent: LibVLC/2.0.3 (LIVE555 Streaming Media v2012.05.17) Transport: RTP/AVP;unicast;client_port=55544-55545
Server: "UDP in yo face !"

Code: Select all

Received 270 new bytes of response data. Received a complete SETUP response: RTSP/1.0 200 OK Server: VLC/2.0.6 Date: Sun, 09 Jun 2013 12:56:43 GMT Transport: RTP/AVP/UDP;unicast;client_port=55544-55545;server_port=50892-50893;ssrc=147F2398;mode=play Session: e4406d5790f06a92;timeout=60 Content-Length: 0 Cache-Control: no-cache Cseq: 5
Might be VLC not actually supporting TCP, while all the options are there. (Says "not implemented yet" at https://www.videolan.org/doc/streaming- ... /ch03.html) But there might still be a better way to fix the issue here.

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

Re: HLS streaming stops:"command 'quit' and I have no idea w

Postby Rémi Denis-Courmont » 09 Jun 2013 18:13

The VLC server-side supports neither RTP over TCP nor RTP interleaved in RTSP. This would require a complete rewrite of the RTSP server and guess what, nobody put the necessary investment in over 8 years since this limitation has been known.
Rémi Denis-Courmont
https://www.remlab.net/
Private messages soliciting support will be systematically discarded

Enver
New Cone
New Cone
Posts: 6
Joined: 25 Apr 2013 11:29

Re: HLS streaming stops:"command 'quit' and I have no idea w

Postby Enver » 09 Jun 2013 20:06

Ok. I understand. I thought it would work since the option seems to be there in the GUI.

Have you any idea how I would I go about trying to make sure vlc keeps streaming ? I can't have the HLS conversion stream die, this is a semi-automated system :twisted:

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

Re: HLS streaming stops:"command 'quit' and I have no idea w

Postby Rémi Denis-Courmont » 10 Jun 2013 17:46

There is no such option in the GUI (and there would not be even if it was implemented, since it is negotiated automatically through RTSP).
Rémi Denis-Courmont
https://www.remlab.net/
Private messages soliciting support will be systematically discarded


Return to “General VLC media player Troubleshooting”

Who is online

Users browsing this forum: No registered users and 113 guests