GNOME Bugzilla – Bug 771853
subparse: Last string isn't displayed when srt subtitles lack a blank line at the end
Last modified: 2018-01-26 11:27:19 UTC
Using totem, if I have a video with srt subtitles and there is not empty line at the end of file, the last string isn't displayed as it should. The spec seems to state there should be an empty line, but youtube accepts the file without the blank line just fine. Maybe gstreamer shouldn't be so strict about it?
That sounds like something we should be able to make work, thanks :)
Hi, I noticed that too, the issue is still there in 1.12.2 A quick way to reproduce it: gst-launch-1.0 playbin \ uri="https://www.freedesktop.org/software/gstreamer-sdk/data/media/sintel_trailer-480p.ogv" \ suburi="https://www.freedesktop.org/software/gstreamer-sdk/data/media/sintel_trailer_gr.srt" There are four dialogues in the srt file but the last one does not seem to be rendered. Ciao, Antonio
Interesting bug. subparse does the right thing here actually: when it gets an EOS event on its sink pad it will push out the remaining text, even if there's no empty line at the end. The problem is that it never gets an EOS event until the end of the clip, by which time it's too late to push out that last text. This is most likely a problem in streamsynchronizer, and I'm not sure if there's an easy fix for it. It works fine in playbin3, so I'm tempted to WONTFIX this bug, sorry.
(In reply to Tim-Philipp Müller from comment #3) > It works fine in playbin3, so I'm tempted to WONTFIX this bug, sorry. Is playbin3 a drop-in replacement? Did it have a name change?
It's not a drop-in replacement, no. Some of the stuff used in Totem to get per-stream tags/caps etc. has to be done with the new streams API now.
Found a solution after all: commit 3219b704fd6a6f24daef5a66e9251ae2e159a4cc (HEAD -> master) Author: Tim-Philipp Müller <tim@centricular.com> Date: Thu Jan 25 18:39:11 2018 +0000 subparse: fix pushing out of last chunk if last line has no newline With playbin the last subtitle chunk would not get displayed if the last chunk was missing a newline at the end. This is because streamsynchronizer will hold back the EOS event until the audio and video streams are finished too, so subparse would never forcefully push out the last chunk until the very end when it is too late. We get a STREAM_GROUP_DONE event from streamsynchronizer however, so handle that like EOS and force out any remaining text then. https://bugzilla.gnome.org/show_bug.cgi?id=771853