Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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.
The "async 1" is a legacy option, but is required IME to achieve av sync. The -filter_complex is the new way (in theory) but doesn't seem to do anything without "async 1". The parms past it should be defaults (long hand in case I needed to adjust). The -r:v 5 is the fps, which you have to keep without the computation specs of your device and it's optimizations. Most of mine being dual cores with 2GB ram at about 2GHz each core, so 5fps is the safe zone which allows me to capture and do stuff. And avconv which is the fork of ffmpeg in debian jessie.
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.
Which is the highest resolution at the framerate my low spec'd gear can handle. And turning the LED OFF since that reflects if you have it pointed out a window. Sometimes I have to unplug and replug the webcam for that LED option to exist. Even after a cold boot.
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).
.
Thanks a lot Shadow. It's going to take me a while to digest that but I can see there's a lot of good information in there. Appreciate it.
Thanks Erik. Since I already had VLC I tried it and I made some .mp4s and it worked really nicely. What I'm finding now is different stuff plays stuff out of sync. Like when I put the mp4 into OpenShot video it's horribly out of sync.
I guess there will be a learning curve with this stuff. Thanks for getting me started.
That's what the -async 1 and -filter_complex stuff does for me, is maintain sync over a duration at the point of capture. Otherwise you have to do maths and fudge the audio track to fit the video. No matter how good you get at that artform, it is never perfect and you're always wondering if you made it better or worse.
Distribution: Mainly Devuan with some Tiny Core, Fatdog, Haiku, & BSD thrown in.
Posts: 5,014
Rep:
I've been using guvcview for a few months now, so I am just checking to make sure you did select your webcam as the input for the program, as it doesn't automatically select external sources of mic or camera.
That's what the -async 1 and -filter_complex stuff does for me, is maintain sync over a duration at the point of capture. Otherwise you have to do maths and fudge the audio track to fit the video. No matter how good you get at that artform, it is never perfect and you're always wondering if you made it better or worse.
Thanks Shadow. I would hate to have to try to sync it manually. I got Kendive or Kenlive and that was slightly out of sync playing MP4s. So far the best is recording with VLC.
I've been using guvcview for a few months now, so I am just checking to make sure you did select your webcam as the input for the program, as it doesn't automatically select external sources of mic or camera.
Thanks fatmac. I thought I had it! I went back and checked guvcview and the camera was linked. But I couldn't get the video to work. Still captures and the audio portion of attempted video captures was fine. But it would just be a still and the audio. These were the default settings (see screenshot). I messed with them a bit but couldn't get the video to work. This looks like it would be really good.
As you can see it was making .mkv files. I was looking to see if it would make .mp4s and couldn't see a way to do it.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.