Webcam Live Preview with Mplayer - Linux GUI CLI

2,429 views · Published 12 June 2015 · 6:29 · Indexed 12 November 2026

Channel: gotbletu · 2015 · Science & Technology

Watch on YouTube

You might need to install v4l-utils package

# mplayer to display webcam
# hit 's' to take screenshot, will save in current folder
# hit 'S' to take series of screenshot, will save in current folder
# hit 'f' to toggle fullscreen
# hit 'T' to toggle stay-on-top
# hit 'q' or 'Esc' to quit
# https://wiki.archlinux.org/index.php/Webcam_Setup#MPlayer

webcam-list() { v4l2-ctl --list-formats-ext && v4l2-ctl --list-devices ;}

webcam-mplayer() { mplayer tv:// -tv driver=v4l2:width=640:height=360:device=/dev/video0 -fps 30 -vf screenshot -ontop -geometry "99%:95%" ;}

webcam-mplayer-noborder() { mplayer tv:// -tv driver=v4l2:width=640:height=360:device=/dev/video0 -fps 30 -vf screenshot -geometry "98%:98%" -ontop -noborder ;}

Rightclick on titlebar if you need to have window visible on all workspaces/ always on top toggle

More from this channel