ezsub
- 2 Devlogs
- 12 Total hours
A suite of tools to mangle and convert subtitle files
A suite of tools to mangle and convert subtitle files
Added support for SubRip (.srt) files in the retimer. I had to make a generic subtitle object (ISubtitleFile) so I could keep .ttml support.
Most of the work was backend so I don’t have much to show. Instead of parsing an XML file, it reads through every line in the subtitle file and builds up a list of lines in the subtitle. It saves this back into a subrip file using those same rules. In theory this setup would make conversions easier,,, but i’ll need to spend a Lot of time properly implementing that haha
I spent quite a while working on this one very specific tool, huh. So, I needed something to change the playback speed of subtitles: European releases of TV shows and movies run faster than the same show in the US when aired on TV or released on DVD. Most of the time this isn’t an issue (it’s most noticeable in music) but it is an issue when you’re trying to use subtitles from the internet that have been timed against the “wrong” version. So that’s what this does: it takes in the frame rate (speed) of the video the subtitles were timed against, the speed of the video you’re trying to match it with (so often 25 FPS -> 23.976 FPS when dealing with PAL subtitles on something released in NTSC regions). Currently, it only works with TTML files (specifically files following the EBU’s EBU-TT-D format but it shouldn’t matter) because that’s just the format I was able to find the subtitles I was looking for in. I need to add support for other formats like .SRT and .ASS, which I’ll do after this devlog as well as adding a conversion tool between at least those three.
I’m building ezsub as a PWA, mainly because I think things like these should be easily accessible online.
To do this, I’m using Blazor WebAssembly to run the app fully in the browser, and it’s been an… interesting experience. As you can see from the screenshot, the app isn’t very polished (it’s still using the default template Blazor provides) but it does work (note how the timestamps in the “after” window are slightly later than the ones in the “before” window, that’s what’s supposed to happen). That being said, I’m building this as if it was a standalone app rather than a website, so I’m going to have to make it its own landing page at some point :D