how to stream a playlist as one continuous stream?

About encoding, codec settings, muxers and filter usage
mangoo
Blank Cone
Blank Cone
Posts: 46
Joined: 16 Jul 2007 12:05
Contact:

how to stream a playlist as one continuous stream?

Postby mangoo » 17 Jul 2007 15:23

I have a playlist, on which I have several videos.

Normally, when I stream it, the client disconnects when one video ends, and the second starts.

Is it possible to stream a playlist with several videos as one, continuous stream?

dionoea
Cone Master
Cone Master
Posts: 5157
Joined: 03 Dec 2003 23:09
Location: Paris, France

Re: how to stream a playlist as one continuous stream?

Postby dionoea » 17 Jul 2007 16:32

Sure, try adding --sout-keep to your command line (or check the corresponding checkbox somewhere in the interface (or use a 0.9.0 development build since that option is now default enabled)).
Antoine Cellerier
dionoea
(Please do not use private messages for support questions)

mangoo
Blank Cone
Blank Cone
Posts: 46
Joined: 16 Jul 2007 12:05
Contact:

Re: how to stream a playlist as one continuous stream?

Postby mangoo » 17 Jul 2007 16:47

Sure, try adding --sout-keep to your command line (or check the corresponding checkbox somewhere in the interface (or use a 0.9.0 development build since that option is now default enabled)).
All right, so it's possible.

And is it possible to play each position from the playlist only for 5 or 10 seconds, and then, repeat the list from the beginning?

This would be a solution to my "round-robin streaming from several cameras?" post:

viewtopic.php?f=4&t=39122
Last edited by mangoo on 17 Jul 2007 17:15, edited 3 times in total.

dionoea
Cone Master
Cone Master
Posts: 5157
Joined: 03 Dec 2003 23:09
Location: Paris, France

Re: how to stream a playlist as one continuous stream?

Postby dionoea » 17 Jul 2007 17:09

It indeed would be possible with a 0.9.0 developement version of VLC. This adds the "--run-time <time in s>" option which you could use to set the delay. (Please add a link to the end of the other thread to this topic just to make sure that the two are linked in case someone ever wants to do the same thing)
Last edited by dionoea on 20 Jul 2007 11:59, edited 2 times in total.
Reason: Fix sentence. Run time is in seconds, not miliseconds.
Antoine Cellerier
dionoea
(Please do not use private messages for support questions)

mangoo
Blank Cone
Blank Cone
Posts: 46
Joined: 16 Jul 2007 12:05
Contact:

Re: how to stream a playlist as one continuous stream?

Postby mangoo » 20 Jul 2007 11:56

It indeed would be possible with a 0.9.0 developement version of VLC. This adds the "--run-time <time in ms>" option which you could use to set the delay. (Please add a link to the end of the other thread to this topic just to make sure that the two are linked in case someone ever wants to do the same thing)
Actually, the time is in seconds.

Is there a way to repeat a playlist from the beginning if it reaches the last item?

I know it's possible to do so in GUI (no repeat, repeat all, repeat on; also playlist-related: random, no random) - but what are the command line equivalents?


Note - using:

-R, --repeat, --no-repeat Repeat current item (default disabled)

only seem to repeat the first item from the playlist; but it's the playlist that should be repeated.

dionoea
Cone Master
Cone Master
Posts: 5157
Joined: 03 Dec 2003 23:09
Location: Paris, France

Re: how to stream a playlist as one continuous stream?

Postby dionoea » 20 Jul 2007 11:58

Ah right, sorry about that (i'll fix my previous post in case someone else ever reads it :p).

You can enable loop with --loop or -L (both should work). To get the full list of VLC options just run

Code: Select all

vlc -H --advanced --help-verbose --color
.
Antoine Cellerier
dionoea
(Please do not use private messages for support questions)

mangoo
Blank Cone
Blank Cone
Posts: 46
Joined: 16 Jul 2007 12:05
Contact:

Re: how to stream a playlist as one continuous stream?

Postby mangoo » 20 Jul 2007 11:59

Eek, I must be blind:

-L, --loop, --no-loop Repeat all (default disabled)

:)

dionoea
Cone Master
Cone Master
Posts: 5157
Joined: 03 Dec 2003 23:09
Location: Paris, France

Re: how to stream a playlist as one continuous stream?

Postby dionoea » 20 Jul 2007 12:00

hehe :)
Antoine Cellerier
dionoea
(Please do not use private messages for support questions)

mangoo
Blank Cone
Blank Cone
Posts: 46
Joined: 16 Jul 2007 12:05
Contact:

Re: how to stream a playlist as one continuous stream?

Postby mangoo » 20 Jul 2007 12:19

Is it just me, or streaming doesn't work very well in VLC 0.9.0 (svn rev 20826)?

Some examples (in GUI):

Media -> Streaming -> pick a playlist file (i.e., playlist.xspf) ->
-> VLC will quote the file -> "playlist.xspf"
-> press Stream
-> in "Stream Output" window, from Outputs, choose just "Play locally"
-> Press stream

