I need to record some video from my webcam, and while Cheese works, it lacks settings, and only outputs the webm format that is full of stutters, etc.
Can't seem to find any alternative...
I need to record some video from my webcam, and while Cheese works, it lacks settings, and only outputs the webm format that is full of stutters, etc.
Can't seem to find any alternative...
Guvcview aims to provide a simple GTK interface for capturing and viewing video from devices supported by the Linux UVC driver, although it should also work with any v4l2 compatible device.
The project is based on luvcview for video rendering, but all controls are build using a GTK2 interface.
Guvcview (since version 0.9.9) has a control only window, (from console:
guvcview --control_only
,--control_panel
in newer versions), this allows image control on other apps, like ekiga, cheese, mplayer, skype...Audio.
Guvcview audio support is based on the portaudio library, up until version 0.9.3 the blocking API was used for audio capture, since version 0.9.4 the callback method is used instead, this provides better performance, it is also the preferred method for the portaudio API.
All interfaces (ALSA, OSD, JACK, ...) supported by portaudio should be available in guvcview. Just make sure portaudio was compiled with the desired interfaces enabled.
UVC Dynamic controls.
The Linux UVC driver has an implementation for extension controls (these are vendor specific controls and are supported in the UVC spec.), they are called dynamic controls since they must be dynamically loaded into the driver.
Until today only logitech has supplied specs for their UVC webcam extension controls, these are supported by guvcview.
In new driver revisions admin rights are needed in order to add these controls to the driver, so there are basically two solutions:
start guvcview as root (using
sudo
) at least once per session, since version 1.2.0 you can do this with the option--add_ctrls
avoiding the need to fully launch guvcviewinstall libwebcam this software has a udev script that should add the necessary controls to your logitech camera.
Install Guvcview to Ubuntu 12.04 via ppa
If you need a new app, guvcview is good.
https://launchpad.net/guvcview
Parts of this question comes from the answer in this question: Record from VHS tapes.
We need to make sure that the software is gathering the proper data from the right device. Let's drop a query in the terminal which will let us see how many devices are connected to your computer, which can be used to gather images, use this command in a terminal:
Results should be like this:
In my case, I have 3 video devices, of which one of them is the USB TV Tuner that I use for watching/recording live TV Shows/VTR/VCR/RF-DVD/Video converter and other RF Signals.
The other devices are USB Webcam attached to USB slots on the computer.
If your webcam is featuring a microphone, both audio and video can be recorded using the tvcap-script by Andreas Schalk, which code I place here for your convenience:
Simply copy/paste all this code in a file called tvcap-script.sh, give the execution permissions and run it in a terminal. The process is quite easy and I am going to explain as follows:
1.- After pressing Enter, you will be asked for the capture source, and dependind on the device's location (tested before), you can have -as in my case- several video sources, I am using the /dev/video2 for this example, which refers to my USB TV Tuner. Note that this screenshot didn't get the window decorator but the options and the "OK" button can be seen right there.
2.- Now we need to define the norm, in Mexico we use NTSC, and unless you wish to capture your video using a different norm with square aspect ratio you should not use PAL, which can indeed harm a bit your video quality. It also depends on where you live and the norm of your country.
3.- My TV Tuner is having several inputs, yours can have a different amount of inputs, check it out and run as many tests as you need to determine which one is the best for your capture. I am going to use the one that refers to TV. (Input 1 (TV))
4.- Next, you may (or not) be warned and offered for a solution if something goes wrong during the sound capture (both audio and video are going to be captured at once but if your snd_usb_audio module has already been loaded it may crash the audio capture and thus the video capture itself)
5.- My TV Tuner features support for several audio inputs, which includes the integration with the embedded sound device in my motherboard (via connecting a cable to the aux-line and controlled by sound mixer), you check which one is the best for you and remember that the defaults are usually marked as the "best for you".
6.- If everything is going fine, you will see a small window with a message that reads something like this:
click "OK" to continue.
7.- After that, you can choose from the list of recording options available on your system. I have installed what you can see in the next screenshot. Anyone is valid and the quality doesn't reflect major changes but I personally prefer mencoder. If you don't have any of these installed you should install it in order to run your tests.
8.- After you have chosen your encoding software preference (in the previous step) you will be asked for the aspect ratio. If you don't have experience on this just leave it as is. It normally defaults to which better fits your TV Tuner signal.
9.- Based on your choice related to the aspect ratio, you will have several options for the video quality, also based on bitrate, the description in the next window is very specific. Remember that: the higher bitrate (best quality) the video file size can become a huge amount.
10.- After that, we need just to choose how long will our video capture be. There are several presets, I have chosen "30 seconds for testing" in this example but you can choose any or even choose "unlimited" in order to you decide when to stop the recording.
11.- Next, you will be asked for a file name, giving one by default, which you can change in this screen.
12.- You will be prompted to check your "Recording options" in the next screen, just click "OK".
13.- Just one more click to start.
14.- When recording, the terminal may show some activity, and a small window like this:
15.- At the end of the process, you will receive a confirmation window.
And... that's it...
You can cancel the recording or the process itself by pressing ESC at any moment, there will be no changes at all.
At the end of the recording, you will have the video in the place that you choose in the step 11, in companion with a log file with a name like: "testvideo0.log" or something like that.
This is the easiest way to encode from RF Signal TV Tuners, gathering both audio and video in the same file.
I have another process which is achieved using a python process which features a GUI in which you can handle several useful things, like changing the channel, run pre-recording tests and even record but sometimes it drops me failures. If you wish it please let me know how can I reach you. I don't want to write parchments or a bible... LOL!
If this procedure doesn't work for your case please let me know including your results in order to provide some support before deleting this answer. Thank you and...
Good luck!
You must try "QtCAM" - a free, Open Source Linux Webcamera Software with more than 10 image control settings.
QtCAM image capture settings
Simplest command with ffmpeg:
I would advise vokoscreen for Ubuntu 18.04. You can install it with 'sudo apt install vokoscreen'. See also https://github.com/vkohaupt/vokoscreen .