Can't get webcam to capture video with guvcview
I bought a Logitech HD Pro Webcam C920. I tried it with Cheese and the stills are great but the video and audio are terrbily out of sync. I tried Guvciew and I get: Could not start a video stream in the device.
Anybody know how I could get this thing capturing video well? Thanks. |
It's probably not a guvc webcam if it works with Cheese, but not with Guvcview.
What distro/version are you using and what is your graphics card? (Your user agent icon says "Ubuntu," but many Ubuntu derivatives will report as Ubuntu in their user agent strings.) |
Quote:
|
Quote:
youtubing |
Quote:
Code:
gregory@gregory-GA-A55M-DS2:~/Desktop$ lspci | grep VGA |
Quote:
|
If you have cheese already open, guvview won't be able to grab the video from the webcam.
Just a thought. I would suggest trialling OBS (Open Broadcast Studio). It's a little overkill for just recording a webcam, but I've been using the C920 webcam and it's been flawless 1920p 30fps ever since I got it (no special config done) You could of course use mplayer or ffmpeg to simply record from the webcam to a file. |
Quote:
P.S. I did not have Cheese and guvcview open at the same time. |
Quote:
But if it's just a fullscreen of you and you want to be able to see yourself, you could try a desktop recorder like recordmydesktop or kazam and doing something like mplayer -fs -x 1920 -y 1080 tv:// I still suggest OBS though. You can have it record you in full screen and let you do other stuff at the same time. If you want to see yourself, just bring up the OBS window It should be in repo: obs-studio |
1 Attachment(s)
Quote:
|
EDIT: Yup, just follow the instructions in that image. If you have ffmpeg installed, you don't need to follow the top part.
You're running some form of Ubuntu? I think you need to add their ppa first. You have ffmpeg installed yeah? You should be able to follow this https://github.com/jp9000/obs-studio...ructions#linux Code:
Ubuntu installation |
to screen capture with ffmpeg
Code:
ffmpeg -r 30 -s 1600x900 -f x11grab -i :0.0 -vcodec msmpeg4v2 -qscale 2 screencap001.avi |
Technically there a compressed stream coming off that webcam already. You shouldn't have any sync issues capturing that. It's a common device for beaglebone black, which isn't that beefy specs wise. If you have enough computes you can play it back on screen and screen capture.
Code:
$ mpv --ao=pulse --vo=opengl --video-zoom=0 --framedrop=vo \ Not sure if the old way of $(/dev/video0 > capture.raw) would work for that one, it does have an onboard encoder. You'll likely need to set attributes with v4l2-ctl, uvcdynctrl, and friends. With tools like vlc you need to pass the parameters to vlc if it's not the default (highest capability). guvcview is good for setting preferences, but vlc will ignore them. While mpv will go with the flow / inherit attributes IME. Where IME equals in my experience. In the case of my c270, playback via longhand: Code:
uvcdynctrl --device=video1 --set 'LED1 Mode' 0 'LED1 Frequency' 0; \ If the MJPG format is supported, then vlc can stream the webcam over the network. Although it's a lot of data and 960x720 @ 5fps is the best I could do without capping out the bitrate of a 10/100 network (rpi B). . |
I tend towards the screen capture because the webcam is often a variable frame rate device and sync is an issue. For example if I set capture at 30 fps, the webcam will still drop to 15 fps in low light. Capturing the screen lets you set a fixed frame rate (and keep it). Not a lot of webcams give you much control of basic camera settings like frame rate, aperture, iso, and such.
|
Quote:
Thanks Sefyir. Yeah, I should've said I have Xubuntu 16.04LTS so I should be okay following the instructions. Appreciate it! |
All times are GMT -5. The time now is 05:28 PM. |