You are not logged in.
I recently bought a USB audio/video capture device to try to convert some VHS tapes to digital.
Just got it working tonight. I can get sound and video just fine, so the hardware works.
Where I need help is the software.
I'm trying to work with VLC, because I don't know what the other options would be. I can see the video and hear the audio when I open the capture device, but when I hit record (1) only the video is captured (no audio) and (2) it's captured as an uncompressed .avi, which would take tens of GB for even a short video.
Is there a simpler or better software that will allow me to capture the AV stream to a compressed file? OR a better way to do this with VLC?
Offline
I know nothing of vlc myself - but I'd probably use ffmpeg. Without knowing about your hardware, specific recommendations are hard to provide, but this may help:
http://www.ffmpeg.org/ffmpeg-devices.html
"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman
Offline
Thanks for the suggestion, but I was rather hoping to monitor the video as it was being recorded, so ffmpeg isn't really ideal.
The hardware is some kind of easycap device, lsusb shows it as:
1f4d:0102 G-Tek Electronics GroupVideo input appears as /dev/video1 and audio input as alsa://plughw:2,0 (also /dev/snd/controlC2).
Last edited by lykwydchykyn (2015-07-29 02:46:28)
Offline
You could also try Kino...
ffmpeg as suggested by Trilby as one big advantage imo ... you dont have to manually stop the recording when using the '-t' option
ex:
ffmpeg -f alsa -ac 2 -i hw:2,0 -f video4linux2 -i /dev/video0 -acodec ac3 -ab 128k -f matroska -s 1280x720 -vcodec libx264 -preset ultrafast -qp 16 -t 01:00:00 test.mkvwould record for an hour
edit: modified audio to your hw
Last edited by Malkymder (2015-07-29 04:08:13)
Offline
Is there a need to transcode and monitor in the same program? If not, start the ffmpeg command - either in the background or in a separate shell - then watch the gradually created video file in mpv/mplayer or any other player that allows for streaming data. You could potentially even do this in a single command line using tee:
ffmpeg <input options> -i /dev/video0 <output options> - | tee out.mp4 | mpv"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman
Offline
I'll give that a shot, Trilby.
Offline
In vlc you can use convert/save menu option instead of just opening the device, which should give you the option to set the audio channel and also define the output format if you still want to try with that
Offline
In vlc you can use convert/save menu option instead of just opening the device, which should give you the option to set the audio channel and also define the output format if you still want to try with that
I had some luck using the streaming feature of VLC to go from the capture device to a file, except that (1) the file wasn't compressed at all, despite my settings, (2) the audio was out-of-sync with the video, and (3) I couldn't monitor while recording. Maybe the convert/save menu will do something differently?
I have a few approaches to try here, at least.
Offline
Well, I'm not having much luck with this.
The VLC convert/save sets up the same thing as the stream, with the same shortcomings.
I created a script with this one-liner ffmpeg command:
ffmpeg -f alsa -ac 2 -i hw:2,0 -f video4linux2 -i /dev/video1 -acodec ac3 -ab 128k -f matroska -s 1280x720 -vcodec libx264 -preset medium -qp 16 - | tee $1 | mpv -It didn't really work. mpv complained it wasn't getting the data fast enough, so I removed it from the equation.
Even without it, the resulting video was choppy, with sound cutting in and out. I got tons of alsa buffer xruns while recording. Maybe encoding while recording is not going to work out, and I should just grab raw input? I should have the disk space for it.
Is there a way to tell ffmpeg just to output the raw input, or do I have to know what that is?
Last edited by lykwydchykyn (2015-07-30 04:14:43)
Offline
I would recommend not trying to monitor the stream, it seems like more of a hassle. Just IMO.
Don't worry if the audio is a bit out off sync, you can adjust it later on.
Make sure you either have a fast CPU or a fast and sufficiently large storage medium.
Try this modified command, I can't promise it will work but similar ffmpeg command lines worked for me.
ffmpeg -f alsa -ac 2 -i hw:2,0 -f video4linux2 -s 1280x720 -i /dev/video1 -acodec aac -vcodec h264 -f mp4 output.mp4Maybe you can get some more Info from your device.
lsusb -d 1f4d:0102 -vOffline