The Computer Oracle

VLC: Can I stream over SSH?

--------------------------------------------------
Rise to the top 3% as a developer or hire one of them at Toptal: https://topt.al/25cXVn
--------------------------------------------------

Music by Eric Matyas
https://www.soundimage.org
Track title: Puzzle Game Looping

--

Chapters
00:00 Vlc: Can I Stream Over Ssh?
01:53 Accepted Answer Score 31
02:10 Answer 2 Score 0
02:52 Answer 3 Score 1
03:33 Answer 4 Score 5
03:49 Thank you

--

Full question
https://superuser.com/questions/781581/v...

--

Content licensed under CC BY-SA
https://meta.stackexchange.com/help/lice...

--

Tags
#ssh #vlcmediaplayer #streaming

#avk47



ACCEPTED ANSWER

Score 31


Try SFTP. It's the protocol used by SSH to transfer files and is supported by VLC in the Open Network Stream menu by typing sftp://<server>/<path to file> and then authenticating.




ANSWER 2

Score 5


Three steps:

  1. Generate a new SSH key for easy authentication with ssh-kegen.
  2. Use ssh-copy-id to copy the key to the server.
  3. On the commandline, type

    vlc sftp://user@host:/path/to/file
    



ANSWER 3

Score 1


I had trouble getting VLC to play when inputting the location of my file as well. I then opened the sftp in my file browser and double-clicked the video to launch it in VLC, it worked fine. I checked what the URL looks like under the playlist properties and it is formatted as:

/run/user/1000/gvfs/sftp:host=HOSTNAME/PATH/TO/FILE.EXT

Where you would need to replace 1000 with the uid of the remote user I would assume, and HOSTNAME and '/PATH/TO/FILE.EXT' respectively.

Hope that helps someone. In the end however, the easiest solution is browsing to the file via file browser and simply opening with VLC from there.




ANSWER 4

Score 0


I had the same problem but the file I wanted to stream was still being modified (because it's a live recording, but that could also happen if you use your ssh server to download a movie for instance). In that case, Mark's method is not working since the download stops when the size of the file has reached the size at the beginning of the download.

But I wrote a Java program that basically resume the download as long as the file is getting bigger. If someone is interested, the program is there:

How to use VLC to watch a file (while it is being modified) on a SSH server (using sftp or smth else)?