Reputation: 298
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.
Upvotes: 1
Views: 4107
Reputation: 8989
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.
Upvotes: 2