Hacker News new | past | comments | ask | show | jobs | submit login
VHS-Decode – Software defined VHS decoder (github.com/oyvindln)
211 points by muterad_murilax on Dec 11, 2022 | hide | past | favorite | 80 comments



Tangential but cool: in 1998 there were commercial, 50GB data VHS tapes.

https://en.wikipedia.org/wiki/D-VHS

about a decade after that someone asked me for help reading a crate of these tapes that had been flooded then stored in a shed for several years. Couldn't help them at all but it was an amusing diversion figuring out what the hell they had.


Linus Tech Tips just did a video on D-VHS.

https://www.youtube.com/watch?v=papQ8xQxizA

When I was at LSI Logic, I developed the IEEE1394 interface for the second generation JVC D-VHS decks (the HM-DH40000U and HM-DH5U). I worked directly with engineers in Japan and I used to get them to bring me copies of the Japanese ham radio magazine "CQ ham radio" when they would come to visit us in Milpitas. I can't read Japanese, but it's just a wonderful magazine about 300 pages thick (like the old Byte magazine).

https://www.w6rz.net/IMG_0103.jpg


Very cool! Thank you for sharing that.

When I was hunting information for that client; I found a deck and interface card on ebay for some fairly trivial amount, $200 or so. I was really tempted to grab it just for the "neat weird gear" pile but couldn't justify it. The tapes they wanted read had been submerged for some days and were crusty. The media might have been recoverable but it would have meant pulling it out and putting the tape into new cartridges.

Am I correct in remembering that standard VHS tapes were usable in these drives?


Just want you to know that those particular DVHS decks were an object of desire for a geeky teenager wanting the latest and greatest!

I had no practical use for them as my family didn't have an HDTV for a few more years, nor lived in an country where 1394 was enabled by default on cable boxes. However, the very idea of having a MPEG TS captured on a commodity tape was alluring in being able to have a perfect copy of whatever was on TV.


I think of how most of the established ham radio brands are Japanese like that ICOM on the cover.


There are other weird VHS-based formats, such as WVHS, which was used to store HD-ish analog video on VHS- https://en.wikipedia.org/wiki/W-VHS

Alesis also developed an 8-track digital audio recorder based on VHS, ADAT, which used SVHS tapes and could record 20-bit 48khz. ADAT was pretty popular in smaller studios, and was great for the time before multi-gigabyte hard drives. https://en.wikipedia.org/wiki/ADAT


Also, ADAT has been immortalized in the first verse of the lyrics in The Prodigy’s _Diesel Power_ [1].

[1]: https://genius.com/The-prodigy-diesel-power-lyrics


There's a store in Pittsburgh that does this for people as a paid service.

OP's project is cool but it's my understanding the specialized hardware is the big barrier to doing this at home, for most folks, especially if you don't want the tapes routed through a third party for the same reason people invented the polaroid so you don't have to send everything to the Ritz as the mall.


There was also a hokey VHS tape backup card for the PC around the same time that used standard VHS tapes:

https://youtu.be/TUS0Zv2APjU


Around 1998 I had some awful cable, which if memory serves connected to the Parallel port on one end, SCART on the other and some very unreliable software in the middle.


I had one of these. It was a terrible mistake.


Very cool. This could have been an excellent backup medium in a different timeline.


Magnetic tape is an excellent backup method even today. LTO cartridges already have tens of terabytes of capacity. The problem is there are no consumer tape drives, only expensive enterprise models.


Well, there used to be. The early QIC drives that hooked up to a FDC connector like the 3.5" were pretty ubiquitous in the prosumer world. They eventually transitioned to better tapes/standards, but all worked well and even Windows eventually had native support (via Microsoft Backup). I restored my files off of these tapes 25 years after recording them, so I'm grateful they existed at the right moment in time when drives and floppies would have otherwise failed me. I naively assumed in modern times LTO must be dirt cheap due to decades of competition, but it never came to be.


