SubtitleEdit / subtitleedit

the subtitle editor :)
http://www.nikse.dk/SubtitleEdit/Help
GNU General Public License v3.0
8.87k stars 916 forks source link

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

Open Flitskikker opened 4 weeks ago

Flitskikker commented 4 weeks ago

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 commented 4 weeks ago

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 commented 3 weeks ago

@niksedk Here you go:

Sample files.zip

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

niksedk commented 3 weeks ago

Is latest source/beta any better?

Flitskikker commented 3 weeks ago

@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.