Showing posts with label Video. Show all posts
Showing posts with label Video. Show all posts

Monday, April 8, 2013

Record webcam video

vlc v4l2:// :v4l2-dev=/dev/video0 :v4l2-width=320 :v4l2-height=240  --sout '#transcode{vcodec=mp4v,vb=3072,scale=1,acodec=mpga,ab=192,channels=2}:duplicate{dst=display,dst=std{access=file,mux=mp4,dst="/tmp/test.mpg"}}'

Webcam is typically /dev/video0 in linux

Grab video frames using VLC

The following grabs every fifth frame starting from second 0:20 and ending on 0:30 (10 seconds). Frames are saved in ./out/ . The number of frames captured depends on the number of frames per second of the video.

vlc video.avi --video-filter=scene --vout=dummy --start-time=20 --stop-time=30 --scene-ratio=5 --scene-prefix=frame --scene-path=./out vlc://quit