• 4 Posts
  • 43 Comments
Joined 1 month ago
cake
Cake day: February 11th, 2026

help-circle
  • Fun fact - HISTV actually has two-pass encoding! Though, with enough system RAM you can actually look ahead far enough that you can get the benefits of two-pass in just a single pass. I have a bit about this in the README.md:

    Precision mode

    One checkbox for the best quality the app can produce. It picks the smartest encoding strategy based on how much RAM your system has:

    Your RAM What it does
    16GB or more Looks 250 frames ahead to plan bitrate (single pass)
    8-16GB Looks 120 frames ahead to plan bitrate (single pass)
    Under 8GB Scans the whole file first, then encodes (two passes)

    Two-pass only happens when precision mode is on AND the system has less than 8GB RAM AND the file would be CRF-encoded. Reason being those lookaheads above. Lookahead buffers live in memory. On low-RAM systems that buffer would be too large, so the app falls back to two-pass instead and stores the analysis run in a tempfile on disk. To break down each one:

    • Pass 1: Runs ffmpeg with -pass 1 writing to a null output. ffmpeg analyses the entire file and writes a statistics log (the passlog file) describing the complexity of every scene. No actual video is produced - this pass is pure analysis.
    • Pass 2: Runs ffmpeg with -pass 2 using the statistics from pass 1. The encoder now knows what’s coming and can distribute bits intelligently across the whole file - spending more on complex scenes, less on simple ones - without needing a large lookahead buffer in RAM. After both passes complete, the passlog temp files are cleaned up.

    The biggest problem with two-pass encoding is the speed. It has to do two passes over the whole file: one analysis, one actually encoding. With a 250-frame lookahead, you’re basically just writing your passlog into RAM - and reading from it - as you go. With 120-frame lookahead your CPU will likely catch up to the passlog at times, but you can still write to and read from it as you go, so you still get similar speed, and still close enough in quality that it doesn’t really make a difference, in a single pass.


  • You know what? I think I can figure out a way to estimate final file size and display it to the user. It’ll only work if “Precision Mode” is off though - that uses “CRF” or “Constant Rate Factor” which basically tells the encoder “be efficient, but make the file as big as it needs to be to look good”. As a result there’s no way to tell how big the file will end up being - the encoder makes the decision on the fly.

    With “Precision Mode” off, HISTV has two gears:

    1. If your file is already small enough (at or below the target bitrate), it uses “CQP” or “Constant Quantisation Parameter” (the QP I/P numbers), which tells the encoder “Use this quality level for every frame, I don’t care how big the file ends up”. It’s fast and consistent - every frame gets the same treatment.
    2. If your file is too big, it switches to VBR (Variable Bit Rate), which tells the encoder “Stay around this target bitrate, spike up to the peak ceiling on complex scenes, but don’t go over”. It’s how the app actually shrinks files. You can estimate the output size with target mbps * seconds / 8 - so a 60-second clip at 4Mbps lands around 30MB. <- This is the maths I’m thinking about doing to display the estimate to the user.




  • Haha yes, I use it regularly! And yes, it’ll be plenty fast on your system. I have very deliberately gone over the code base looking for inefficiencies six times now, so it runs nice and lean - I do an efficiency/hygiene pass every couple of releases to make sure bloat doesn’t creep in.

    As ark3@lemmy.dbzer0.com said, CPU encoding is slow but it preserves the most quality. No kidding, it really is night and day compared to GPU encoding - for this, just tick “Precision mode” in HISTV. It’s about 1x speed on most videos, so a 45 minute file will take about 45 minutes.

    GPU does go a lot faster, my 7900 XTX rips through 1080p at about 28x speed so a 45 minute file takes about 2 minutes. This is good enough for most content; just untick “precision mode” and set the multiplier to 2x or 3x with a bitrate of 4 if you want better GPU quality in HISTV. The multiplier says how high the peak bitrate can go, so you keep more data for fast-moving scenes, without forcing the encoder to keep useless data for slow scenes.


  • This is super helpful (and I see that “btw”, you got a smile with that one (⁠☞゚⁠ヮ゚⁠)⁠☞). Thank you for the heads up and all this detailed information! I’m excited to check out Certum.

    there seem to be very few people who simultaneously - pathologically dislike using Windows regularly - still want to make it easier for people on Windows to minimize Windows Defender complaints when running software that they build

    Describes me to a T 😅 My career is rooted in support, so my pathologies include trying to make things end-user easy.


  • There really aren’t many to be honest, Tdarr is super powerful! But the setup is a lot, at least on first run. The main point of HISTV is for the times when you can’t be bothered to set up tdarr, like if you only have to do spot conversions, or for people who don’t want to learn how to use Tdarr. But there are a few features unique to HISTV!

    I have built in disk space monitoring so your drive doesn’t fill up during encoding, which tdarr doesn’t do; I don’t know if tdarr supports turning gif/webp/mjpeg/apng into MP4/MKV; also, tdarr doesn’t auto detect your hardware, where HISTV does a few test transcodes on startup to determine not only what hardware is available but whether the encoder for that hardware is working.


    1. Thank you! I am obnoxiously proud of myself for that one 😅

    2. That’s actually how this all started for me haha! I was sitting there tweaking the same command as I hit videos with different formats or quality levels, and I thought to myself that it’d be a lot easier with just a few smarts like detecting if a video is already at the target quality level. The first version was actually just a winforms GUI wrapping that very PowerShell command - it’s come a long way in just a few weeks.

    3. Subler is interesting! Hmm. Currently HISTV just copies over ask the subtitle tracks directly. I think I could add a subtitle function like Subler’s to bake in subtitle tracks, if the user has the subtitle file they want to use. Would that be useful? Metadata download from the internet is messy though, I might want to leave that to the existing *arr solutions.



  • Thank you very much, that’s very kind! 😊

    I didn’t know I could get the cert from elsewhere, I appreciate the heads up; my experience lies mainly in networking, rather than software. I’ll open that possibility back up, then. It’d be a first for me, and I’m getting a real taste for firsts with this project!

    I’m not taking anyone’s money, though, even Windows users (right now, that includes me… I’m working on it lol). I’m doing this purely for the love of the game!






  • I’m right there with you, bud. I tried StoatChat too, and I got a nice email from the German government about using an outdated version of React with RCE vulnerabilities. I think this must be a very difficult problem to properly solve, given the number of different approaches and how all of them have their own issues to contend with. Nextcloud Talk is the most usable option I’ve found because it does voice, video, and screen sharing and it also has call links you can send for unregistered people to join the calls. But performance is spotty even with the “high performance backend” set up (that may be due to my server being in Germany though 😅).

    As to being accused of using AI, don’t let it get to you. The people yelling the loudest can’t tell the difference between handwritten code and AI, because they can’t code. If you pull down your repo, you’ll be depriving people who might be able to use your project because of trolls who never would have tried it in the first place.

    I do use AI for coding, and I’ve gotten plenty of hate for it, but also people who don’t care and just want the functionality of the tool I built.

    And in fact I’m going to check out your project and see if I can get it up and running, so please don’t take it down. I’ll likely be putting it on my German server so I’ll let you know what the performance is like with extreme round trips 😁


  • Would be easier to contribute to XMPP or Matrix IMO.

    Synapse is in the middle of a rebuild without much compatibility between the legacy and new builds, and it’s a pain in the dick to set up at the moment. I know, because I did it.

    XMPP I haven’t tried to set up yet, but I imagine it to be similarly in-depth.

    As to why not contribute: edit: not AI, they just don’t have the confidence in their own skills to contribute to anyone else’s project.

    Now… why do the whole thing from scratch instead of forking? Great question. XMPP might just need a nice coat of paint, if it can handle voice and video and screen share; I haven’t come away with great impressions of matrix/synapse.



  • Yeah, I’m getting that; though this isn’t purely AI-generated. This is a working application that I’ve tested, have improved and plan on continuing to improve, and am currently using to transcode my media. There’s a lot more care and thought put into it than most people would expect on reading that it was created with the help of an AI model.

    I put the disclaimer because I respect that serious developers who actually go look at the code would like a heads-up that it’s genAI before they waste their time reading it. But, I would like people to at least have a chance to read why I think my approach is different than most.

    And, if you have videos to transcode, I’d love to hear what you think if you give it a go! I do actively fix bugs as well as add new features, so please do let me know if you try it and find an issue - I could use all the help testing it I can get 'cause my hardware to test on is quite limited.


  • I was hoping to catch this before your replied, as I went and read the readme, then it made more sense. So I deleted my reply. But too late!

    All good! I’m actually enjoying talking about this thing with people who want to know more so I don’t mind at all _

    The cool thing is there isn’t much to put into a command that does stuff like this, unless you changing the FFMPEG parameters every time, but that would seem unlikely.

    So actually, that’s exactly the issue I was running into! I’d run a batch command on a whole folder full of videos, but a handful would already be well-encoded or at least they’d have a much MUCH lower bitrate, so I’d end up with mostly well-compressed files and a handful that looked like they went through a woodchipper. I wanted everything to be in the same codecs, in the same containers, at roughly the same quality (and playable on devices from around 2016 and newer) when it came out the other end, so I implemented a three-way decision based around the target bitrate you set and every file gets evaluated independently for which approach to use:

    1. Above target → VBR re-encode: If a file’s source bitrate is higher than the target (e.g. source is 8 Mbps and target is 4 Mbps), the video is re-encoded using variable bitrate mode aimed at the target, with a peak cap set to 150% of the target. This is the only case where the file actually gets compressed.

    2. At or below target, same codec → stream copy: If the file is already at or below the target bitrate and it’s already in the target codec (e.g. it’s HEVC and you’re encoding to HEVC), the video stream is copied bit-for-bit with -c:v copy. No re-encoding happens at all - the video passes through untouched. This is what prevents overcompression of files that are already well-compressed.

    3. At or below target, different codec → quality-mode transcode: If the file is at or below the target but in a different codec (e.g. it’s H.264 and you’re encoding to HEVC), it can’t be copied because the codec needs to change. In this case it’s transcoded using either CQP (constant quantisation parameter) or CRF (constant rate factor) rather than VBR - so the encoder targets a quality level rather than a bitrate. This avoids the situation where VBR would try to force a 2 Mbps file “down” to a 4 Mbps target and potentially bloat it, or where the encoder wastes bits trying to hit a target that’s higher than what the content needs.

    There’s also a post-encode size check as a safety net: if the output file ends up larger than the source (which can happen when a quality-mode transcode expands a very efficiently compressed source), HISTV deletes the output, remuxes the original source into the target container instead, and logs a warning. So even in the worst case, you never end up with a file bigger than what you started with which is much harder to claim with a raw CLI input. The audio side has a similar approach; each audio stream is independently compared against the audio cap, and streams already below the cap in the target codec are copied rather than re-encoded.

    But yeah everything beyond that was bells and whistles to make it easier for people who aren’t me to use it haha.

    I am 100% looking for more stuff I can build - let’s talk about it!