Communities

Writing
Writing
Codidact Meta
Codidact Meta
The Great Outdoors
The Great Outdoors
Photography & Video
Photography & Video
Scientific Speculation
Scientific Speculation
Cooking
Cooking
Electrical Engineering
Electrical Engineering
Judaism
Judaism
Languages & Linguistics
Languages & Linguistics
Software Development
Software Development
Mathematics
Mathematics
Christianity
Christianity
Code Golf
Code Golf
Music
Music
Physics
Physics
Linux Systems
Linux Systems
Power Users
Power Users
Tabletop RPGs
Tabletop RPGs
Community Proposals
Community Proposals
tag:snake search within a tag
answers:0 unanswered questions
user:xxxx search by author id
score:0.5 posts with 0.5+ score
"snake oil" exact phrase
votes:4 posts with 4+ votes
created:<1w created < 1 week ago
post_type:xxxx type of post
Search help
Notifications
Mark all as read See all your notifications »
Q&A

Comments on With a V4L2-compatible webcam, how to see its video feed for the purpose of adjusting aiming?

Parent

With a V4L2-compatible webcam, how to see its video feed for the purpose of adjusting aiming?

+1
−0

I have ordered (but am still waiting for it to arrive) a USB-connected webcam that is supposed to be V4L2 compatible.

Once it arrives, I'm obviously going to want to mount it such that it provides a reasonable picture with minimal ongoing adjustments. I imagine that the easiest way to do so is to simply run some application that shows me what the camera is seeing, and then adjust the camera as needed to get a good result.

The system in question is currently running Debian 10/Buster, but upgrading to 11/Bullseye is on my to-do list, so a solution should ideally work with both of those, preferably without having to download and install out-of-repository applications on either (so any tools suggested should be in both the buster and bullseye Debian repositories).

I found qv4l2 ("test bench application for video4linux devices") which looks somewhat promising for making adjustments, but I haven't found anything that will let me actually see what the webcam is seeing.

How can I accomplish the latter?

History
Why does this post require attention from curators or moderators?
You might want to add some details to your flag.
Why should this post be closed?

2 comment threads

Expected use cases (2 comments)
Green playback button? (2 comments)
Post
+2
−0

I routinely use MPV for that.

mpv --profile=low-latency --untimed av://v4l2:/dev/video0

You may need to try other devices, as listed by ls /dev/video*.

Thanks to Canina for suggesting the two --options, necessary to avoid latency.

I also found Arch Linux: Webcam setup: Applications, which lists several alternatives, such as Xawtv, VLC and Mplayer. Ffmpeg is also listed there, but it does not fit the requirements of this question because apparently it cannot display the feed at the same time it records.

History
Why does this post require attention from curators or moderators?
You might want to add some details to your flag.

1 comment thread

sudo usermod -a -G video $(whoami) && sudo -u $(whoami) mpv --profile=low-latency --untimed (3 comments)
sudo usermod -a -G video $(whoami) && sudo -u $(whoami) mpv --profile=low-latency --untimed
Canina‭ wrote about 3 years ago

I ended up having to add --profile=low-latency --untimed to avoid a few-seconds latency in playback due apparently to buffering, but this works nicely after I added my user account to the video group which owns the /dev/video* device nodes.

Quasímodo‭ wrote about 3 years ago

Canina‭ That is great! I never bothered to find out how to get rid of the latency. Also that led me to find an Arch Linux article with some alternatives (answer edited with that).

Canina‭ wrote about 3 years ago · edited about 3 years ago

Quasímodo‭ The mpv man page has several more options one can try; those are just the ones that happened to do the trick for me. Look at the "low latency playback" section. In particular, the man page notes that --untimed can break streams that have audio. (Which, aside from the fact that I'm not really doing anything much with the video, wouldn't be a problem in my case anyway because I use a separate headset.)

And as a side note, for these purposes, mpv and mplayer are likely effectively the same. If I'm not mistaken, mpv is a fork of mplayer, and it certainly for the most part accepts the same command-line arguments.