How to play on local in MPV camera AV output from remote via SSH?

I need simple thing, play on local in MPV camera AV output from remote via SSH.

I thought it should be simple like this.

ssh 192.168.1.100 -p 22 'ffmpeg -i /dev/video0 -b:v 1M -b:a 150K -' | mpv -

But it fails.

Input #0, video4linux2,v4l2, from '/dev/video0': Duration: N/A, start: 2740.580412, bitrate: 147456 kb/s Stream #0:0: Video: rawvideo (YUY2 / 0x32595559), yuyv422, 640x480, 147456 kb/s, 30 fps, 30 tbr, 1000k tbn, 1000k tbc
[NULL @ 0x555639eb3480] Unable to find a suitable output format for 'pipe:'
pipe:: Invalid argument
Failed to recognize file format.
Exiting... (Errors when loading file)

What is wrong?

Thanks.

1 Answer

You need to tell ffmpeg which output container format / muxer (-f) to use when using a pipe:

ssh -p 22 192.168.1.100 'ffmpeg -i /dev/video0 -c:v libx264 -c:a aac -b:v 1M -b:a 150k -f mpegts -' | mpv -
6

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

You Might Also Like