HandyMKV for MakeMKV and HandBrake Automation

(github.com)

25 points | by geerlingguy 9 hours ago

3 comments

  • compsciphd 2 hours ago
    IMO encoding is just not that worth it these days. Storage is relatively cheap. An 8TB HD can hold 200+ bluray discs as is (assuming we are talking 30-40TB each). Lets say encoding lets us store 400-600 movies in the same amount of storage (going to argue that this is stretch at quality).

    Is the $100-$200 savings worth the extra time spent (also computing/gpu electrical costs.

    There's a reasonable argument that the cost in electricity would be measurable, perhaps small, but still measurable, if it's 1c per movie, not such a big deal, if its 50c a movie, one didn't actually save any money in practice. if one wants to software encode to get the best results, cost is going to be more than if one is ok with gpu encoding and just ok results from fixed encoders. (I would hazzard software encode at reasonable quality is going to be in the 25-50c cost if paying 25c a kwh)

    If one lives in an area where electricity is cheap but storage is more expensive, the calculation is different.

    Now, I'd note that there is one thing that storage being cheap can't directly solve. The ability to keep them online at a time (i.e. many computers are limited to the number of connected devices). In that world, one can argue that reducing that complexity also has value.

  • nickdichev 8 hours ago
    I've been having a lot of fun with claude to build one off cli's / tuis to solve my problems.

    I had this same problem and I got claude to whip up my own version of this tool built out with makemkv, ffmpeg, imdb api lookups, LLM-selection of the "most likely to be the primary track", and plenty of other features. Really fun time to be building small bespoke tools for yourself.

  • Lammy 5 hours ago
    HandBrake is the best if you want to ruin all of your DVD encodes.

    e: downvote if you want but I'm right and you're wrong lmfao

    For anyone in the peanut gallery who wants a good deinterlacer, try QTGMC. It's originally an Avisynth script, but I use a VapourSynth port: http://avisynth.nl/index.php/QTGMC

    • Dreami 3 hours ago
      Can you explain why it ruins the DVD encodes? I like this community to learn stuff
      • Lammy 45 minutes ago
        It all comes down to the fact that DVD is more of an analog format than a digital one. I feel like people get “CD ripping brain” which causes them to think that the most desirable thing is making the most-accurate copy of what's on the disc. For CD that's true because PCM is PCM, but for DVD the thing we really want is the program material, which is three layers deep on a DVD: inside an NTSC video signal, which is digitized following the Rec.601 standard, which is then shoved into an MPEG2 transport.

        Four major things that can be done to DVD to make them look great on modern displays:

        - Deinterlacing is the hardest to get right. Progressive-scan 24-frames-per-second DVDs exist but are mostly confined to movies where there will be a better BD release anyway. Interlaced DVDs where the program material is intended to be seen in 24FPS get “inverse telecine” (IVTC) instead of straight deinterlaced, but again I don't do a lot of those for the same reason. Almost any NTSC DVD that I care to encode is thus going to be 60000/1001 fields per second, which needs to be turned into 60000/1001 frames per second to avoid throwing away half of the available motion detail. If you do nothing at encode-time and produce an interlaced output, then the display or player software will end up doing it and will do a bad job. HandBrake's deinterlacing options just don't look good in my experience. I like QTGMC for this because it predicts the motion of the infill fields instead of just copying the previous field verbatim. It's very noticeable any time there's a lot of horizontal movement in the program material.

        - Resolution and ratio. Most people hear “anamorphic” DVD and think of 16:9 crammed into a 4:3 image, but the truth is that all NTSC DVDs are anamorphic. They're 720x480 which if you calculate it is actually a 3:2 aspect ratio. Very clever because it ends up being about the same amount of scaling for 4:3 or for 16:9 material. They rely on PAR/DAR flags to tell the player or display how to scale it, but modern displays have terrible terrible scalers because it's purely a box-checking thing for them and not a feature they spend money or effort on. When I encode a DVD I stretch it myself at encode-time to 720x540 or 960x540. There's obviously some artifacting inherent in that vertical stretch, but it avoids throwing horizontal resolution detail away by scaling 4:3 programs down to 640x480 like most encoders do. Then the 540 pixel-doubles cleanly into 1080, 2160, etc.

        - SD colorspace (Rec.601 again) is a similar issue where modern displays are just fucking terrible at it because there's no economic reason for them not to be. The chroma is already subsampled, so greens especially end up looking washed out and terrible. When I encode a DVD I convert them into HD colorspace which doesn't restore subsampled chroma but at least avoids letting the display make it worse.

        - Cropping. The program-area resolution is actually 702 or 704x480 for anything transferred from tape (look up SONY D-1). If you have any "DVDrips" sitting around of an '80s or '90s TV show, does it have 8 pixels of black pillarbars on the left and right? If so then the person who encoded it didn't know what they were doing. It subtly throws off the aspect ratio for the entire program, especially noticeable in animation where they tended to use exact-circle tools. Look at the characters' eyes in The Simpsons for a great example. I crop those off before my one-time scaling so the program ratio comes out perfect.

        This all applies similarly to PAL DVDs except I'm usually shrinking them down to 540px because the loss of some vertical resolution is still better than trying to get a modern display to scale 576px to panel-native res, and deinterlacing PAL is a straight 50-fields-to-50-frames without the wacky 1001 division notation that is a legacy of the backwards-compatible way that color was introduced to NTSC.

        • Dreami 2 minutes ago
          Thank you! I don’t have many DVDs (and only PAL), but it’s good to hear that I would need to be careful when ripping them