The LTO tapes are dirt cheap.

Only the tape drives are extremely expensive (thousands of $).

If you have hundreds of TB of data, LTO, including the cost of the drive, becomes cheaper than HDDs.

The QIC tape cartridges had the problem that the rubber belt which moves the tape disintegrates after a number of years, making them unreadable without special equipment.

The LTO tapes have a much longer lifetime.


LTO is expensive because it's enterprise-oriented, and despite the O in the name meaning "open", seems actually a proprietary standard since you can't just go to their site and download the specs.


It would be great if someone could blog about the reverse engineering of such a tape drive here.


Tape is a backup medium in this timeline though, just not exactly vhs form factor.


VHS was also used for backups, see e.g. https://en.wikipedia.org/wiki/ArVid.

And - if I remember correcly - GRAU and/or StorageTek robotic tape libraries also had support for VHS devices.


It was. I remember people doing it.


DVHS?


Really nice! In case anyone was wondering, this is for capturing and decoding the raw VHS RF signal from special test points on your VHS recorder. Some hardware hacking is required: https://github.com/oyvindln/vhs-decode/wiki/Hardware-Install...

By the way, great Japanese docudrama about the making of VHS with Toshiyuki Nishida and Ken Watanabe: https://rarefilmm.com/2020/05/hi-wa-mata-noboru-2002/


If you are familiar with TBC or Time Base Corrector, you can think of this program as an offline non linear time base corrector with a LOT of options. Also because it takes the VHS data as early after tape capture as possible, a lot of components in the VHS player are bypassed and implemented by superior software.


combine this with some ML-powered artifact correction and perhaps a bit of upscaling and you might invent the best VHS digitizer available


You definitely want to tee the process before you start doing any ML artifact correction to make sure that it actually is an improvement.


I find this stuff really interesting. It reminds me of another project where someone developed an optical scanner to capture the shapes of vinyl record tracks (without making physical contact, of course). The idea was then to "play-back" the record by simulating a needle responding to the tracks in an ideal way and then simulate the needle's transducer and finally the turntable pre-amplifier.

I see this project still uses an actual VHS head. I wonder if, in the future, folks will try to capture magnetic tape signal by using something like a hard drive head scanning over the top of the tape but not touching it? This could potentially retrieve signal badly damaged, unplayable tapes-- lay out a segment of tape on flat surface, scan it, repeat, until entire tape has been scanned.


I assume this is the project you mean? - https://ofersp.github.io/digital_needle/ it's a shame there doesn't seem to be sourcecode. Very cool though.

You can also get laser turntables - https://en.wikipedia.org/wiki/Laser_turntable which look intriguing

I'm rather curious about these microscopes - https://matesy.de/en/products/magnetic-field-visualization/m... which can visualise magnetic fields, they're very expensive though.


If I remember correctly, laser turntables were not popular because they also reproduced all the fine dust on the surface of the disk.


Yep. Every tiny dust particle makes an audible pop, while an actual stylus would've just pushed it out of the groove.


So laser turntable needs a leading 'dust plow' ?


That sounds good! Two other solutions:

- low pass filter. Assuming the dust is small compared to the expected movement in the groove, you can filter it out electornically.

- dust detector. Nikon had a cool 35mm scanner... instead of RGB, it had an additional IR layer at an angle just to detect dust. So, automated dust removal tools knew if a black spot in an image was supposed to be there, or if it was actually dust. Here, extra optics would know if the laser was reading dust and could mute/filter the sound during that time.


Interesting ideas!

The 'dust detector' is 'Digtal ICE' that you'll sometimes see labeled on scanners. (https://en.wikipedia.org/wiki/Digital_ICE)


Someone should try doing a dsp+ml hybrid filter that takes both the optical signal and the generated audio into account to filter out the crackling



Slightly off-topic, but bit related:

