Go Back   Forums > Community Chatterbox > Tech Corner > Programming
Memberlist Forum Rules Today's Posts
Search Forums:
Click here to use Advanced Search

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Old 04-10-2008, 11:48 AM   #1
Playbahnosh
The Peacemaker
 
Playbahnosh's Avatar


 
Join Date: Apr 2005
Location: Veszprem, Hungary
Posts: 353
Send a message via MSN to Playbahnosh
Exclamation Looking for help with text-editing script

Hello!

I'm looking for someone with knowledge of a programming or scripting language (doesn't matter which one) for a small-time text editing job.

My problem is: I was making subtitles for a movie with a sub-making program, when something odd happened. Somehow the timing and the texts got messed up, desynchronized. I need someone to help me synch it back again.

For those, who are not familiar with the format of .srt files, here is a sample:
Code:
967
01:18:20,597 --> 01:18:23,854
Well, as history has shown,
nothing was further from the truth.
It consist of a number, two timecodes and some text. Basicly, just a bunch of these sections follow each other in the file. The number is the index of the current subtitle line. The two timecodes mark the beginning and end of the line's display time, basicly that line will be displayed in the duration between the two timecodes.

My actual problem is: the editor somehow messed up the relation between the text and the timings, essentially shifting the texts forward to the next timecode. So, timings and durations remained the same, but it displays the wrong texts, it always displays the previous line.
There is no feature in my sub-editor (or in any sub-editor, that I know of) to shift the texts back in place. So I either do it by hand, one line at a time, or I don't. And doing click-->crtl+X-->click-->crtl+V will drive me crazy, if I have to do all the 1463 lines by hand, one-by-one.

This is what I need help with. A small script or whatever, that copies the TEXT from the next timecode, and pastes it back into it's place, then does this for all the remaining lines, so the subtitle comes back into synch with the timecodes, like this:



For somebody, who is moderately proficient in some scripting or programming language, this shouldn't be too hard, I guess. Please help me!
__________________
The Master of Light and Darkness

"Don't fight the bad things in life! Find the good one! They are everywhere! Don't spend your life fighting for goals you can never reach! Live for the moment!"


BEWARE: I'm using the forums as a personal blog!
Playbahnosh is offline                         Send a private message to Playbahnosh
Reply With Quote
 


Similar Threads
Thread Thread Starter Forum Replies Last Post
Castlevania movie script revealed TheChosen Blah, blah, blah... 16 18-07-2008 06:41 PM
Abandonia Script? jourdan Old Suggestions 4 09-07-2007 09:24 AM
Script Not Working After Migrate Reup Old Suggestions 1 25-08-2006 11:58 AM
Annoying Script Prompt -RESOLVED guesst Old Suggestions 7 28-07-2006 01:00 AM


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump
 


The current time is 04:19 PM (GMT)

 
Powered by vBulletin® Version 3.7.1
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.