Digitising VHS tapes

Should I be able to use pcm5 as a sound source and output the sound via my laptops speakers?
Yes. I would concentrate more on the capture program recieving the audio stream than on speaker output.


I happen to be testing FreeBSD Firewire capture. Just for testing I hooked up a Panasonic VHS analog source to my Firewire enabled Sony camcorder and was able to capture analog that way. Camcorder has a jack for RCA video and audio.
So the camera is doing the analog to digital conversion. It is a very usable method.

Capturing separate A/V streams is frought with problems. Especially any footage of length. For short clips syncing might work out.
 
Did you see the write up our forum admin left us for OBS streaming?

Looking at these screens I have a hard time believing this program won't capture both audio and video.
Concentrate on that.
This article is about streaming but I see these clues just from the writeup:
File > Settings. Click on the Stream section, and set Stream Type
 
Seeing how I am interested in this topic i bought the $10US ebay special.
EasyCap. A USB capture stick. Many versions produced.

This is the first hotplug. No drivers or V4L
Code:
Jun 16 18:01:54 X9SRL kernel: ugen1.4: <ARKMICRO USB2.0 PC CAMERA> at usbus1
Jun 16 18:01:55 X9SRL kernel: uaudio0 on uhub2
Jun 16 18:01:55 X9SRL kernel: uaudio0: <USB2.0 MIC> on usbus1
Jun 16 18:01:55 X9SRL kernel: uaudio0: No playback.
Jun 16 18:01:55 X9SRL kernel: uaudio0: Record: 48000 Hz, 1 ch, 16-bit S-LE PCM format, 2x8ms buffer.
Jun 16 18:01:55 X9SRL kernel: uaudio0: No MIDI sequencer.
Jun 16 18:01:55 X9SRL kernel: pcm0: <USB audio> on uaudio0
Jun 16 18:01:55 X9SRL kernel: uaudio0: No HID volume keys found.


Just installed multimedia/obs-studio and see these very pertinent instructions:
Code:
Message from pulseaudio-12.2_5:

Pulseaudio tries to determine default values for FreeBSD OSS driver at first
start, based on /dev/sndstat output. The hw.snd.default_unit sysctl may affect
these values, but restart of the Pulseaudio might be needed to rescan it again,
e.g. `pacmd exit`.

Pulseaudio has separate input and output configure lines. You can change them
with using following commands:

To change the default sink (output):
# pacmd set-default-sink 3
To change the default source (input):
# pacmd set-default-source 3

This can also be set in /usr/local/etc/pulse/default.pa

Replace the number '3' with the new default you want to set.

The audio/freedesktop-sound-theme is needed if the default sound files
are uncommented in the /usr/local/etc/pulse/default.pa file.
Message from jackit-0.125.0_8:

======================================================================
It is recommended to run Jack with real-time priority (-R).

The recommended way to start Jack is to add the following
lines to /etc/rc.conf:

jackd_enable="YES"
jackd_user="{your-jack-user}"
jackd_rtprio="YES"
jackd_args="-R -doss -r{sample-rate} -p1024 -n3 -w16 \
            --capture /dev/dsp{N} --playback /dev/dsp{N}"

Where:
- your-jack-user: is the user who is going to use jack; currently
                  only one user is supported
- sample-rate: can be 44100, 48000, etc.
- /dev/dsp{N}: your OSS devices, usually /dev/dsp0

Please note that the port option COOKEDMODE is "on" by default, which
makes your system to automatically scale the sample-rate between
Jack and audio hardware. One reason COOKEDMODE=on is because
Jack's OSS driver doesn't support some sample-rate and hardware
combinations when COOKEDMODE=off. To achieve the best sound quality
please make sure your hardware natively supports the sample-rate set
in jackd_args, and set COOKEDMODE=off.

I will let you know how this works for me.
 
I did not like obs-studio so I fell back on something that I do like such as multimedia/kdenlive and it offers capture option.
Have you tried it balanga ?
screenshot110.png
 
Yes. I would concentrate more on the capture program recieving the audio stream than on speaker output.

I'm can't manage to capture any audio stream from the device and suspect I haven't configured it properly, even though pcm5: <USB audio> (rec) is identified, as is Bus /dev/usb Device /dev/ugen2.3: ID eb1a:2861 eMPIA Technology, Inc. ...

Not sure what else, if anything I need to install..
 
Seeing how I am interested in this topic i bought the $10US ebay special.
EasyCap. A USB capture stick. Many versions produced.