I'm about to start a project for digitalizing a bunch of recordings from a 1990s Sony Handycam for a film project run by a friend of mine. The quality doesn't have to be perfect, but I want to ensure I don't risk degrading the "tapes" themselves. Anyone know of any hardware that is up for the task? Doesn't have to be professional quality, but of course I want good results.

Just about to start the project so haven't had time yet to look into what hardware I need yet, maybe people here have good ideas, you usually do :)


I went with a lazy way to digitalize old VHS/VHS-C tapes. Bought a Panasonic DMR-EX99V [0] which is a DVD/HDD/VHS/TV tuner combo in one. That was the last model Panasonic made and it also has an HDMI output. So basically I recorded all the VHS to the internal HDD > then just moved them to the PC through the DVD recorder. It has a USB port but unfortunately you can't access the raw recorded files on the HDD that's why the DVD > PC step is needed. I'm not an expert probably someone could hack it to gain access... Anyways it was one of the better purchases I've made. Works perfectly and so far no problems at all. And it just works hence why I said lazy at the beginning, simple system with good quality.

0, https://m.media-amazon.com/images/I/71mbsPXPhzL._AC_SL1500_....


The big problem with old tape is that it tends to stick. Try winding it manually for a short stretch to see if the tape is still loose and if it isn't then you probably should contact someone with more expertise to get the tape to be unstuck before putting it in a machine. Stuck tape also tends to break very easily.


Sony Handycam implies possibly Video 8 or Hi8 tapes.

If you can get hold of a Digital8 deck that works (and well) then you can hook that to your PC with a FireWire card, and do a direct digital capture of analogue tapes. The DSP in the D8 deck will do an excellent job of decoding, far better than an analogue deck, and you'll get a really clean output without all the "convert down/convert up/convert back down" thing you get using composite jacks.

You'll need to convert the raw DV files into something suitable for editing and distributing, but I guess - since you're on here - you already know about ffmpeg.

Here's an example of a very old - 2000/2001 or so! - tape that I had lying around in a box in the shed for the past 20 years. I shot it with a hand-held Sony Video 8 camcorder when some power station chimneys were being demolished near where I worked. This would (of course) be the day I forgot to throw a tripod in the car, "Oh I don't need to pack that, I've got one in the workshop, I'll leave mine at home..."

https://www.youtube.com/watch?v=ZPmCygZIjio

It was a pretty grey and drizzly day, as I recall. I could have got the colours up a bit in editing but I didn't feel like it, and this is pretty much how it came off the quite-badly-damaged tape.


If the tapes are really degraded, state of the art is to digitize them once and do that run as good as possible.

Stuck tapes sometimes are stuck because of moisture. In that case, the tapes are "baked" at a certain temperature to get the moisture out. If the tapes are in really bad condition, you get only one chance to capture what's on them, but the flip side is that one run can be of pretty high quality.

Edit: if your tapes are DV or Digital-8, get a camera with firewire out.

If your tapes are Hi8 analog, get a digital-8 camera which can play analog tapes with firewire out. You won't get a better quality without going the VHS-Decode way.

If none of that is an option, get a decent composite to HDMI converter, than capture the HDMI from that into a PC with a HDMI ripper.

Or one of those "HDMI to SD card" rippers floating around.


assuming the camera has rca out jacks, you can get a rca to hdmi adapter box for less than $20. If you computer doesn't have hdmi capture they also make rca to usb boxes as well (I don't think the cables from rca to usb without a chip in it will work but I might be wrong). Then OBS can record it


They also make little devices that take a usb thumb drive and have a little screen for preview, then you don't even need to tie up a computer while doing it.

Just hit record on the box with the usb stick and hit play on the VCR and set a timer to come back in an hour or two.


https://timfordphoto.com/lossless-422-digitizing-of-video-ta...

if the camera is working and has RCA plugs


What is it about OSS project webpages and burying any layman's explanation or context.

