Digitising VHS tapes

The better question is, is it possible to capture video on FreeBSD. The fact the video comes from a VHS tape is irrelevant. Videorecoders simply output a composite or s-video signal. You just need a capture device that can capture from composite and/or s-video.
 
The better question is, is it possible to capture video on FreeBSD. The fact the video comes from a VHS tape is irrelevant. Videorecoders simply output a composite or s-video signal. You just need a capture device that can capture from composite and/or s-video.

I have a device which comes with Windows software. How do I tell if the device is supported by FreeBSD?

Presumably plug the device in and run lsusb to find out if FreeBSD recognises it and see what it is called...

And assuming it is, what should I look for in terms of software?
 
it looks as though I need to run webcamd
or ffmpeg...
Yes, ffmpeg makes more sense and lets you capture in a lossless form to process later. Most likely, it will be in v4l format.
The following example perfectly works in FreeBSD (adjust the standard as needed, you may omit it completely):
Code:
ffmpeg -f v4l2 -standard PAL -i /dev/video0 -c:v libx264 -preset ultrafast -crf 0 output.mkv
Since webcamd is Linux stuff, just follow recommendations for Linux, I have done such captures 15 years ago in Linux, it was straight forward.
 
Many computer TV tuners have an analog input via RCA jacks. Perhaps you could use this for input with a device node from webcamd.

I just bought an IEEE1394 firewire contoller to test with. It appears that many of the ports that supported firewire are gone.
Previously I used Kino on Linux to capture..
 
Last edited:
Virtualdub... Is there anything like it for FreeBSD?
Because you like to have a GUI?

multimedia/avidemux used to have GUI, not sure about now.
Are you able to capture with ffmpeg? If not, I doubt anything will help. IMHO, it's better to capture first in a lossless format, and then use whatever you like (GUI or CLI) to process.
Also, you can check it visually with mplayer, but it has to be compiled with V4L support (use ports, not pkg):
Code:
mplayer tv:// -tv driver=v4l2:device=/dev/video0
I used Kino on Linux to capture
Kino is based on ffmpeg.
 
Code:
ffmpeg -f v4l2 -standard PAL -i /dev/video0 -c:v libx264 -preset ultrafast -crf 0 output.mkv
I don't have a /dev/video0.... Maybe I've mssed something...

Running webcamd shows webcamd [-d ugen2.3] -N vendor-0xeb1a-product-0x2861 -S unknown -M 0
lsusb shows
Bus /dev/usb Device /dev/ugen2.3: ID eb1a:2861 eMPIA Technology, Inc.
so my capture card seems to be recognised.
 
Do you start webcamd as a service? If yes, add the following lines in /etc/rc.conf:
Code:
webcamd_enable="YES"
webcamd_0_flags="-d 2.3 -i 0 -v 0"
or just run as root:
Code:
webcamd -d 2.3 -i 0 -v 0
 
I have the above settings in /etc/rc.conf as well as the following in /boot/loader.conf:
Code:
cuse_load="YES"
but don't see a /dev/video0.

I notice that webcamd -s has a million options one of which might give me a clue as to what else I need to do.... Among these options there are 13 em28xx-* options, one of which may be help show what's missing. Here are those which reference 'video', although I'm really out of my depth trying to figure out what may be missing...
em28xx-video.isoc_debug=0 <int>
>enable debug messages [isoc transfers]

em28xx-video.disable_vbi=0 <int>
>disable vbi support

em28xx-video.alt=0 <int>
>alternate setting to use for video endpoint

em28xx-video.video_debug=0 <int>
>enable debug messages (video)
 
Just a quick update on my digitising VHS tapes journey....

I've just discovered that OBS is able take input from my cheap capture card when I select the source as Video Capture Device (V4L2) - Nice to know that V4L2 works on FreeBSD.

Looks like I need to spend some time playing with my new toy:)...
 
Code:
ffmpeg -f v4l2 -standard PAL -i /dev/video0 -c:v libx264 -preset ultrafast -crf 0 output.mkv

I finally managed to get the above to work and then after finding this guide I tried to adapt it to FreeBSD using:-
Code:
ffmpeg -f v4l2 -standard PAL -thread_queue_size 512 -i /dev/video0 -f alsa -thread_queue_size 512 -i hw:2,0 -vcodec libx264 -preset superfast -crf 25 -s 720x576 -r 25 -aspect 4:3 -acodec libmp3lame -b:a 128k -channels 2 -ar 48000 out.av
but the problem is trying to get audio recorded. -f alsa does not work, so I have either not installed something or am using the wrong device name.

