VHS-Decode – Software defined VHS decoder

211 points by muterad_murilax 2 years ago | 80 comments
  • h2odragon 2 years ago
    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.

    • drmpeg 2 years ago
      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

      • h2odragon 2 years ago
        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?

        • xattt 2 years ago
          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.

          • PaulHoule 2 years ago
            I think of how most of the established ham radio brands are Japanese like that ICOM on the cover.
          • jinto36 2 years ago
            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

          • greggarious 2 years ago
            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.

            • Bluecobra 2 years ago
              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

              • BuildTheRobots 2 years ago
                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.
                • scraplab 2 years ago
                  I had one of these. It was a terrible mistake.
                • actionfromafar 2 years ago
                  Very cool. This could have been an excellent backup medium in a different timeline.
                  • matheusmoreira 2 years ago
                    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.
                    • apaprocki 2 years ago
                      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.
                      • amelius 2 years ago
                        It would be great if someone could blog about the reverse engineering of such a tape drive here.
                      • esrauch 2 years ago
                        Tape is a backup medium in this timeline though, just not exactly vhs form factor.
                        • nuxi 2 years ago
                          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.

                        • SoftTalker 2 years ago
                          It was. I remember people doing it.
                    • rwmj 2 years ago
                      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/

                      • actionfromafar 2 years ago
                        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.
                        • pmarreck 2 years ago
                          combine this with some ML-powered artifact correction and perhaps a bit of upscaling and you might invent the best VHS digitizer available
                          • jacquesm 2 years ago
                            You definitely want to tee the process before you start doing any ML artifact correction to make sure that it actually is an improvement.
                      • crispyambulance 2 years ago
                        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.

                      • capableweb 2 years ago
                        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 :)

                        • haunter 2 years ago
                          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_....

                          • jacquesm 2 years ago
                            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.
                            • Gordonjcp 2 years ago
                              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.

                              • actionfromafar 2 years ago
                                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.

                                • jccalhoun 2 years ago
                                  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
                                  • sneak 2 years ago
                                    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.

                                  • mosquitobiten 2 years ago
                                    https://timfordphoto.com/lossless-422-digitizing-of-video-ta...

                                    if the camera is working and has RCA plugs

                                  • Sporktacular 2 years ago
                                    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.

                                    • capableweb 2 years ago
                                      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.

                                      • joemi 2 years ago
                                        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.

                                        • funstuff007 2 years ago
                                          > 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.

                                          • Sporktacular 2 years ago
                                            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.

                                          • fomine3 2 years ago
                                            I think that's what hackaday does.
                                        • aidenn0 2 years ago
                                          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.

                                          • TylerE 2 years ago
                                            ~5.5mhz split 3.4m luminance 400khz chroma / 1.7mhz stereo fm audio
                                            • aidenn0 2 years ago
                                              Yeah that's too wide for say an RTL SDR
                                            • rasz 2 years ago
                                              much cheaper than $30 25MHz 16bit/50MHz 8bit cards they are using?
                                          • lathiat 2 years ago
                                            I wonder if this could be used to better decode tapes with some degradation and artefacting.
                                            • actionfromafar 2 years ago
                                              Absolutely. While a tape player may drop out and struggle to recover, this software stands a much better chance of deciphering.
                                              • jacquesm 2 years ago
                                                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.
                                            • userbinator 2 years ago
                                              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.
                                              • sneak 2 years ago
                                                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?

                                                • mosquitobiten 2 years ago
                                                  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.

                                                • tomphoolery 2 years ago
                                                  has anyone told Technology Connections about this??
                                                  • lightedman 2 years ago
                                                    I wonder if this could be helpful in finally making an emulator of the Action Maxx console system, which used VCR tapes for content.
                                                  • EGreg 2 years ago
                                                    Can we have AI remove the artifacts from VHS after it is digitized?

                                                    Anything exists like this available ONLINE?

                                                    • rasz 2 years ago
                                                      no, but we can have AI hallucinate alternative "pretty looking" version
                                                    • ThinkBeat 2 years ago
                                                      Can I use this to defeat Macrovision copy protection on old VHS movies?
                                                      • jeffbee 2 years ago
                                                        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.

                                                        • jccalhoun 2 years ago
                                                          This would be super overkill. There are tons of ways to get around macrovision.
                                                        • boboche 2 years ago
                                                          too bad the first and best capture option costs several hundred of dollars otherwise this would be epic. Now its just awesome ;)
                                                          • gattilorenz 2 years ago
                                                            The easiest supported option seems to be this: https://a.aliexpress.com/_mrd5cMK
                                                            • mod50ack 2 years ago
                                                              Yes, which you still need to add to a VHS player.
                                                              • gattilorenz 2 years ago
                                                                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)

                                                              • interestica 2 years ago
                                                                No audio?
                                                                • gattilorenz 2 years ago
                                                                  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
                                                            • Lindalee51 2 years ago