Page 1 of 1

vlm media player (streaming)

Posted: 11 May 2011 23:07
by freenode5
is there a way to get a direct pointer to the libvlc_media_player_t inside of vlm?

Or, how would you stream one media file right after another?

example:

Code: Select all

libvlc_vlm_add_broadcast(...,FirstFile,...); libvlc_vlm_add_broadcast(...,SecondFile,...); // now play these two files in a row but don't kill the stream

Re: vlm media player

Posted: 12 May 2011 09:25
by Rémi Denis-Courmont
There is no libvlc_media_player_t inside VLM, so fatally, you cannot get "it".

Re: vlm media player

Posted: 12 May 2011 13:51
by freenode5
any idea how I would solve the problem then?
(the problem being: how to stream files in a sequence)

Re: vlm media player

Posted: 12 May 2011 14:54
by Rémi Denis-Courmont
Create a media list player object?

Re: vlm media player

Posted: 12 May 2011 16:36
by freenode5
I already have one of those laying around but getting it, or any other sequence, to stream is the trick

Re: vlm media player (streaming)

Posted: 12 May 2011 17:33
by Rémi Denis-Courmont
An interface to streaming output in LibVLC is yet to be written. You can still use "--sout=..." in libvlc_new() though.

Re: vlm media player (streaming)

Posted: 13 May 2011 13:55
by freenode5
I had no idea you could use sout in vlc_args.
I really wish I'd known that 3 weeks ago, or that someone had mentioned it earlier.

It's perfect and does exactly what I want.

Now just by adding: "--sout=#transcode{acodec=mp3,ab=128,channels=2,samplerate=44100,mux=mp3}:http{dst=:8090/file.mp3}"
to my list of vlc args, I can use the usual media player and media list player to stream both individual mp3 files, as well as any pls files.


Sorry if it seems cluttery, but for the sake of anyone who ever decides to search for this, I'm going to add this to my old thread as well.

Re: vlm media player (streaming)

Posted: 13 May 2011 15:02
by Rémi Denis-Courmont
Problem with that is, you are entirely dependent on the command line syntax of the day and available options of your particular LibVLC build. One day, it might just break - unlike proper well-defined function calls.

Re: vlm media player (streaming)

Posted: 18 May 2011 18:00
by ogi11
Can someone please explain how to stream media out using -sout in vlc_args and libvlc_new().

Sorry if this was mentioned earlier! I am new to this.

Thanks.