VHS videos can be captured using ffmpeg also.
At first must know video and audio devices.
ls /dev/video*
arecord -l
cat /proc/asound/cards
If you have installed packages xterm
, tk
and tcl
, you can use this script.
#!/usr/bin/wish
frame .top -borderwidth 15
pack .top -fill x
button .top.1 -text "Check video and audio devices" -command { exec xterm -e xterm -e "sh -c '
while :
do
echo ###################
echo Video grabber probably is the last one
echo ###################
echo Video Capture devices
echo ###################
ls /dev/video*
echo ###########################################
echo Audio grabber probably is hw 2,0
echo ###################
echo Audio Capture devices
echo ###################
arecord -l
echo ###################
echo Audio device list
echo ###################
cat /proc/asound/cards
echo #######
echo pulseaudio sources
echo #######
pactl list short sources
echo #######
sleep 10
clear
done
'" & }
button .top.2 -text "EXIT" -command { exit }
pack .top.1 .top.2 -side left -padx 0p -pady 0
When you know the right devices to use, you can use the script like.
Edit 24.11.2024: For avoiding unknow -x error in antiX, the command must place into brackets. The script:
#! /bin/bash
time=$(date "+%F-%H-%M-%S")
xterm -e "ffmpeg -fflags nobuffer -f alsa -i hw:1 -f video4linux2 -i /dev/video0 -framerate 25 -b:v 2000k -b:a 40k -s 700x480 video$time.avi"
You must place the right device for hw:
and /dev/video
in the script or command.
#! /bin/bash
time=$(date +”%Y-%m-%d-%S”)
ffmpeg -fflags nobuffer -f alsa -i hw:2 -f video4linux2 -i /dev/video2 -framerate 25 -b:v 2000k -b:a 40k -s 700x480 video$time.avi
If you launch the script via Terminal, you can stop capturing pressing q. If you have not, you can stop capturing using command
killall --user $USER --ignore-case --signal INT ffmpeg
Of course you can use a script for stopping ffmpeg.
With some capturers, the settings must be different as alsa must replace with pulse. An example some Terratec Grappy models are requiring pulse.
To see audio sources run
pactl list short sources
Obviously even if pactl list sees accurate input device, but when set default to the script, recording is working automatically.
0 alsa_output.pci-0000_00_1b.0.analog-stereo.monitor module-alsa-card.c s16le 2 kan. 44100Hz SUSPENDED
1 alsa_input.pci-0000_00_1b.0.analog-stereo module-alsa-card.c s16le 2 kan. 44100Hz SUSPENDED
2 alsa_input.usb-TerraTec_Electronic_GmbH_TerraTec_Grabby-01.analog-stereomodule-alsa-card.c s16le 2 kan. 44100Hz SUSPENDED
The script from old IBM Thinkpad T60
#! /bin/bash
time=$(date +”%Y-%m-%d-%S”)
ffmpeg -fflags nobuffer -f pulse -i default -f video4linux2 -i /dev/video2 -b:v 2000k -s 700x480 video$time.avi
https://trac.ffmpeg.org/wiki/Capture/PulseAudio
Case Terratec Grappy 0ccd:0096 TerraTec Electronic GmbH Grabby
There is many different hardware inside Grabby, and that Grabby often works ok, but pulseaudio guesses wrong the audio device every now and then, so then is better to use arecord -L
output information for determining the right device.
arecord -L
… a part of output looks like
https://trac.ffmpeg.org/wiki/Capture/ALSA
And the command in the script looks like
#! /bin/bash
time=$(date +”%Y-%m-%d-%S”)
ffmpeg -fflags nobuffer -f alsa -i plughw:CARD=Grabby -f video4linux2 -i /dev/video2 -b:v 3000k -b:a 40k -s 700x480 video$time.avi
A script for Köning Video Grabber 1d19:6109 Dexatek Technology Ltd. Video Grabber
#! /bin/bash
time=$(date +”%Y-%m-%d-%S”)
ffmpeg -fflags nobuffer -f alsa -i plughw:CARD=Cx231xxAudio -f video4linux2 -i /dev/video2 -b:v 2000k -b:a 40k -s 700x480 video$time.avi
Something interesting to read: https://lzone.de/blog/Easily-fix-async-video-with-ffmpeg
Read also: https://puolanka.org/goto/fix-broken-sound-when-capturing-vhs-in-mencoder/
Read also: https://puolanka.org/goto/terratec-grappy-vhs-capture-via-mencoder/