“…Oh, apparently I need to install ffmpeg and mkvtoolnix for the ripping program to work properly? Which is fine, maybe a little tedious to install two more programs to get a third one to work, but I guess I can do that? Just this once. Just this once. Like it’s free, I shouldn’t expect too much, right?”

“Alright, so we’ve got the HD video with subtitles, now I want to extract and machine translate the subtitles. Thankfully I can just use mkvtoolnix to extract the subs, but I still need to get Subtitle Edit to actually edit and machine translate the subtitles. So I guess that’ll be program number four that I’ll probably only ever use once, but whatever, it’s fine.”

“…Now I could just use Google Translate for the machine translation, but I kinda want to run the translation locally, because I feel like that would be better for the environment, my privacy, and not supporting evil megacorporations. But to run the translation locally I apparently need to install something called LibreTranslate. At this point I’m growing a little numb to the amount of programs I have to install despite only needing to use them once, so I’m just gonna look up how to install LibreTranslate… OK, so I just type pip install libretranslate into the command prompt? That’s easy enough.”

“…Alright, apparently for the pip install command to work, I actually need to install Pip first, which I guess makes sense. To get Pip I first need to install Python, so let’s just go do that real quick…”

“…And now that we have Pip, I just have to go into the command prompt and type pip install libretranslate again. — Alright, looks like it’s working now… It’s working… It’s working… Awh, darn, an error right at the end? Something about ‘generating the metadata’? Something about ‘not being able to find vswhere.exe’? What, is… is it saying I need to install freaking Visual Studio before I can install libretranslate? Like I need a third program specifically to install our fifth piece of software that I will literally only ever use once? And Visual Studio has a bit of a hefty file size to boot, but it’s fine I guess, we’ll just uninstall it once we’re done with this task, OK? OK.”

“Alright, I’ve gone and installed Visual Studio — it took a while — and I’ve restarted my computer, so now it’s just a matter of typing pip install libretranslate into the command prompt once again, and… It’s going, hopefully it’ll work this time… It’s going, and… WHAT THE FUCK DO YOU MEAN ‘COULD NOT PARSE VSWHERE.EXE OUTPUT’?!?!?!?!?!

“Alright, alright. Let’s look this up. No need to freak out, 'cause we’ve at least solved the bigger issue of not having Visual Studio to begin with, so I’m sure this parsing issue is going to be an easy one to solve. — Huh, an old Stack Overflow thread says I should try installing the C++ workload for Visual Studio? But how many gigabytes is that!!! I am only going to use this thing once, to install one program which I will also only ever use once! But FIIIIIINE! Have it your way!!!”

[cartoonish sound effects of bangs, clatters and cat screeches]

[panting, eyes twitching, hair frazzled] “ALRIGHT, SOMETHING TELLS ME THAT IT WOULD’VE TAKEN LESS ELECTRICITY TO JUST USE GOOGLE TRANSLATE TO BEGIN WITH, AND LESS TIME AND EFFORT TO JUST TRANSLATE THESE SUBTITLES MANUALLY — BUT I HAVE, AT LAST, MANAGED TO ACTUALLY INSTALL LIBRETRANSLATE ONTO MY COMPUTER. SO NOW WE JUST HAVE TO PLUG THESE SUBTITLES INTO LIBRETRANSLATE AND LET IT RUN FOR A FEW MINUTES…”

"THESE TRANSLATIONS ARE

F U C K I N G

U N U S A B L E!!!"

[the last of my hairs turn gray and fall out; I collapse to the floor, covered in wrinkles, a husk of my former self]

  • ragebutt@lemmy.dbzer0.com
    link
    fedilink
    English
    arrow-up
    4
    ·
    17 hours ago

    if you are interested in subtitles and translation I would recommend subgen, it is a docker that can either analyze your media and generate subtitles (and translate) or if you have a powerful enough gpu it can do it in realtime. I don’t have a gamer mode gpu so I’ve never tried that part but even with just cpu processing a 20ish minute show only takes a few minutes to process on a 10th gen intel processor

    It’s nice because even if your media comes with no subtitles it will make them. It is powered by the openai whisper model, which is one of the ones they actually release, so you can run it entirely locally. That does mean it takes a decent amount of disk space (like 8gb or so). In my experience it’s very excellent at generating English subtitles. The translations are mixed but improving; they aren’t as good as translations from the full gpt 4o model and can struggle with colloquial language.

    It’s fairly easy to deploy though if you know docker. It’s usable on its own technically via python but the easiest way to use it to also install bazarr, link it to subgen, import your media, and then tell bazarr to generate subtitles. It will generate them in whatever language you want based on your subgen config

    https://github.com/McCloudS/subgen