This is the EasyCAP device I have:-
Empia EasyCAP
The Empia EasyCAP is based on the EM2860 chip from Empia.

Components Used
  • Empia EM2860 (EM2861 ?) (USB video bridge)
  • Silan SC8113 (Philips SAA7113 compatible video decoder)
  • AC'97 audio processor
Indentification
# lsusb
Bus XXX Device XXX: ID eb1a:2861 eMPIA Technology, Inc.

Making it work
EM2860 (EM2861) based devices are supported in Linux by the em28xx kernle module. More information on this wiki: Em28xx_devices

Audio support
The em28xx kernel module should create a Em28xx Audio ALSA soundcard which can be used for sound capturing.

It's the Audio support I'm having problems with.... How do I tell if an Em28xx Audio ALSA soundcard for capturing sound has been created?
This is the first hotplug. No drivers or V4L
Code:
Jun 16 18:01:54 X9SRL kernel: ugen1.4: <ARKMICRO USB2.0 PC CAMERA> at usbus1
Jun 16 18:01:55 X9SRL kernel: uaudio0 on uhub2
Jun 16 18:01:55 X9SRL kernel: uaudio0: <USB2.0 MIC> on usbus1
Jun 16 18:01:55 X9SRL kernel: uaudio0: No playback.
Jun 16 18:01:55 X9SRL kernel: uaudio0: Record: 48000 Hz, 1 ch, 16-bit S-LE PCM format, 2x8ms buffer.
Jun 16 18:01:55 X9SRL kernel: uaudio0: No MIDI sequencer.
Jun 16 18:01:55 X9SRL kernel: pcm0: <USB audio> on uaudio0
Jun 16 18:01:55 X9SRL kernel: uaudio0: No HID volume keys found.
I get something similar when I plug the device in:-
Code:
ugen2.3: <vendor 0xeb1a product 0x2861> at usbus2
uaudio0 on uhub3
uaudio0: <vendor 0xeb1a product 0x2861, class 0/0, rev 2.00/1.00, addr 3> on usbus2
uaudio0: No playback.
uaudio0: Record: 48000 Hz, 2 ch, 16-bit S-LE PCM format, 2x8ms buffer.
uaudio0: Record: 44100 Hz, 2 ch, 16-bit S-LE PCM format, 2x8ms buffer.
uaudio0: Record: 32000 Hz, 2 ch, 16-bit S-LE PCM format, 2x8ms buffer.
uaudio0: Record: 16000 Hz, 2 ch, 16-bit S-LE PCM format, 2x8ms buffer.
uaudio0: Record: 8000 Hz, 2 ch, 16-bit S-LE PCM format, 2x8ms buffer.
uaudio0: No MIDI sequencer.
pcm5: <USB audio> on uaudio0
uaudio0: No HID volume keys found.

Just installed multimedia/obs-studio and see these very pertinent instructions:
Code:
Message from pulseaudio-12.2_5:

Pulseaudio tries to determine default values for FreeBSD OSS driver at first
start, based on /dev/sndstat output. The hw.snd.default_unit sysctl may affect
these values, but restart of the Pulseaudio might be needed to rescan it again,
e.g. `pacmd exit`.

Pulseaudio has separate input and output configure lines. You can change them
with using following commands:

To change the default sink (output):
# pacmd set-default-sink 3
To change the default source (input):
# pacmd set-default-source 3

This can also be set in /usr/local/etc/pulse/default.pa

Replace the number '3' with the new default you want to set.

The audio/freedesktop-sound-theme is needed if the default sound files
are uncommented in the /usr/local/etc/pulse/default.pa file.
Message from jackit-0.125.0_8:

======================================================================
It is recommended to run Jack with real-time priority (-R).

The recommended way to start Jack is to add the following
lines to /etc/rc.conf:

jackd_enable="YES"
jackd_user="{your-jack-user}"
jackd_rtprio="YES"
jackd_args="-R -doss -r{sample-rate} -p1024 -n3 -w16 \
            --capture /dev/dsp{N} --playback /dev/dsp{N}"

Where:
- your-jack-user: is the user who is going to use jack; currently
                  only one user is supported
- sample-rate: can be 44100, 48000, etc.
- /dev/dsp{N}: your OSS devices, usually /dev/dsp0

Please note that the port option COOKEDMODE is "on" by default, which
makes your system to automatically scale the sample-rate between
Jack and audio hardware. One reason COOKEDMODE=on is because
Jack's OSS driver doesn't support some sample-rate and hardware
combinations when COOKEDMODE=off. To achieve the best sound quality
please make sure your hardware natively supports the sample-rate set
in jackd_args, and set COOKEDMODE=off.