Is there a FreeBSD equivalent of this:-
Detecting the audio input
The following command will detect the audio input.
cat /proc/asound/cards
0 [PCH ]: HDA-Intel - HDA Intel PCH
HDA Intel PCH at 0xd8420000 irq 36
1 [NVidia ]: HDA-Intel - HDA NVidia
HDA NVidia at 0xd6000000 irq 17
2 [usbtv ]: usbtv - usbtv
USBTV Audio at bus 1 device 2
 
Perhaps cat /dev/sndstat
Code:
root@T530:~ # cat /dev/sndstat
Installed devices:
pcm0: <Realtek ALC269 (Analog 2.0+HP/2.0)> (play/rec) default
pcm1: <Realtek ALC269 (Internal Analog Mic)> (rec)
pcm2: <Intel Panther Point (HDMI/DP 8ch)> (play)
pcm3: <Intel Panther Point (HDMI/DP 8ch)> (play)
pcm4: <Intel Panther Point (HDMI/DP 8ch)> (play)
pcm5: <USB audio> (rec)
No devices installed from userspace.

pcm5 is the capture device. I can't figure out how to get ffmpeg to use this device.

using -f pcm5 doesn't work.
 
Crowdsourcing RTFMs, as usual?



That would be -f oss -i /dev/dsp5.

I tried:-
Code:
ffmpeg -f v4l2 -standard PAL -i /dev/video0 -f oss -i /dev/dsp5 -c:v libx264 -preset superfast -crf 25 -s 720x576 -t 30 output.mkv
and got the likes of:-
Code:
[matroska @ 0x805e37c00] Non-monotonous DTS in output stream 0:1; previous: 12368, current: 12358; changing to 12368. This may result in incorrect timestamps in the output file.
[libvorbis @ 0x805e0bc00] Queue input is backward in time
[matroska @ 0x805e37c00] Non-monotonous DTS in output stream 0:1; previous: 12420, current: 12410; changing to 12420. This may result in incorrect timestamps in the output file.
[libvorbis @ 0x805e0bc00] Queue input is backward in time52 bitrate=1486.5kbits/s speed=1.76x   
    Last message repeated 6 times

...still no sound....
 
I very much doubt your VHS tapes contain DTS audio. I'm also quite sure your capture card doesn't either. Use something like PCM (uncompressed) or convert the analog audio to MP3.
 
I very much doubt your VHS tapes contain DTS audio. I'm also quite sure your capture card doesn't either. Use something like PCM (uncompressed) or convert the analog audio to MP3.
It's only a cheap capture card...

So how do I get ffmpeg to use PCM in this command?
Code:
ffmpeg -f v4l2 -standard PAL -i /dev/video0 -f oss -i /dev/dsp5 -c:v libx264 -preset superfast -crf 25 -s 720x576 -t 30 output.mkv
Getting sound working has always been a bit of a black art for me...

And looking at pcm() leaves my head spinning.
 
Getting sound working has always been a bit of a black art for me...
If it's only to digitize old tapes, the simplest work-around will be capturing analog sound separately.
Then the tracks can be glued together by ffmpeg:
Code:
ffmpeg -i <video-file> -i <audio-file> -map 0:v -map 1:a -c copy output.mkv
Instead of copy you can use actual codecs.
 
If it's only to digitize old tapes, the simplest work-around will be capturing analog sound separately.

I haven't found any way to get sound out of the VCR... at least not on FreeBSD. I did manage to capture sound on Windows, but then I was unable to capture any Video.

cat /dev/sndstat shows:
Code:
Installed devices:
pcm0: <Realtek ALC269 (Analog 2.0+HP/2.0)> (play/rec) default
pcm1: <Realtek ALC269 (Internal Analog Mic)> (rec)
pcm2: <Intel Panther Point (HDMI/DP 8ch)> (play)
pcm3: <Intel Panther Point (HDMI/DP 8ch)> (play)
pcm4: <Intel Panther Point (HDMI/DP 8ch)> (play)
pcm5: <USB audio> (rec)
No devices installed from userspace.

so I guess I need to use pcm5 to capture sound but don't know how...

Should I be able to use pcm5 as a sound source and output the sound via my laptops speakers?
 
Back
Top