It's like they've been knee-deep in it so long, surrounded by fellow geeks they just assume everyone should know what they're talking about.


They owe you nothing, so if you want to figure something out, searching the web is your best chance.

Also, how is it not clear what the project is? First thing I see from the submission link:

> Software defined VHS decoder

> A fork of LD-Decode, the decoding software powering the Domesday86 Project

Which links to https://github.com/happycube/ld-decode and https://www.domesday86.com/

> Software defined LaserDisc decoder

and

> Domesday86 is a project that aims to recreate the experience of the original BBC Domesday project using modern hardware and software

Which leads me to searching what BBC Domesday is, as I didn't know:

> The BBC Domesday Project was a partnership between Acorn Computers, Philips, Logica, and the BBC to mark the 900th anniversary of the original Domesday Book, an 11th-century census of England. It has been cited as an example of digital obsolescence on account of the physical medium used for data storage.

Not sure why everything has to be made for/explained as it's made for literally everyone. Some software is for a niche section of programmers/developers/$niche-group, that's perfectly fine. If you're curious, use a search engine like the rest of us.


Things don't need to be explained from base principles or anything like that and as you mentioned they're not beholden to anyone, but explaining to a bit broader of an audience than one's particular niche is still generally a good idea. It makes it easier for people not-in-the-niche-but-somewhat-close to be able to understand/evaluate things. It could be a project that's relevant to this near-to-the-niche person, but without somewhat broader explanation, they'd miss it.

Another good idea (that no one is obligated to do) for project descriptions/overviews is to give a brief mention of why. For instance, it would have been nice if the readme for this project mentioned the purpose being "To bypass all non-essential hardware, and process it all in software directly for an affordable and simple way to create a true 1:1 archival copy of analogue tape mediums." It wasn't too hard for me to dig a bit into the project wiki to find that out and piece it together, but I'm used to doing so, specifically because so many readmes tend to not do it themselves.

Finally, you've said "they owe you nothing" and I've also noted the lack of obligation, but while technically/legally true, there are still some expectations and unofficial obligations to varying degrees when releasing open source software. Generally, the more useful/interesting the software is, the more expectations and unofficial obligations there are. Take for instance any software that has a benevolent dictator for life (BDFL) scenario. That term on its own has expectations of benevolence built-in. There are expectations that they'll guide the project in good directions, that they'll ensure bugs get fixed, and to some degree that the community will have some input on things even though the BDFL makes the final call. More generally on most projects, there are expectations that bugs will get fixed, pull requests considered/merged when appropriate, documentation will be provided, and so on. It's hard (perhaps impossible) to have a successful open source project that does not do these kinds of things, so in a real-world practical sense, there _are_ obligations in open source projects, if you want any kind of success for the project.


> They owe you nothing, so if you want to figure something out, searching the web is your best chance.

Of course that's true, but most OSS devs would prefer broader usage to narrower usage.


Commercial software owes me nothing either.

So, to understand it, I should know what CVBS is and click on links to other projects. Which I did:

Apparently LD-Decode is a Software defined LaserDisc decoder. Great. It also buries its basic purpose in further links.

As for Domesday86 Project, its About page is about project members, privacy policy and general disclaimers. And it's just weird that you think "The BBC Domesday Project was a partnership between Acorn Computers, Philips, Logica, and the BBC to mark the 900th anniversary of the original Domesday Book, an 11th-century census of England. It has been cited as an example of digital obsolescence on account of the physical medium used for data storage." is a good description of whatever it is.

I have an electronics degree and I struggled to get this basic info, so imagine how bewildering this would be to a less technical audience. It doesn't need to be this way. OSS can do so much for people, if only the slightest effort can be made to let them in and indulge their curiosity.

Also, before you respond with an explanation of why jargon is good, consider the reason you didn't boot up your computer with a careful sequence of toggle switch positions, is because someone before you was kind enough to make the technology accessible, even to snarky YC commenters.


