RetroFed Forums
Your home away from modern life.
[ffmpeg/mpv] How to set up a stream over LAN?
Post Reply
AuthorMessage
printf("%s", name);
piefed.blahaj.zone

akunohana@piefed.blahaj.zone
Joined: 2026-03-30
Posted:   Subject: [ffmpeg/mpv] How to set up a stream over LAN? Quote

I am watching VHS tapes with ffmpeg and piping it into MPV with ffmpeg -f v4l2 -i [my video card] -f alsa -i [my sound card] -c copy -f nut pipe:1 | mpv -. The reason I'm not just playing the video and audio stream off of my capture device is because I want to be able to adjust audio delay in real time with MPV hotkeys. This works well so far. Now, I want to grab the stream from another computer on my LAN. How do I do that? I've been thinking of sshfs, but I can't mount the capture card. Should I stream into a file on the server which I then mount on the client side with sshfs? If I did that, I'd have to delete the file that my command created every time I watched something, no?

19   Original
dgdft
lemmy.world
dgdft@lemmy.world
Joined: 2025-03-26
#2 Posted:   Subject: Re: [ffmpeg/mpv] How to set up a stream over LAN? Quote Reply

Realistically, you'll probably want to encode the stream first to keep bandwidth sane, but I suspect you're looking for something like: ffmpeg -f v4l2 -i [my video card] -f alsa -i [my sound card] -c copy -f nut pipe:1 | ssh username@otherhost 'mpv -'.

13
printf("%s", name);
piefed.blahaj.zone

akunohana@piefed.blahaj.zone
Joined: 2026-03-30
#3 Posted:   Subject: Re: [ffmpeg/mpv] How to set up a stream over LAN? Quote Reply

Realistically, you'll probably want to encode the stream first to keep bandwidth sane, but I suspect you're looking for something like: ffmpeg -f v4l2 -i [my video card] -f alsa -i [my sound card] -c copy -f nut pipe:1 | ssh username@otherhost 'mpv -'.

Sic! I had no idea you can pass commands to ssh like that! Thanks a lot! :)

10
Flyswat
lemmy.dbzer0.com
Flyswat@lemmy.dbzer0.com
Joined: 2023-08-16
#4 Posted:   Subject: Re: [ffmpeg/mpv] How to set up a stream over LAN? Quote Reply

Maybe you should be looking into a proper RTSP video stream. I know VLC can act as a server.

3
TwilightKiddy
scribe.disroot.org
TwilightKiddy@scribe.disroot.org
Joined: 2026-07-27
#5 Posted: · edited   Subject: Re: [ffmpeg/mpv] How to set up a stream over LAN? Quote Reply

If you want another "unga-bunga" approach, you can use netcat:
On the player machine:

nc -l 1234 | mpv -

On the sender machine:

ffmpeg | nc 192.168.1.4 1234

Of course, you can use any unused port instead of 1234.

10
dihutenosa
piefed.social
dihutenosa@piefed.social
Joined: 2025-06-04
#6 Posted:   Subject: Re: [ffmpeg/mpv] How to set up a stream over LAN? Quote Reply

ffmpeg can send video over RTMP or SRT protocols. ffplay can receive and play.

6
printf("%s", name);
piefed.blahaj.zone

akunohana@piefed.blahaj.zone
Joined: 2026-03-30
#7 Posted:   Subject: Re: [ffmpeg/mpv] How to set up a stream over LAN? Quote Reply

If you want another "unga-bunga" approach, you can use netcat: On the player machine: nc -l 1234 | mpv - On the sender machine: ffmpeg | nc 192.168.1.4 1234 Of course, you can use any unused port instead of 1234.

I laughed my ass off. How did netcat enter the chat here. 😂 This is fantastic!!! Thank you!

5
Post Reply Page 1