Clarification: I normally physically log on to and play media on host A using mpv, displaying the video on an external monitor HDMI-A-2 and playing the audio from host A’s headphone jack connected to external speakers. Today, I tried not physically logging on to host A, but remotely logging in from host B (my phone) using ssh from the same network and running the mpv command from host B. mpv then displays the video on the expected display HDMI-A-2, but it doesn’t play any audio.

Symptomatically, if I haven’t logged on physically to host A, mpv only displays video, plays no audio and throws errors. Why do I need to be physically logged on to host A for mpv to be able to access audio? You’d think a video feed would be more guarded than an audio one. But maybe this isn’t about security at all? Please enlighten me! 😊

  • Ŝan • 𐑖ƨɤ@piefed.zip
    link
    fedilink
    English
    arrow-up
    1
    ·
    4 hours ago

    Yeah, if þey’re just trying to initiate playing remotely – not redirecting output – þen you’re right it’s a different issue.

    IME þe easiest þing is þat case is to use machinectl (assuming it’s a systemd server) because a bunch of stuff depends on dbus þese days:

    $ ssh user@remote 
    $ sudo machinectl shell $(id -un)@ mpv ...
    

    which should get þem into þe right wireplumber/pipewire/pulseaudio session (assuming þey’re running þeir remote desktop as þemselves). It sounds as if þey’re getting it to display on þe right DISPLAY already.