clapper
clapper copied to clipboard
The "\n" is not rendered as a line break for subtitles
Fedora 36 Gnome 42.3 Wayland
The subtitles are parsed on the GStreamer side of things, we get their pixel data and overlay them as texture, but we do not access the text (letters). This should be probably reported on GStreamer gitlab as subparse
element issue.
@fieraoh Since you closed this, I would like to ask if this was either fixed upstream or did you open an issue about it there. If so, I would like to link it here for anyone else who might have similar problem. Thanks.
Oh no, looks like I have closed the wrong issue.
@fieraoh
I am keeping this open only because I do not want problems like this to be lost and forgotten. As I explained some time ago, there is nothing actionable here about this. This issue should be probably opened on GStreamer gitlab as subparse
element issue. Please consider reporting it there, so we can close this one here.
To be honest with you, from a technical standpoint, I can't maintain an issue there as I haven't the faintest idea what a "subparse
" element issue is.
I turned a blind eye to it because the fix is pretty simple and 99% of subtitles don't use "\n" for inserting line breaks anyway.
For the sake of universal compatibility I'd entitle you to opening the issue on gstreamer yourself.
subparse
is the gstreamer plug-in responsible for parsing .srt
, .sub
, .mpsub
, .mdvd
, .smi
, .txt
, .dks
and .vtt
files.
And the issue is perhaps with gstsubparseelement?
I am guessing, that for a possible bugreport either a subfile would be needed which can reproduce the issue, or some logs which reveal what is going on.
A wild idea would be running clapper like this:
export GST_DEBUG='*:6' && clapper ./YOUR_SUBTITLED_FILE 2>&1 | grep -iE 'subparseelement'
This should print something like:
0:00:00.426762063 643 0x7fd8ac09f980 LOG subparse gstsubparseelement.c:134:gst_sub_parse_data_format_autodetect: SubRip (time based) format detected
0:00:00.426768592 643 0x7fd8ac09f980 DEBUG subparse gstsubparseelement.c:356:gst_sub_parse_type_find: SubRip format detected
Or if that doesn't happen then increase the scope a bit:
export GST_DEBUG='*:6' && clapper ./YOUR_SUBTITLED_FILE 2>&1 | grep -iE '(subparse|subtitle)'
and providing the output. Parhaps that catches something.
Printing everything + grep will make things very slow. The recommended way of running above would probably be:
GST_DEBUG=*subparse*:6 clapper ./YOUR_SUBTITLED_FILE
But I am not sure if this is a bug. Looks more like this is simply not implemented, thus text is displayed as-is.