I recently got a USB TV Tuner card. I want to digitize old family VHS tapes. However the TV Tuner card driver doesn't do audio, only video. I have plugged a 3½mm jack from the video machine my laptop. The video from the VHS presents as a v4l device, like a webcam. I can watch video (w/ audio) fine. I tried writing some gstreamer commands to record from the video, and it was sort of working, but eventually the audio would get out of sync.
So is there any application on/for Ubuntu that makes it easy to record from VHS tapes/webcam? Something that'll do the encoding properly.
Sorry, this is going to be quite long.
First of all we need to understand that the RF TV Tuner itself decodes both audio and video at once. If it doesn't seem to "sound" may be because of your sound device isn't getting any sound signal from the tv tuner, which in the majority of the cases is achieved by plugging the proper cable into the right place, usually an aux-line, this way you can control the TV Tuner's volume in the sound mixer.
I suggest you to take a look at this answer, where I explain how to get audio to be directed to the sound device by dropping the next in the terminal:
You will need to install tvtime (
sudo apt-get install tvtime
) in order to get the test running properly.If tvtime isn't getting any signal from your TV Tuner, then 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.
You should check any of them and make notes of your results in order to continue.
If you are satisfied with the signal, 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!
Good luck!