The problem is caused by FFmpeg’s
srt encoder: it tries to preserve styles of the ASS subtitle format and in particular uses
<font> tag to specify same font that was used in ASS styles.
Media player in LG Smart TV, at least the one I have, doesn’t support those font tags in SRT subtitles, so it renders them just as a plain text.
I enabled debug logging for Serviio and here is the command it uses to convert ASS to SRT:
- Code:
DEBUG [ProcessExecutor] Starting ffmpeg -sub_charenc ISO-8859-1 -i /media/serviio/subtitle.ass -an -vn -c:s srt -f srt pipe:
To reproduce, try the following: save this to 1.ass
- Code:
[Script Info]
[V4+ Styles]
Format: Name, Fontname, Fontsize, PrimaryColour, SecondaryColour, OutlineColour, BackColour, Bold, Italic, Underline, StrikeOut, ScaleX, ScaleY, Spacing, Angle, BorderStyle, Outline, Shadow, Alignment, MarginL, MarginR, MarginV, Encoding
Style: Default,Liberation Sans,50,&H00FFFFFF,&H000000FF,&H56000000,&H00000000,-1,0,0,0,100,100,0,0,1,2,0,2,10,10,20,1
[Events]
Format: Layer, Start, End, Style, Name, MarginL, MarginR, MarginV, Effect, Text
Dialogue: 0,0:00:11.78,0:00:13.26,Default,,0,0,0,,Test
Run this:
- Code:
ffmpeg -i 1.ass -c:s srt 1.srt
The result is:
- Code:
1
00:00:11,780 --> 00:00:13,260
<font face="Liberation Sans" size="50"><b>Test</b></font>
Now, the solution is simple. Just use
text encoder to produce tag-less SRT file:
- Code:
ffmpeg -i 1.ass -c:s text 2.srt
The result is:
- Code:
1
00:00:11,780 --> 00:00:13,260
Test
So,
@zip, could you please add an option to Serviio, to pass
-c:s text to FFmpeg instead of
-c:s srt?