webcam Debian Buster, replacing mplayer

More
5 years 10 months ago #191026 by ikkuh
Since mplayer is no longer maintained and is replaced with mpv I thought I shared my settings to have a webcam shown in gmoccapy.
The syntax has changed a lot, but most things still work.
Code:
EMBED_TAB_NAME = Camera EMBED_TAB_LOCATION = ntb_preview EMBED_TAB_COMMAND = mpv /dev/video0 --wid {XID} --vf-add=drawbox=-1:2:-1:240:t=1 --vf-add=drawbox=2:-1:320:-1:t=1 --no-border


Attachment not found




Using the proper camera name is crucial. You can get a list of all the video capable hardware if you do a
Code:
sudo ls -la /dev/video*
You can also find the proper name if you do a
Code:
dmesg
with unplugged camera and then plugin the camera and do another
Code:
dmesg
. Your camera will be the last hardware in the second list (or in the difference between the first and second dmesg).

For your information, these are pure cosmetic:
Code:
--vf-add=drawbox=-1:2:-1:240:t=1
adds a rectangle on the camera image in such a way that only the ' inner' lines show up.
Code:
--vf-add=drawbox=2:-1:320:-1:t=1
same

The purpose of the rectangles (that form a cross on the image) is to have some crosshairs to better positon the spindle. The location of the crosshairs can be manipulated with the parameters in case your camera has an offset to the spindle axis.
Code:
--no-border
makes the cameraview in the tab in gmoccapy display without an ugly border.

There are many more command line parameters you can pass to mpv,
Code:
https://mpv.io/manual/stable/
Hope this helps.

mpv.io
ffmpeg.org/ffmpeg-filters.html#drawbox

Please Log in to join the conversation.

More
5 years 9 months ago #193896 by tecno

Please Log in to join the conversation.

Time to create page: 0.073 seconds
Powered by Kunena Forum