I think that's what hackaday does.


Sometimes.


This uses high speed ADCs to capture the signal. Anyone know the bandwidth of VHS? If it's narrow enough, using a much cheaper SDR could be an option.

The usage of a DC blocking capacitor implies it's not baseband.


~5.5mhz split 3.4m luminance 400khz chroma / 1.7mhz stereo fm audio


Yeah that's too wide for say an RTL SDR


much cheaper than $30 25MHz 16bit/50MHz 8bit cards they are using?


> $30 25MHz 16bit/50MHz 8bit cards

wait waht? tyop? if not please tell me where i may ask Santa for this item cuz i wants it.

edit: this link was useful: https://github.com/happycube/cxadc-linux3#where-to-find-curr...


read the submission


I see it now; it needs crystal replacement to run at 8bit 40MHz it seems.


First item in readme was much more expensive than that


I wonder if this could be used to better decode tapes with some degradation and artefacting.


Absolutely. While a tape player may drop out and struggle to recover, this software stands a much better chance of deciphering.


This may be a viable path to fixing up really old recordings as well, those tend to have a lot of noise and pops / crackles in them.


In terms of physical construction, I believe early 90s VCRs were the best. Late enough to have most of the reliability issues worked out, and before cost-saving became a priority. That said, perhaps the last designs (late 2000s?) are also alright because they were simplified to reduce assembly cost, but may be more fragile too.


I don't understand why this is better than simply doing composite or s-video to 480p HDMI with a cheap little box and capturing that?

It seems like this is an order of magnitude more complex and expensive.

Is the quality really that much better?


I went that route and there's a catch. The composite/s-video adapters/upscalers to HDMI have a chip in them that is factory programmed with some video and color settings that can't be manipulated. You can do some alterations in OBS with filters or in Premiere after saving it to compensate for innacuracies.

For ex. my situation: cheap upscaler bought before covid had really high saturation and turned small areas of similar colours into one color squares no matter the bitrate chosen in OBS(this type of artefact is very obvious in 140p youtube video). After getting into it again in present day the upscaler stopped working and bought another one of the same kind. Guess what, it ships with a different chip and different settings, this time it has almost no colors and presents weird glowing around dark regions when the camera moves around fast. Now I'm in a pickle and I'm really considering going the above route.


has anyone told Technology Connections about this??


I wonder if this could be helpful in finally making an emulator of the Action Maxx console system, which used VCR tapes for content.


I’m not familiar with the Action Max, but the Wikipedia page links to this emulator: https://web.archive.org/web/20110405205335/http://www.jaeger...


I am somewhat familiar with that project - it's close but it isn't the true emulator we've been trying to achieve for a long time.


what is missing?


Can we have AI remove the artifacts from VHS after it is digitized?

Anything exists like this available ONLINE?


no, but we can have AI hallucinate alternative "pretty looking" version


Can I use this to defeat Macrovision copy protection on old VHS movies?


Yes. Macrovision works by interfering with primitive auto-gain circuits. This would easily defeat it.

You can also ignore macrovision if you have an older deck with manual gain.


This would be super overkill. There are tons of ways to get around macrovision.


too bad the first and best capture option costs several hundred of dollars otherwise this would be epic. Now its just awesome ;)


The easiest supported option seems to be this: https://a.aliexpress.com/_mrd5cMK


Yes, which you still need to add to a VHS player.


Well yes, but that’s the problem with VHS tapes :)

Realistically, this seems at least an order of magnitude cheaper than any option with comparable quality, and VHS players can be found for much more money and way more easily than a Time Base Corrector (whose output you will still need to digitize somehow)


for much LESS money, not more, of course. Too late to edit


No audio?


If I get this correctly, you’re using the RF input to get the whole magnetic signal on the tape, which would include the audio track




Join us for AI Startup School this June 16-17 in San Francisco!

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: