topbanner_forum
  *

avatar image

Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
  • Thursday March 28, 2024, 4:20 am
  • Proudly celebrating 15+ years online.
  • Donate now to become a lifetime supporting member of the site and get a non-expiring license key for all of our programs.
  • donate

Author Topic: SrtFix 1.1  (Read 3333 times)

MilesAhead

  • Supporting Member
  • Joined in 2009
  • **
  • Posts: 7,736
    • View Profile
    • Donate to Member
SrtFix 1.1
« on: June 16, 2010, 01:59 AM »
I don't know how common this is, but I ran into an .srt subtitle file that would not load in any player or even subtitle program.  Somehow all the commas ',' in the time lines milliseconds were replaced with periods '.'.

I'm not big with regular expression search and replace. It was just faster to write an AutoIt3 program in case this should pop up again.

It simply reads the .srt file listed on the command line, substitutes ',' for '.' found on even lines, and writes it back out to filename.srt.fixed.  The original is not altered.

Usage: SrtFix filename.srt

You can download it here:

http://www.favessoft.com/downloads.html

« Last Edit: June 20, 2010, 07:51 PM by MilesAhead »

MilesAhead

  • Supporting Member
  • Joined in 2009
  • **
  • Posts: 7,736
    • View Profile
    • Donate to Member
Re: SrtFix 1.0
« Reply #1 on: June 20, 2010, 07:31 PM »
SrtFix has been removed due to brain cramp.

If it worked it was by accident.

Sorry about that. Use a real srt fix utility from someplace.

MilesAhead

  • Supporting Member
  • Joined in 2009
  • **
  • Posts: 7,736
    • View Profile
    • Donate to Member
Re: SrtFix 1.1
« Reply #2 on: June 20, 2010, 07:54 PM »
SrtFix 1.1 has been posted.  You can download using the link in the top post.
The "brain cramp" was that 1.0 assumed checking for periods in even numbered lines would work, when that just happened to be so because the particular subtitle file had all "one liner" subtitles.

Version 1.1 now checks each line for "-->" which indicates the subtitle time interval.  On those lines if it finds a period '.' it will change it to a comma ','
to fix the milliseconds section of the time code.

That's all it does.  But when you get an .srt that won't load it's easy not to notice those commas are really periods, unless you look closely.