webcam Debian Buster, replacing mplayer

More
04 Dec 2020 13:51 - 03 Jan 2021 12:10 #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.
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





Using the proper camera name is crucial. You can get a list of all the video capable hardware if you do a
sudo ls -la /dev/video*
You can also find the proper name if you do a
dmesg
with unplugged camera and then plugin the camera and do another
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:
--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.
--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.
--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,
https://mpv.io/manual/stable/
Hope this helps.

mpv.io
ffmpeg.org/ffmpeg-filters.html#drawbox
Attachments:
Last edit: 03 Jan 2021 12:10 by ikkuh.
The following user(s) said Thank You: tommylight, chrisfairbrothern, Aciera

Please Log in or Create an account to join the conversation.

More
02 Jan 2021 22:11 #193896 by tecno

Please Log in or Create an account to join the conversation.

Moderators: newbynobi
Time to create page: 0.113 seconds
Powered by Kunena Forum