Need help with complex streaming setup

About encoding, codec settings, muxers and filter usage
Nasrudin
New Cone
New Cone
Posts: 9
Joined: 08 Mar 2013 02:02

Need help with complex streaming setup

Postby Nasrudin » 17 Apr 2017 03:36

So I've been streaming a personal playlist for some time, and I'm trying to improve my vlm-fu and save some network bandwidth. I keep running into little problems that I can't seem to solve, despite googling. (Please keep in mind that search results vary by user, so telling me to google X may not work for me but it will work for you.) Let me know if I've posted in the wrong place for this. I'm using VLC media player 2.2.4 Weatherwax (revision 2.2.3-37-g888b7e89).

Currently I'm trying to provide an HTTP stream for travelling and a RTP stream for my local lan. I do this (in /bin/sh):

Code: Select all

export DISPLAY="" vlc $playlist \ --sout-all --ttl=30 --sout-keep \ --sout-mux-caching=50000 \ --http-host=1.2.3.4 --http-port=8001 \ --sout '#gather:duplicate{dst="transcode{acodec=vorb,channels=2}:std{access=http,mux=ogg}",dst="transcode{acodec=mp4a,channels=2}:rtp{mux=ts,sdp=sap,dst=224.25.1.15,name=MyMusic}"}' \ -v
For the curious, I found the 'export DISPLAY' to be the only way to tell vlc not to spawn a GUI. I have three issues that I'd appreciate any insight on.

1) In between songs, there is a noticeable 1-2 second delay of music. I've noticed this in the logs on almost every song change:

Code: Select all

[aac @ 0x818428900] Queue input is backward in time
2) I keep getting these:

Code: Select all

[000000080e806350] mux_ts mux warning: packet with too strange dts (dts=8373548817,old=8373906477,pcr=8373906477)
I'm not sure what that means or if I should even be concerned.

3) The HTTP stream plays anywhere I ask it to (even on android, thank you!). However, the RTP stream plays on FreeBSD 10 and MacOS 10.11, but not windows 7. I can see the SAP announcement fine but when I click on it (OR when I actually manually type the rtp://... line) it claims to be looking for an ogg demuxer? Here's the log:

Code: Select all

qt4 debug: IM: Setting an input rtp debug: detected MPEG2 TS rtp debug: added payload type 33 (f = 90000 Hz) rtp debug: added RTP source (ebe5c72b) core debug: creating demux: access='' demux='ogg' location='' file='(null)' core debug: looking for demux module matching "ogg": 66 candidates ogg debug: File length is 0 bytes
And one more issue I've been curious about:

4) This:

Code: Select all

000000080e806250] core mux warning: no more input streams for this mux [000000080e806350] core mux warning: no more input streams for this mux [0000000818427050] avcodec generic warning: Physical channel configuration not set : guessing [000000080e806250] core mux warning: late buffer for mux input (290722) [000000080e806250] mux_ogg mux warning: Can't add new stream 0/1: Considerer increasing sout-mux-caching variable [000000080e806250] mux_ogg mux warning: Resetting and setting new identity to current streams
Any insight into any of these issues is appreciated. Thank you in advance for reading.

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

Re: Need help with complex streaming setup

Postby Rémi Denis-Courmont » 17 Apr 2017 10:29

The Windows box has been misconfigured. Reset the preferences.
Rémi Denis-Courmont
https://www.remlab.net/
Private messages soliciting support will be systematically discarded

Nasrudin
New Cone
New Cone
Posts: 9
Joined: 08 Mar 2013 02:02

Re: Need help with complex streaming setup

Postby Nasrudin » 17 Apr 2017 23:45

The Windows box has been misconfigured. Reset the preferences.
That worked! Thanks. :D

If I have two VLC listening to the same stream on the same switch but different OS, will the sound remain in sync?

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

Re: Need help with complex streaming setup

Postby Rémi Denis-Courmont » 18 Apr 2017 19:54

The sound will not be in sync in the first place, so the question makes no sense.
Rémi Denis-Courmont
https://www.remlab.net/
Private messages soliciting support will be systematically discarded

Nasrudin
New Cone
New Cone
Posts: 9
Joined: 08 Mar 2013 02:02

Re: Need help with complex streaming setup

Postby Nasrudin » 18 Apr 2017 21:27

The sound will not be in sync in the first place, so the question makes no sense.
In an RTP stream, I believe my stream source is multicasting UDP packets to subscribed machines. If I have two of these subscribed machines running VLC listening to the same RTP stream (which is multicasted) on the same switch, will the sound remain in sync? If not, how can I sync the sound?

Nasrudin
New Cone
New Cone
Posts: 9
Joined: 08 Mar 2013 02:02

Re: Need help with complex streaming setup

Postby Nasrudin » 20 Apr 2017 06:46

After thinking about this a bit, the statement "the sound will not be in sync in the first place" makes no sense to me.

If I have one VLC multicasting an RTP stream, and K VLCs (where K is an integer greater than 2) on K different machines listening to the same multicast stream on the same switch, the UDP packets arrive at the same time to all machines involved. Each UDP packet is only sent once and received by all machines on the switch (assuming it's not dropped); there is only one UDP stream after all because it's multicast.

With one stream, and K listeners, there is no way that the stream is out of sync with itself for all relevant values of K (I know that K has to be one less than the number of ports on the switch).

It would help greatly if you could explain further or point out where I am somehow misunderstanding this situation. Thank you.

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

Re: Need help with complex streaming setup

Postby Rémi Denis-Courmont » 20 Apr 2017 17:38

Each machine will have varying processing latency and buffers. Just like multiple digital TVs showing the same channel are not necessarily in sync.
Rémi Denis-Courmont
https://www.remlab.net/
Private messages soliciting support will be systematically discarded

Nasrudin
New Cone
New Cone
Posts: 9
Joined: 08 Mar 2013 02:02

Re: Need help with complex streaming setup

Postby Nasrudin » 20 Apr 2017 22:49

Is there any way to cause each machine to be in sync? Such as tuning the buffer sizes or using the 'clock synchronization' preferences?


Return to “VLC stream-output (sout)”

Who is online

Users browsing this forum: No registered users and 11 guests