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

Subtitles with three full lines in Teletext EBU STL files not being exported fully #8937

Open
Flitskikker opened this issue Oct 23, 2024 · 4 comments

Comments

@Flitskikker
Copy link
Contributor

Flitskikker commented Oct 23, 2024

The Dutch public broadcaster allows 3 lines of max. 36 characters for Teletext subtitles.

However, when exporting subtitles to Teletext EBU STL from SE, the text of those long subtitles is sometimes truncated.

Test subtitle:
image

Exporting as Teletext EBU STL (all default except these 2 settings):
image

After opening the exported STL file:
image

Test text to reproduce:

This is a test to check if subtitles
with three whole lines are correctly
being saved as an EBU STL file, yes.

Perhaps there is a character limit somewhere when exporting?

@niksedk
Copy link
Member

niksedk commented Oct 25, 2024

I'm not really sure. We have 112 bytes for the text excluding headers...
So 36 x 3 = 108 + 2 new lines (4) + headers/alignment info... more than 112. It is possible SE writes too much header info.
Do you have a sample file of this?

@Flitskikker
Copy link
Contributor Author

Flitskikker commented Oct 25, 2024

@niksedk
Here you go:

Sample files.zip

  • sample 1.srt: A file with 1 subtitle, with the text from above.
  • sample 1 Exported from SE.stl: This file exported to EBU STL from SE. This file will be truncated when re-opened in SE.
  • sample 1 Restored with Spot.stl: The previous STL file opened in Spot. Then I copied in the complete text and re-saved. When I open this file in SE, it shows the complete text.
  • sample 2 Created from scratch in Spot.stl: I re-created the file from scratch in Spot. When I open this file in SE, it shows the complete text.

Looking in a hex editor, it looks like the files from Spot may have 2 text blocks?

@niksedk niksedk reopened this Oct 26, 2024
@niksedk
Copy link
Member

niksedk commented Oct 26, 2024

Is latest source/beta any better?

@Flitskikker
Copy link
Contributor Author

@niksedk
Nice! With plain text, it loads the text correctly now.

I made another file where the long text is in the 3rd line, as you requested.
To push the format to its limits, I made every line a different color (green, yellow, cyan, red) and aligned all lines to the top.

Sample files 2.zip

Spot reads both STL files (the one exported from SE, and the one created from scratch) correctly.
In SE, it look like the color and position tags need to be continued and/or merged somehow:

image

I also included PAC exports for both, which is the other format I use for delivery to subtitling companies.
The top-alignment works, and the text is complete, but it appears SE doesn't support colors in PAC files.

When I open the Spot-created PAC file in SE, it loads everything except color tags.

When I open the SE-created PAC file in Spot, it has no colors, and there are tabs between every word for some reason:

image

Let me know if you want me to create a separate issue for this.
Of course, it could be an issue with Spot instead of SE.

Also, I could live without colors in PAC files by just using STL files, and doing the conversion to PAC in Spot.

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