Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion.

Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules.

 

Go Back   Doom9's Forum > General > Subtitles

Reply
 
Thread Tools Search this Thread Display Modes
Old 29th June 2024, 12:41   #1781  |  Link
RobertM
Registered User
 
Join Date: Apr 2011
Posts: 435
Quote:
Originally Posted by markfilipak View Post
But a script that includes regular expression processing will be easier. The subtitle file is just text.
Yes, the subtitle files (srt, ass, etc.) are plain text, and could easily be edited to rewrite the durations as you desire. Are you looking for a standalone script to post-process the subtitle files outside of SE?
RobertM is offline   Reply With Quote
Old 29th June 2024, 18:45   #1782  |  Link
markfilipak
Registered User
 
markfilipak's Avatar
 
Join Date: Jul 2016
Location: Mansfield, Ohio (formerly San Jose, California)
Posts: 285
Quote:
Originally Posted by RobertM View Post
Yes, the subtitle files (srt, ass, etc.) are plain text, and could easily be edited to rewrite the durations as you desire. Are you looking for a standalone script to post-process the subtitle files outside of SE?
I am. If you have one handy that you want to share, that'd be great. If you don't, that's okay, too. It will be easy enough to write. I'm a little bogged down at the moment preparing a revised bug summary to submit to FFmpeg's trac system. That's why I haven't gotten around to this.

When/if I write my own, it will be HTML+javascript that works like this: Copy the srt into the web page, push a button, copy the result back to the srt. I'll have a field for the 'attention' duration and another for 'milliseconds per character'.
markfilipak is offline   Reply With Quote
Old 30th June 2024, 01:26   #1783  |  Link
RobertM
Registered User
 
Join Date: Apr 2011
Posts: 435
Quote:
Originally Posted by markfilipak View Post
I am. If you have one handy that you want to share, that'd be great.
I have a python script that I have used in the past to parse .ass files. It could be modified pretty easily to do what you want.
RobertM is offline   Reply With Quote
Old 30th June 2024, 01:49   #1784  |  Link
markfilipak
Registered User
 
markfilipak's Avatar
 
Join Date: Jul 2016
Location: Mansfield, Ohio (formerly San Jose, California)
Posts: 285
Quote:
Originally Posted by RobertM View Post
I have a python script that I have used in the past to parse .ass files. It could be modified pretty easily to do what you want.
It's been about 20 years since I wrote any python. I'd be pleased to look at it. If it's not too many lines, I imagine you could paste in doom9.
markfilipak is offline   Reply With Quote
Old 30th June 2024, 05:40   #1785  |  Link
RobertM
Registered User
 
Join Date: Apr 2011
Posts: 435
I took my old file and rolled it into a new little script file for you. Seems to work in my testing, but you'll have to give it some real-world exercise. If you have Python installed on your system then you should be able to simply double-click it and the usage should become evident. Let me know if you have trouble.

[edit] I appended the script to this message, but it won't be available until it has been reviewed, I understand. [/edit]
Attached Files
File Type: rar SubTailor.rar (2.0 KB, 7 views)

Last edited by RobertM; 30th June 2024 at 19:06.
RobertM is offline   Reply With Quote
Old 3rd July 2024, 21:19   #1786  |  Link
RobertM
Registered User
 
Join Date: Apr 2011
Posts: 435
Quote:
Originally Posted by markfilipak View Post
I'd be pleased to look at it. If it's not too many lines, I imagine you could paste in doom9.
Doesn't seem like my attachment is getting looked at, so I'll send you the code in a PM. It's a python script, so just text.
RobertM is offline   Reply With Quote
Old 3rd July 2024, 23:19   #1787  |  Link
Emulgator
Big Bit Savings Now !
 
Emulgator's Avatar
 
Join Date: Feb 2007
Location: close to the wall
Posts: 1,623
You may report your own attachment for approval.
P.S. as RobertM did not, I just stepped in and reported it for approval.
__________________
"To bypass shortcuts and find suffering...is called QUALity" (Die toten Augen von Friedrichshain)
"Data reduction ? Yep, Sir. We're that issue working on. Synce invntoin uf lingöage..."

Last edited by Emulgator; 9th July 2024 at 23:48.
Emulgator is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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


All times are GMT +1. The time now is 15:29.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.