Unable to stream multiple files continuously (Solved)

About encoding, codec settings, muxers and filter usage
GraphiteCube
New Cone
New Cone
Posts: 4
Joined: 22 Aug 2009 08:27
Location: Hong Kong S.A.R.

Unable to stream multiple files continuously (Solved)

Postby GraphiteCube » 22 Aug 2009 09:18

Hi. I am trying to stream music over HTTP using VLC as streaming server. Some basic issues have been solved after spending hours on testing.

I have 3 problems left:

1. I am streaming more than one MP3 files (about 80) from my server, but the client will stop after playing 1 MP3 file. When I click on play button on client again, the client will play the stream without problem - but after playing 1 song it will stop again. The client I use is VLC.

2. I then tried to use Windows Media Player to play the stream, but it said it couldn't open the stream.

3. Although I applied transcoding module in my command, when I tried to view the media information, the media stream is still streaming music at original bitrate (eg. 128 kbps).

The command I executed on VLC (the streaming server) is:

Code: Select all

vlc Music/*.mp3 --random --sout '#standard{access=http,mux=ts,dst=192.168.8.20:8000}:transcode{acode=mp3,ab=32,channels=2}'
The MRL I typed in player is:

http://192.168.8.20:8000

My server is running Debian squeeze, VLC 0.9.9a installed.

Any suggestions?

Thanks in advance. :D
Last edited by GraphiteCube on 27 Aug 2009 06:51, edited 1 time in total.

GraphiteCube
New Cone
New Cone
Posts: 4
Joined: 22 Aug 2009 08:27
Location: Hong Kong S.A.R.

Re: Unable to stream multiple files continuously

Postby GraphiteCube » 23 Aug 2009 17:57

Tonight I tried to find out the problem by following steps:

1. Initiate an instance of VLC to stream those MP3 files to http://192.168.8.20:8000.
2. Initidate another instance of VLC to stream the music stream from http://192.168.8.20:8000 to http://192.168.8.20:8080.
3. Open a media player on client to receive the stream from http://192.168.8.20:8080.

So the situation can be represented as:
[VLC instance A]---(Stream to 192.168.8.20:8000)---[VLC instance B]---(Stream to 192.168.8.20:8080)---[Client (VLC too)]

This time I can read an error message from VLC instance B, which is about "unexpected discontinuity of stream".

Image

So I guess there must be something I did wrong, so that the stream from VLC instance A wasn't continuous.

The command I executed to create VLC instance A:

Code: Select all

vlc Music/*.mp3 --random --loop --sout '#standard{access=http,mux=ts,dst=192.168.8.20:8000}:transcode{acode=mp3,ab=32,channels=2}' -I dummy
The command I executed to create VLC instance B:

Code: Select all

vlc http://192.168.8.20:8000 --sout '#standard{access=http,mux=ts,dst=192.168.8.20:8080}:transcode{acode=mp3,ab=32,channels=2}' -I dummy
Could someone give me some hints/ suggestions to troubleshoot the problem? Thanks.

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

Re: Unable to stream multiple files continuously

Postby Rémi Denis-Courmont » 24 Aug 2009 17:36

Code: Select all

vlc Music/*.mp3 --random --loop --sout '#gather:standard{access=http,mux=ts,dst=192.168.8.20:8000}' -I dummy --sout-keep
Rémi Denis-Courmont
https://www.remlab.net/
Private messages soliciting support will be systematically discarded

GraphiteCube
New Cone
New Cone
Posts: 4
Joined: 22 Aug 2009 08:27
Location: Hong Kong S.A.R.

Re: Unable to stream multiple files continuously

Postby GraphiteCube » 27 Aug 2009 06:51

Code: Select all

vlc Music/*.mp3 --random --loop --sout '#gather:standard{access=http,mux=ts,dst=192.168.8.20:8000}' -I dummy --sout-keep
Thank you so much, it works! :)

kdh
Cone that earned his stripes
Cone that earned his stripes
Posts: 224
Joined: 16 Jun 2009 22:38

Re: Unable to stream multiple files continuously (Solved)

Postby kdh » 28 Aug 2009 01:20

Remi, would that work the same for jpg images?

isync
Blank Cone
Blank Cone
Posts: 23
Joined: 18 Oct 2009 14:22

Re: Unable to stream multiple files continuously (Solved)

Postby isync » 18 Oct 2009 14:55

To explain the above: what you need is

1.
The option

Code: Select all

--sout-keep
to keep the output open continuusly.

2.

Code: Select all

:gather
The "gather" module (see the docs for that). Put it into your sout command: "--sout "#gather:transcode{vcod...". But be prepared that it somethimes is the cause for crashes. Be sensible with your input files/formats.


Return to “VLC stream-output (sout)”

Who is online

Users browsing this forum: No registered users and 8 guests