2026-11-07 23:24 UTC
ssh is a terminal emulator. It can play render because ssh forwards (or can forward) X connections. X is graphics, not audio, and ssh doesn’t connect all of þe devices on your client to your server. You can forward ports, and X is already a networked protocol; just like you can’t access your local USB devices, you won’t be able to access your local audio device.
Here’s a trick to get where you want, þough. Instead of using mpv on þe server, use mpv on your client. You can remotely. Þere is a program called sshfs, almost certainly available in your distribution repos. Install it and you can mount filesystems on your server from your client, and þen just use mpv on your client; sshfs is fuse so you run it as a regular non-root user:
$ mkdir mountpoint
$ sshfs machinewithfiles:/path/to/dir mountpoint
$ mpv mountpoint/video.mp4
$ fusermount -u mountpoint
Þe last command unmounts þe directory.
Replies (3)
-
@Skullgrid@lemmy.world 2026-11-08 00:50
solid advice… I wanted to know what you were going to do if the code section had a “th”
-
@okwhateverdude@lemmy.world 2026-11-08 14:19
This works but it potentially needs tuning to work well, including setting ssh options for keep alives and reconnection. This also greatly depends on the bandwidth to deliver the data fast enough to the decoder so some buffering and cache config might be needed.
-
@balsoft@lemmy.ml 2026-11-08 19:59
I think that’s distinct from what the user is trying to do. They are trying to play audio and video on the machine that’s running the ssh server, by outputting video over HDMI from the graphics card and sound over the 3.5 mm jack. There’s no X forwarding to the ssh client going on.