I will let you know how this works for me.

Do I need to be running pulseaudio? I've installed it but haven't done anything with it assuming it magically autoconfigures itself...
 
I'm can't manage to capture any audio stream from the device and suspect I haven't configured it properly
I just checked my setup:
Code:
% dmesg | grep uaudio
uaudio0 on uhub4
uaudio0: <Logitech Logitech USB Headset, class 0/0, rev 1.10/1.27, addr 2> on usbus2
uaudio0: Play: 48000 Hz, 2 ch, 16-bit S-LE PCM format, 2x8ms buffer.
uaudio0: Play: 44100 Hz, 2 ch, 16-bit S-LE PCM format, 2x8ms buffer.
uaudio0: Play: 40000 Hz, 2 ch, 16-bit S-LE PCM format, 2x8ms buffer.
uaudio0: Play: 32000 Hz, 2 ch, 16-bit S-LE PCM format, 2x8ms buffer.
uaudio0: Play: 24000 Hz, 2 ch, 16-bit S-LE PCM format, 2x8ms buffer.
uaudio0: Play: 22050 Hz, 2 ch, 16-bit S-LE PCM format, 2x8ms buffer.
uaudio0: Play: 16000 Hz, 2 ch, 16-bit S-LE PCM format, 2x8ms buffer.
uaudio0: Play: 11025 Hz, 2 ch, 16-bit S-LE PCM format, 2x8ms buffer.
uaudio0: Play: 8000 Hz, 2 ch, 16-bit S-LE PCM format, 2x8ms buffer.
uaudio0: Record: 48000 Hz, 1 ch, 16-bit S-LE PCM format, 2x8ms buffer.
uaudio0: Record: 44100 Hz, 1 ch, 16-bit S-LE PCM format, 2x8ms buffer.
uaudio0: Record: 40000 Hz, 1 ch, 16-bit S-LE PCM format, 2x8ms buffer.
uaudio0: Record: 32000 Hz, 1 ch, 16-bit S-LE PCM format, 2x8ms buffer.
uaudio0: Record: 24000 Hz, 1 ch, 16-bit S-LE PCM format, 2x8ms buffer.
uaudio0: Record: 22050 Hz, 1 ch, 16-bit S-LE PCM format, 2x8ms buffer.
uaudio0: Record: 16000 Hz, 1 ch, 16-bit S-LE PCM format, 2x8ms buffer.
uaudio0: Record: 11025 Hz, 1 ch, 16-bit S-LE PCM format, 2x8ms buffer.
uaudio0: Record: 8000 Hz, 1 ch, 16-bit S-LE PCM format, 2x8ms buffer.
uaudio0: No MIDI sequencer.
pcm5: <USB audio> on uaudio0
The pcm5 has to be handled by /dev/dsp5, so the following perfectly captures my voice through a microphone:
Code:
ffmpeg -f oss -i /dev/dsp5 out.wav
 
dmesg | grep uaudio
Code:
uaudio0 on uhub3
uaudio0: <vendor 0xeb1a product 0x2861, class 0/0, rev 2.00/1.00, addr 3> on usbus2
uaudio0: No playback.
uaudio0: Record: 48000 Hz, 2 ch, 16-bit S-LE PCM format, 2x8ms buffer.
uaudio0: Record: 44100 Hz, 2 ch, 16-bit S-LE PCM format, 2x8ms buffer.
uaudio0: Record: 32000 Hz, 2 ch, 16-bit S-LE PCM format, 2x8ms buffer.
uaudio0: Record: 16000 Hz, 2 ch, 16-bit S-LE PCM format, 2x8ms buffer.
uaudio0: Record: 8000 Hz, 2 ch, 16-bit S-LE PCM format, 2x8ms buffer.
uaudio0: No MIDI sequencer.
pcm5: <USB audio> on uaudio0
uaudio0: No HID volume keys found.
ffmpeg -f oss -i /dev/dsp5 out.wav
produces a file full of binary zeroes..... which is a pity since this captures the video just fine
ffmpeg -f v4l2 -standard PAL -i /dev/video0 -c:v libx264 -preset ultrafast -crf 0 output.mkv

Maybe this device is not fully supported on FreeBSD.... How would I invoke the Audio capture on Ubuntu, since it is likely to have better support there?
 
You may need to tweak ffmpeg's parameters for raw audio.

Thanks fot the suggestion, but before trying to tweak any parameters is there any way of telling if whether I am able to capture *any* sort of Audio? I'm not really sure if the driver is capable of capturing Audio.... I know the device is capable because I can capture Audio on Windows,
 
