GNOME Bugzilla – Bug 735944
assrender: Totem does not show separate subtitle lines overlapping in time
Last modified: 2018-08-14 13:03:23 UTC
Totem doesn't seem to be able to show two separate lines of subtitle that overlap in time. This is from an ssa/ass subtitle embedded in a mkv file. ================= Dialogue: 5,0:00:17.83,0:00:22.20,Default,N,0000,0000,0000,,{\i1}No vine a este parque con algo en mente. Dialogue: 1,0:00:19.03,0:00:20.12,signs,,0000,0000,0000,,{\fnAbyss TS\blur0.8\an9\fs55\pos(1179,451)}Por favor, aparquen\N sus bicicletas. \N {\fs25}Administración del Parque ================= The first line starts at 17.83 seconds, and the second line is only shown after the first one ends at 22.20 seconds, instead of starting at 19.03. It gets worse when there are 5 or more that starts at the same time and only shows the first one that reads from the file. MKV file: https://mega.co.nz/#!ugpAjALI!chruyiHW9VgvvK8wSPHOhxpgnZ1kNJ40OcP3QTBuAB0 Extracted subtitle file: https://www.dropbox.com/s/nq0o0tf9judp9dy/bakemonogatari-03-spanish.ass?dl=0 Details: totem-3.13.90-1.fc21.x86_64 gstreamer1-1.4.1-1.fc21.x86_64 (libav, bad, base, good, ugly)
Created attachment 285283 [details] Epiphany and Totem playing a matroska file with multiline subtitles As I don't know how to use gst-launch to test this, I used 'python3 -m http.server 9914' to play the file within epiphany, and it shows all the lines as specified in the subtitle track. So I'm assuming that GStreamer does support this feature, but Totem does not. Is this correct? Details: python3-3.4.1-14.fc21.x86_64 epiphany-3.13.90-1.fc21.x86_64 webkitgtk4-2.5.3-6.fc21.x86_64 gstreamer1-1.4.1-1.fc21.x86_64
It will render multi-line subtitles properly if the assrender element is used, and not if the subparse element is used. Can you confirm that assrender is not used together with totem for you?
Created attachment 285360 [details] totem gst-debug-level 4 OK, so I did a 'totem --gst-debug-level=4' and I found both assrender and subparse in the output. $ grep -i assrender totem-gst.txt ==================== 0:00:01.208399621 3207 0x228d1e0 INFO GST_PLUGIN_LOADING gstplugin.c:833:gst_plugin_load_file: plugin "/usr/lib64/gstreamer-1.0/libgstassrender.so" loaded 0:00:01.208659380 3207 0x228d1e0 INFO GST_ELEMENT_FACTORY gstelementfactory.c:362:gst_element_factory_create: creating element "assrender" named "renderer" 0:00:01.209216903 3207 0x228d1e0 INFO GST_ELEMENT_PADS gstelement.c:643:gst_element_add_pad:<GstAssRender@0x274fb40> adding pad 'src' 0:00:01.209452948 3207 0x228d1e0 INFO GST_ELEMENT_PADS gstelement.c:643:gst_element_add_pad:<GstAssRender@0x274fb40> adding pad 'video_sink' 0:00:01.209472286 3207 0x228d1e0 INFO GST_ELEMENT_PADS gstelement.c:643:gst_element_add_pad:<GstAssRender@0x274fb40> adding pad 'text_sink' ==================== $ grep -i subparse totem-gst.txt ==================== 0:00:01.076787655 3207 0x7fd1c40d0c50 INFO GST_TYPEFIND gsttypefind.c:71:gst_type_find_register: registering typefind function for subparse_typefind 0:00:01.077106747 3207 0x7fd1c40d0c50 INFO GST_PLUGIN_LOADING gstplugin.c:833:gst_plugin_load_file: plugin "/usr/lib64/gstreamer-1.0/libgstsubparse.so" loaded ====================
So assrender is used in totem too, means something is wrong there
Created attachment 313459 [details] sample file for assrender: 1:48-1:55 should have two subs displayed at the same time.mkv
Created attachment 313461 [details] minimal .ass file
Created attachment 313462 [details] sample file: should have two subs displayed at the same time from 18-25 secs (mkv)
Created attachment 373081 [details] This is a video file I have been using to test. I test with: GST_DEBUG=assrender:5,assrender_library:5 gst-launch-1.0 -v filesrc location=test-subs.mkv ! matroskademux name=d ! queue ! h264parse ! avdec_h264 ! videoconvert ! r. d. ! queue ! "application/x-ass" ! assrender name=r ! videoconvert ! autovideosink
Created attachment 373082 [details] [review] SSA/ASS: Patch to fix multiple simultanious subtitles issue. Hi, I have written this patch to fix this bug. Please let me know if its OK. I have been testing by running this command with my video file that I attached before: GST_DEBUG=assrender:5,assrender_library:5 gst-launch-1.0 -v filesrc location=../video/test-subs.mkv ! matroskademux name=d ! queue ! h264parse ! avdec_h264 ! videoconvert ! r. d. ! queue ! "application/x-ass" ! assrender name=r ! videoconvert ! autovideosink I have also tested it with Tim-Philipp Müller's attached .mkv file.
Review of attachment 373082 [details] [review]: LGTM
Comment on attachment 373082 [details] [review] SSA/ASS: Patch to fix multiple simultanious subtitles issue. Thanks, committed: commit bba33533ab589e254d2427036befec1493eca306 (HEAD -> master, origin/master, origin/HEAD) Author: Michael Drake <michael.drake@codethink.co.uk> Date: Wed Jul 18 11:11:17 2018 +0100 assrender: fix multiple subtitles on screen simultaneously
Thanks Jan! :)