Nothing streams, and the error is:

File reading failed:
VLC could not open file ""/home/user/playlist.xspf" " (No such file or directory).
Your input can't be opened:
VLC is unable to open the MRL '"/home/user/playlist.xspf" '. Check the log for details.

So, VLC thinks the quotes are a part of the filename.

Let's repeat it:

Media -> Streaming -> pick a playlist file (i.e., playlist.xspf) ->
-> VLC will quote the file -> "playlist.xspf" - remove the quotes -> playlist.xspf
-> press Stream
-> in "Stream Output" window, from Outputs, choose just "Play locally"
-> Press stream
-> "Stream Output" window appears again, you have to choose "Play locally" again, and again

Sometimes, it just works (usually, when VLC was just started).
Sometimes, VLC segfaults on this.

mangoo
Blank Cone
Blank Cone
Posts: 46
Joined: 16 Jul 2007 12:05
Contact:

Re: how to stream a playlist as one continuous stream?

Postby mangoo » 20 Jul 2007 12:29

Also, when I don't use local output, I just can't stream anything.

Streaming VLC (0.9.0-svn) listens on port; a client VLC (0.8.6c) can connect to it, about 500 bytes are sent both ways, and after a couple of seconds, the connection closes.

mangoo
Blank Cone
Blank Cone
Posts: 46
Joined: 16 Jul 2007 12:05
Contact:

Re: how to stream a playlist as one continuous stream?

Postby mangoo » 20 Jul 2007 12:45

Hmm - when I start from command line, it does seem to play.

Another way to segfault VLC is to do:

Playlist -> Open playlist

and bang, VLC is not there anymore. At least for me. I can just hope these are the wonders of svn snapshots :)

mangoo
Blank Cone
Blank Cone
Posts: 46
Joined: 16 Jul 2007 12:05
Contact:

Re: how to stream a playlist as one continuous stream?

Postby mangoo » 20 Jul 2007 12:46

Sure, try adding --sout-keep to your command line (or check the corresponding checkbox somewhere in the interface (or use a 0.9.0 development build since that option is now default enabled)).
I noticed, it only works with some forms of encapsulation (i.e., doesn't work with asf)?

dionoea
Cone Master
Cone Master
Posts: 5157
Joined: 03 Dec 2003 23:09
Location: Paris, France

Re: how to stream a playlist as one continuous stream?

Postby dionoea » 20 Jul 2007 14:00

The GUI in 0.9.0 is kind of broken, especially on Windows (but it'll work fine command line).

To get continuous streaming with all muxes (ie: those other than ts), you need to use the gather module in sout. Your command line would look something like:

Code: Select all

vlc -vvv --color -I dummy theplaylist.ext -L --sout-all --sout "#transcode{...}:gather:std{...}"
I'll let you fill in the transcode and std module's arguments (or just use #gather:std{...} if no transcode is needed).
Antoine Cellerier
dionoea
(Please do not use private messages for support questions)

mangoo
Blank Cone
Blank Cone
Posts: 46
Joined: 16 Jul 2007 12:05
Contact:

Re: how to stream a playlist as one continuous stream?

Postby mangoo » 20 Jul 2007 17:02

All right, this is my "ultimate code" - it cycles all items from a playlist every 15 seconds, repeats the playlist from the beginning, and doesn't display GUI:

vlc --sout-all --run-time 15 -I dummy -L playlist.xspf --sout "#transcode{vcodec=WMV2,vb=128,scale=1.000000}:gather:std{access=mmsh,dst=:1755,mux=asfh}"

This is the HTML code that plays it on a website:

<embed type="application/x-mplayer2"
src="mms://192.168.111.159:1755"
width="320"
height="240"
autostart="1"
autoplay="1"
showcontrols="0"
controller="0">
</embed>


Still, would be interesting to know why mplayer can't play MMS streams generated by VLC:

viewtopic.php?f=4&t=33824

openstep
Blank Cone
Blank Cone
Posts: 10
Joined: 11 Dec 2007 14:23

Re: how to stream a playlist as one continuous stream?

Postby openstep » 12 Dec 2007 11:42

Hi,

I see you guys are advanced in this topic. Maybe you could help me a bit.

Hi,
Is there a way to tell vlc to start playing a certain file on startup?
I would like to copy vlc to a cd with a movie and make it autorun. This will lunch vlc then vlc start with that file.

So how can I tell vlc to start playing a certain file on startup?

Thanks

I have tried this:
in the autorun:
[AutoRun]
open=vlc.exe --fullscreen input.avi
or
open=vlc.exe --playlist-autostart input.avi
these did not work

just simply opened up vlc and I had too press play, but I want it to play right away

Flashbond
New Cone
New Cone
Posts: 1
Joined: 22 Jan 2014 14:13

Re: how to stream a playlist as one continuous stream?

Postby Flashbond » 24 Jan 2014 12:50

I am using 2.1.2 zip version. I had experienced the same problem problem but sout:all solved everything!


Return to “VLC stream-output (sout)”

Who is online

Users browsing this forum: No registered users and 29 guests