Kenny Shen

SSA to SRT: A conversion tool

Playing movies off a USB stick on the PS4 should be easy, except that when I did tried to do so recently, it wasn't. Besides the whole hassle of which formats are OK with the media player, there's the issue of subtitles. Turns out the easiest way was to just have some foo.mp4 and foo.srt in a folder on the USB stick.

But a few of the movies I had came with the subs in SSA format, and so I thought, why not write a conversion tool in a language that I've been meaning to learn - namely C. After 2 hours of reading some tutorials and seeing endless Segmentation fault errors, I managed to get a somewhat workable version going.


$ gcc run.c ssa-to-srt.c -o run; ./run foo.ssa

#...
628
00:36:02,160 --> 0:36:03,370
Of course! Any time.

629
00:36:03,450 --> 0:36:04,950
-Thank you.
-Any time.
            

There's a fair bit more to do, but I'm taking my time with this as I slowly inch my way through the K&R book.
Repo @ Github

<< back