1

The mplayer command can grab video when to insert usb-camera into usb slot.

mplayer -tv driver=v4l2:width=352:height=288:device=/dev/video0 tv://

The video grabed by usb-camera can be displayed on the screen,
how to output the grabbed vedio into a file with mplayer?

 mplayer -tv driver=v4l2:width=352:height=288:device=/dev/video0 tv://home/test.mp4

The command can't grab video into /home/test.mp4.

Javier
  • 678
  • 5
  • 17
showkey
  • 482
  • 42
  • 140
  • 295

1 Answers1

2

Try the dumpstream option

https://www.mplayerhq.hu/DOCS/HTML/en/streaming.html

mplayer -tv driver=v4l2:width=352:height=288:device=/dev/video0  -dumpstream -dumpfile test.mp4   tv://

On my install I've sometimes had issues with mp4, so it may be worth trying a different file extension or two to see if it finds a better encoding.

GregHNZ
  • 7,946
  • 1
  • 28
  • 30