This worked for me (with an USB "EzCap" capture device, as the 'third' sound card (/dev/dsp2;/dev/mixer2)):
Make sure volume is 100, by default it was 0.
# mixer -f /dev/mixer2 mic 100:100
Setting the mixer mic from 0:0 to 100:100.

Replace PTS (or rather, use instead of DTS) by using 'asetpts' in ffmpeg on the audio filter chain, my device only supports one sample/format (s16le/48khz/2ch), no need to specify the format in my case.
# ffmpeg -f oss -i /dev/dsp2 -filter:a "asetpts=N/SR/TB" test.wav
Otherwise you get the typical error:
Non-monotonous DTS in output stream 0:1; previous: 4361, current: 497; changing to 4362. This may result in incorrect timestamps in the output file.
Seems to come from a weird clock/timestamp from the audio driver or hardware.

The "math" of "asetpts=N/SR/TB" comes from: counting samples instead of following the device's timestamp, so expect "not perfect" synchronization.
 
I don't know if this is still relevant, but I did this—transfer a bunch of VHS tapes to DVDs—a few years ago.
After messing about with two or three "VHS-to-PC" gizmos that produced, at best, variable results, I ended up buying a used Magnavox DVR, plugging the VHS into the DVR and (easily) burning the tapes directly to DVDs in far less time...and with much less fuss...than messing about with wires, gadgets and computers. As well, the video/sound quality of the resultant DVDs were analogous to the original VHS tapes.

It's worth noting that I used a Panasonic Pro VCR (with the older 19 micron GX4 video heads) for playback, so the source quality was at a higher level than what you'd get from a standard home VHS recorder. If you've got alotta VHS tapes or tapes that're important to you, it might be worth having them professionally transferred (by a local video lab or production facility) rather than messing about on your own with home-level gear.
 
Does anyone know if EasyCAP devices utilizing Syntek STK1160 chip are supported on FreeBSD? I would like to digitalize tapes as well, STK1160 is supported by the Linux kernel but I'm not sure if it will work with FreeBSD.
 
Does anyone know if EasyCAP devices utilizing Syntek STK1160 chip are supported on FreeBSD? I would like to digitalize tapes as well, STK1160 is supported by the Linux kernel but I'm not sure if it will work with FreeBSD.
Searching/grepping the source tree of 13.0 doesn't reveal any evidences of it...

[EDIT]In Linux it appeared in the version 3.7, i.e. almost 10 years ago.
 
Does anyone know if EasyCAP devices utilizing Syntek STK1160 chip are supported on FreeBSD? I would like to digitalize tapes as well, STK1160 is supported by the Linux kernel but I'm not sure if it will work with FreeBSD.
EasyCAP devices are cheap garbage and a waste of time AND money! I mean you want to digitize your old memories and treasures, and really think some el cheapo 10$ gadget coming from China will do that job in a way that really values your little treasures and makes them shine again? Forget it, not happening in this life! Most likely if you digitize videos with that garbage audio and video will be out of sync, you will have jitter and other unwanted side effects.

What you really need is a somewhat decent and old SVHS DVD recorder (e.g. from Panasonic), because these had really good analog to digital converters build in plus some other stuff, the investment is in the range of 2-300$.
 
EasyCAP devices are cheap garbage and a waste of time AND money! I mean you want to digitize your old memories and treasures, and really think some el cheapo 10$ gadget coming from China will do that job in a way that really values your little treasures and makes them shine again? Forget it, not happening in this life! Most likely if you digitize videos with that garbage audio and video will be out of sync, you will have jitter and other unwanted side effects.

What you really need is a somewhat decent and old SVHS DVD recorder (e.g. from Panasonic), because these had really good analog to digital converters build in plus some other stuff, the investment is in the range of 2-300$.
Looks just fine here:
View: https://www.youtube.com/watch?v=yDVxLVz8PVE


VHS is not exactly the prettiest quality, it cant get much more pixel perfect until the day we get AI upscaling perfected.

All I want to know is if this card will work on FreeBSD.
 
I'm starting to see what you mean hardworkingnewbie , all of the EasyCAP devices I've gotten my hands on from Amazon haven't even worked with Linux - and I've got one identical to one of the tutorials. I'm starting to think they're just throwing some junk cards that aren't the same inside the plastic. Using Linux almost feels filthy at this point when all my other devices use FreeBSD, so I'm probably just gonna use some dedicated device to convert the tapes.
 
Back
Top