Saturday, February 22, 2014

SubRip Subtitles Time Adjustment Tool

I have been working on updating my Plex movie database with SubRip Subtitle (.srt) files from OpenSubtitles.org. One of the subtitle files I downloaded had the timing off from the voices. Very distracting.

OpenSubtitles.org - the biggest open subtitles database - http://www.opensubtitles.org/en
So I wrote up a Python script to adjust the timings of the .srt file and posted it to GitHub. You pass the movie .srt file and the time shift, and it outputs the modified subtitle file.
git clone https://github.com/oeey/srtshift

python srtshift/srtshift.py movie.srt 2.5 > movie_fixed.srt

# play movie and check subtitle timing, the commit the change with
mv movie_fixed.srt movie.srt

1 comment:

Jesse Jin said...

electric unicycleUnicycles look difficult to ride. The only people I've ever seen on unicycles was the one kid in high school who went to clown college on his summer break and that talented troupe of local street performers who also breathe fire. I never imagined a unicycle would be for me. I just knew I would end up flat on my face if I even tried. All my life, it was two wheels or bust. Until I met the When you see someone riding a self-balancing unicycle lean forward to go forward, lean back to stop, lean left or right to turn at his willing, whether it is envy to you? In fact, also you can! Here I hope you can be patient to read and follow the steps to practice, and soon you will become an enviable one.