[FFmpeg-user] save and show video in linux

Moritz Barsnick barsnick at gmx.net
Fri Mar 4 10:35:06 CET 2016


On Thu, Mar 03, 2016 at 23:39:42 +0600, shuvro majumder wrote:
> ffmpeg -f video4linux2 -s vga -r 20 -i /dev/video0 out.mpg
> 
> but as I cant see what I am recording, it is a great problem.
> can someone please provide a command to save and show video (not web
> streaming) at the same time?

ffmpeg supports two outputs at the same time, and one of them can be a
display driver:
$ [...] -i /dev/video0 out.mpg -f sdl :0
Them "out.mpg" is the first output term, "-f sdl :0" is the second one.
If your ffmpeg isn't compiled with SDL support, you might want to try
"-f xv :0". Check which ouput devices your ffmpeg supports with "ffmpeg
-devices" (there's an 'E' in the third column for the output devices).

Moritz


More information about the ffmpeg-user mailing list