Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Convert to/from SMTPE timing? #8926

Open
darnn opened this issue Oct 21, 2024 · 3 comments
Open

Convert to/from SMTPE timing? #8926

darnn opened this issue Oct 21, 2024 · 3 comments

Comments

@darnn
Copy link

darnn commented Oct 21, 2024

I never found myself needing to do this, but now that I have, I can't seem to find a way to actually do it:
I have a subtitle file that's in SMTPE timing. I need to convert it to, uh, whatever the normal form of timing is called.
That is, right now, when I view the subtitles with "SMTPE timing" checked in the Video menu, they appear at the right times. I want a file where they would appear at the same times but with "SMTPE timing" unchecked.
Specifically, I need to produce an ASS file to created burned in subtitles, but outside of Subtitle Edit, everything treats the ASS file as if it is non-SMTPE timing, and so doesn't display the subtitles at the right time.
Also, in Generate video with burned-in subtitles, there's no option to use SMTPE timing either, so I can't do it through there.

@niksedk
Copy link
Member

niksedk commented Oct 21, 2024

Sync - Chang speed in percent has this:

image

@darnn
Copy link
Author

darnn commented Oct 21, 2024

This doesn't seem to work the same way as ticking SMPTE timing. For instance, in my ASS file, I have this line:
Dialogue: 0,1:22:28.88,1:22:30.38,Default,,0,0,0,,I thought I'd sell them.
In SE, this corresponds to video positions 01:22:28:21 and 01:22:30:09 (with SMPTE timing ticked).
If I go to 01:22:28:21 and untick SMPTE timing, the video position is now 01:22:33:20. If I go to 01:22:30:09 and untick SMPTE timing, the position is now 01:22:35:08.

If I then use Adjust speed in percent, the same subtitle now looks like:
Dialogue: 0,1:22:28.33,1:22:29.83
In SE, with SMPTE timing unticked, it runs between 01:22:28:08 and 01:22:29:20. With SMPTE ticked, it runs between 01:22:28:08 and 01:22:29:20. (Whereas it should be 01:22:33:20-01:22:35:08 with SMPTE unticked.)

@darnn
Copy link
Author

darnn commented Oct 24, 2024

After messing around in ChatGPT for a good while, it gave me this, which does perform the conversion correctly, if it helps:
sub2.py.txt
And this is what it gave me when I asked to convert it to C#, though I haven't tested it:
sub2.cs.txt

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants