Controling a stream via SSH after it has been started

About encoding, codec settings, muxers and filter usage
EldritchCode
New Cone
New Cone
Posts: 4
Joined: 30 Jul 2018 02:43

Controling a stream via SSH after it has been started

Postby EldritchCode » 30 Jul 2018 03:09

Hi, I've recently been playing about with VLC streams using the linux console via SSH but I am unsure of how to then control the stream after I have started it as I can no longer input commands without using ctrl-c which would exit the session. At the moment to start a stream and have access to controls on the local machine I am using:

Code: Select all

DISPLAY=:0 vlc audio/stream.xspf -A alsa,none --alsa-audio-device default --sout '#transcode{vcodec=none,acodec=mp3,ab=128,channels=2,samplerate=44100}:duplicate{dst=http{mux=mp3,dst=:8181/},dst=display}' :sout-keep
From the remote machine this will launch the VLC GUI and start the stream playlist on the local machine so that I can then physically go to the local machine and use the GUI to control the stream, however what I would like to do is be able to skip back and forth and have all control options on the remote machine via SSH. I have also tried using cvlc without the display command but its the same result. I also tried duplicating the SSH session but the duplicate session doesnt seem to be able to access the stream.

Once started the cursor just returns a new line and dosn't process input, you could type anything and nothing would happen, I am not sure what the proper term for that state is.

EldritchCode
New Cone
New Cone
Posts: 4
Joined: 30 Jul 2018 02:43

Re: Controling a stream via SSH after it has been started

Postby EldritchCode » 31 Jul 2018 00:55

I have figured out how to take control of the stream via SSH after you have started it. Typing - or -- will give an error in libvlc saying it is not a valid command and then take you back to an inputtable state allowing you to then enter the VLC console commands to control the playback of the stream.

-edit- Just discovered using - or -- only works if you launch the VLC GUI on the local machine using:

Code: Select all

DISPLAY=:0 vlc

If you use cvlc then it wont detect - or -- as an input and will remain stuck, the console will only accept ctrl-z/c to suspend or quit the process.

unidan
Developer
Developer
Posts: 1493
Joined: 25 Mar 2018 01:00

Re: Controling a stream via SSH after it has been started

Postby unidan » 31 Jul 2018 10:42

Hi,

Are you looking for the rc interface ? You can start it through

Code: Select all

vlc -I rc
( where I is a caps i )

If you want to have both GUI and rc interfaces you can run

Code: Select all

vlc -I qt --extraintf rc

EldritchCode
New Cone
New Cone
Posts: 4
Joined: 30 Jul 2018 02:43

Re: Controling a stream via SSH after it has been started

Postby EldritchCode » 31 Jul 2018 15:53

Hi,
Yea I had been reading the documentation on using rc as I believe that is what I was wanting to use, but I still hit the same problem where when I play anything on the local machine only or accross the network the process would stop accepting input (the return wouldn't produce a > to start a new input line), it was just last night I discovered entering a dash would get accepted as an input then throw an error stating that it is not a valid command which would then put me back into a controllable state that would accept input again

unidan
Developer
Developer
Posts: 1493
Joined: 25 Mar 2018 01:00

Re: Controling a stream via SSH after it has been started

Postby unidan » 02 Aug 2018 13:46

Are you opening vlc through the command line above or through usual shortcuts/launcher ?

EldritchCode
New Cone
New Cone
Posts: 4
Joined: 30 Jul 2018 02:43

Re: Controling a stream via SSH after it has been started

Postby EldritchCode » 02 Aug 2018 19:29

Through the command line, I have the command saved to a script file so I can just run ./nameoffile so my steps are basically, power on server, access server via SSH then from the SSH terminal I use ./VLC_GUI_STREAM

The script file is

Code: Select all

#!/bin/bash DISPLAY=:0 vlc audio/stream.xspf -A alsa,none --alsa-audio-device default --sout '#transcode{vcodec=none,acodec=mp3,ab=128,channels=2,samplerate=44100}:duplicate{dst=http{mux=mp3,dst=:8181/},dst=display}' :sout-keep


Return to “VLC stream-output (sout)”

Who is online

Users browsing this forum: No registered users and 35 guests