Transferring Digital Video to a VCR
September 18th, 2022
The realm of analog video! It's a fascinating thing, and VCRs n the VHS tapes they play (shhh betamax it's okay) are really fascinating things! It's been a recent obsession of mine, to the point where I went so far as to get a CRT for this obsession. No it wasn't retro gaming that got me to get a CRT, that's just secondary to my VHS obsession!
And for me, part of this obsession is trying to get videos on to the tapes! I'll document thus far the best method I've come across for doing it, using a Raspberry Pi 4! I've tried other methods like using a Wii with WiiMC, a PS2 with a burned DVD, and using a janky HDMI>VGA>Composite solution from my laptop, but none have yielded results as good as this. Because, believe it or not, there is such a thing as having "low quality" video for VHS! It does look a little bit better than you remember, at least a little bit!
This is part 1 of a series of guides I'll be making on my blog, talking about the process of dubbing video to VHS tapes! I plan on also making tutorials for cropping videos to 4:3 using Kdenlive (a FOSS video editor that's real easy to use), and using an Arduino Uno w/ a Video Experimenter Shield, in combination with a fantastic project to add close captions to your tapes!
For now, this guide will assume you have a 4:3 video, eagerly being awaited to be put onto a VHS tape. If you don't have that, wait for my guide on creating a good 4:3 video conversion!
The Raspberry Pi 4
For this, we will be using the Raspberry Pi 4! Although, the Raspberry Pi 400 should in theory work as well, since it should also have composite output. Another thing to note is that this all naturally applies to Betamax too, not just VHS. And, I guess DVD-RAM, I won't judge!
An important thing to consider is using the official Raspberry Pi 4 power supply, or one that's rated a little stronger than it for this. Having a dip in voltage will not only mean your video will stutter, but it'll show that accursed lightning bolt symbol at the top-right, which will show up in your VHS recording. You should try to be mindful of what's plugged into the USB slots!
The most important thing you're gonna need is a cable to connect the Raspberry Pi 4 to the TV. There were various cables made for stuff such as camcorders that use A/V cables, but generally speaking there's a great chance they won't work, so you'll have to pick up one from [ Your Favorite Place To Buy Stuff ].
This page here is a great resource on how to locate the correct cable, if you don't already have a cable you've verified to work in the past. Additionally, I'd recommend connecting the Pi 4 to your TV first, before connecting it through your VCR, just to make sure it works that way first. That way, you don't waste diagnosing the wrong thing!
One other thing to consider is if your VCR only has mono capabilities, you should either ensure your video is in mono, or get a Y cable that takes stereo RCA and outputs it as mono to your VCR.
Fresh install
Now, it's highly recommended you use a fresh install of Raspberry Pi OS to an SD card. Find it and download it, either 32-bit or 64-bit should work, but if some parts don't work, go back to 32-bit since that's what I'm using. Additionally, this all works on either Desktop or Lite, though if you don't know how to navigate the command line, go with Desktop. Then, after flashing this to your SD card of choice, go into the boot config.txt and change the following settings:
- Find
dtoverlay=vc4-kms-v3d
and replace it withdtoverlay=vc4-fkms-v3d
. This is because the KMS driver does not work with analog out, thus requiring the fallback. - Find a section called
[all]
, and putenable_tvout=1
underneath it. The Raspberry Pi 4 has composite out disabled by default, because it needs to run at different clock speeds to handle it. - It's also recommended you use
hdmi_ignore_hotplug=1
, this is to ensure that HDMI doesn't get detected on boot. Not strictly necessary to put in, though. - Finally, put in
sdtv_mode=X
, and replace X with a number that corresponds to your region. (0 = NTSC, 1 = NTSC-J, 2 = PAL, 3 = PAL-M/Brazilian PAL). You can optionally put insdtv_aspect=0
to enforce "4:3" mode. 4:3 is in quotes, more on that in the VLC section.
I'd also recommend not overclocking the Pi 4, since it doesn't need to be overclocked to play back videos, generally.
Something important to note is if you're like me and going all the way in with a old-fashioned CRT TV, there's a great chance the UI is going to be cropped out of frame, since the Raspberry Pi does not compensate for CRT overscan.
You can try disabling... disable overscan (find disable_overscan=1
and change it to disable_overscan=0
) to see if that works, but once you want to record a video, I'd highly recommend re-enabling this (just set it back to 1) to capture the full frame for a more authentic tape.
Now, plug it into a TV (or capture card) to verify that it works. There's some crucial information to diagnose here, so here's some troubleshooting tips:
- If you get a completely blank screen, but see the SD card lights blinking, the Raspberry Pi is completely unaware it's connected to composite out, or that it needs to output. Make sure
enable_tvout=1
is set, and try usinghdmi_ignore_hotplug=1
. Also, triple check and make sure the cable you got is confirmed to work on the Pi! - If you see the rainbow splash screen, and/or you see the initial "Welcome to Raspberry Pi" screen but it cuts out briefly after, then the Raspberry Pi is aware it should connect to composite, and isn't working. Double check and make sure you have
dtoverlay=vc4-fkms-v3d
set, and really REALLY make sure you don't havedtoverlay=vc4-kms-v3d
. If that doesn't work, then comment it out#dtoverlay=vc4-fkms-v3d
and try again. This will disable hardware acceleration, but should give you composite out. - If you see a picture, but it's grayscale and/or jumping all over the place, you didn't set
sdtv_mode
correctly.
The Traffic Cone
So, you have the Raspberry Pi 4 up and going, it's displaying a picture and everything, but we need a good video player, with a good stable output. Before we get that, if you're using RPi Desktop, a recommended trick to do with the Pi 4 is to disable the compositor, since that can cause lag, which we don't want happening while recording to VHS. Type sudo raspi-config
into a terminal, then go to Advanced Options. Find the Compositor, and then disable it, and reboot when it tells you to. The UI should be much smoother now, and our video player of choice will have more system resources!
For the video player, we will use VLC, since it supports hardware acceleration, and can be used if you plan on adding close captions (more on that in a later guide). If you don't have it installed for some reason, a simple sudo apt install vlc
in the terminal will do the trick. Oh, but not before doing sudo apt update && sudo apt upgrade
of course! So, now we'll go ahead and tweak it a little bit to fit our needs.
- Go into Tools>Preferences. Go to "Subtitles/OSD", and I'd highly recommend turning off the on-screen display. This is to prevent VLC from rudely showing any UI elements in your recording.
- Now, go under Video. You should see "Output", a good idea is to change that to "OpenGL video output", assuming that the
dtoverlay=vc4-fkms-v3d
solution worked. If it didn't, leave it at automatic. - Still under Video, scroll down a little bit to find both "Deinterlacing" and "Force Aspect Ratio". Turn deinterlacing off.
- This part ONLY APPLIES TO NTSC/NTSC-J/PAL-M. Do not follow this part if you are using standard PAL. With "Force Aspect Ratio", set the aspect ratio to "3:2". An explanation for this is that the Raspberry Pi's output is 720x480, as opposed to 640x480. This causes the video to not show up properly, having black bars on the sides, which will cause problems. Setting it to 3:2 will stretch every video being piped into VLC to stretch to 3:2, thus stretching everything out to the full resolution. If this confuses you, something to keep in mind with analog video is while the vertical resolution is defined, the horizontal resolution is not defined. The 640 in 640x480 is just a guideline to follow if you don't want your video looking weird in 4:3. However, your TV will render the 720x480 as if it's 4:3. Thus, at the end of it all, it'll be set back to the proper aspect ratio.
When all of that is set, you should be good to go. If you've been using a CRT for this, I would recommend testing your Pi on a LCD or capture card just to verify videos on VLC are being stretched out to the proper resolution. Just find a video that doesn't have any black bars to test, any will do, and press F to go full-screen. Once you have all of that, you're ready to begin!
Terminal Solution
If you're like me, you probably installed Raspberry Pi OS Lite instead, meaning you don't have a desktop environment. VLC still works just fine like this! In fact the following even works when you SSH into your Pi, which is really handy.
All you have to do is install VLC, and run the command like so: vlc --aspect-ratio=3:2 --no-osd --deinterlace=0 --text-renderer=none "/your/file/here"
and it's as easy as that!
To explain a bit what each option here does, aspect ratio, no OSD, and deinterlacing are the same as the options set in the above section. Text renderer being set to none prevents any text from showing up at all, which is a great way to prevent subtitles from showing up (remember, this is recorded on VHS! you can't disable subtitles that're baked into a video like that!)
Low Volume Audio Issues
An issue that's cropped up since I made this blog post is I've realized the Raspberry Pi seems to have issues playing audio, as in the volume is way too low. For most VHS tapes, and virtually every other thing plugged into my TV, I can comfortly set my volume to 20 and hear everything just fine. But stuff from the Raspberry Pi's analog out sounds way too quiet, which is an issue since that'll affect the VHS tape. For instance, a loud boom sound effect is too quiet even at volume 50 on my TV!
My solution here was to get an audio DAC; my solution was a little bit clumsy but it works just fine. I used an Apple USB-C to 3.5mm headphone adapter, alongside a USB-C female to USB-A male adapter (from what I'm told, CableCreation is safe to use), and used a 3.5mm to audio RCA cable to get more volume out of my Pi.
When you do get a DAC, be sure to thouroughly test it to make sure there's no interference first! Good way to test this is to see if the DAC "turns off" after no sound is played essentially. Another thing to check for is to see if say, your phone causes interference if it's right next up to it. If it all checks out, your DAC is good!
Finally, I had to tell ALSA (the audio driver that raspbian uses by default) to output to the DAC by default. The way I did it was like so, I edited the file /etc/asound.conf
and added these two lines:
- defaults.pcm.card 1
- defaults.ctl.card 1
And finally, I had to run alsamixer
, bump up the volume to 100, and then use sudo alsactl store
to save the volume of this so I didn't have to keep adjusting this on boot.
Recording The Tape
Before recording a tape, I'd advise testing out the video you plan on putting on tape first to make sure there's no stuttering. Play it in fullscreen on VLC, observe for any audio desync and video stuttering for a good 10% of the video I'd say. There's nothing worse than recording to a tape just to find out it doesn't work. Another thing to verify is the volume levels, make sure the system volume is at 100%, and that VLC's volume is also at 100%. Make sure to NOT have VLC's volume above 100%, this can cause distortion!
Once you have it all ready to go, fullscreen the video, move the mouse cursor to the right (and I'd suggest turning off the mouse, or unplugging it), then pause the video and hit the left arrow key till you're back at the start. Or, if you're using the CLI, just type "pause", then type "seek 0" to return to the start. Now, plop in your VHS tape, make sure you set the correct tape speed on your VCR (SP is for best quality, SLP/EP is for worst quality w/ longer runtimes, and LP is between the two), rewind it to the start, and hit record!
Some VCRs take longer to start recording than others, one of mine takes a solid 5-10 seconds to start recording, while the other takes about 3 seconds. If your video starts off with a fade-in or a stationary image, you should be okay to wait until your VCR is actually recording to hit play. Just press spacebar (or type "play" in the CLI) when you're sure your VCR is actually moving the tape!
However, if you want to add proper close captions to your VHS tape, you'll want to stick around for a guide I plan on making where you use an Arduino Uno in combination with the Video Experimenter Shield and your Raspberry Pi 4 setup to do this! I'll write it up sometime this October, since I'm getting both the Arduino and shield on my birthday (which FYI is on September 27th)