clapper icon indicating copy to clipboard operation
clapper copied to clipboard

The "\n" is not rendered as a line break for subtitles

Open fieraoh opened this issue 1 year ago • 7 comments

Fedora 36 Gnome 42.3 Wayland

screenshot

fieraoh avatar Jul 18 '22 02:07 fieraoh

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.

Rafostar avatar Jul 18 '22 11:07 Rafostar

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

Rafostar avatar Oct 06 '22 15:10 Rafostar

Oh no, looks like I have closed the wrong issue.

fieraoh avatar Oct 06 '22 18:10 fieraoh

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

Rafostar avatar Oct 06 '22 18:10 Rafostar

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.

fieraoh avatar Oct 06 '22 21:10 fieraoh

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.

Ferenc- avatar Oct 17 '22 01:10 Ferenc-

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.

Rafostar avatar Oct 17 '22 18:10 Rafostar