GNOME Bugzilla – Bug 531166
textoverlay: subtitles shown with delay after keyframe seek
Last modified: 2018-11-03 11:14:00 UTC
Hello, As you may know, seeking the movie with MicroDVD subtitles will make the subs disappear for few seconds. This patch will make the subtitles work great - like in MPlayer, Xine or FFDShow (the subs are shown instantly and GST is not slowed down). Actually, it will make GSTreamer the best media framerowk for these subs, because it supports italic/bold text, right now the only issue is seeking. Here it is: 434,435c434,439 < < if (!in_seg) { return NULL; } --- > if (in_seg) { > state->start_time = clip_start; > state->duration = clip_stop - clip_start; > } else { > return NULL; > } Tested with few subtitle files, and it works ok. I would like to ask someone to test it:) If you want to download the patch file, go here: http://dp0154.debowypark.waw.pl/gst-sub-patch.diff I am working on TMPlayer subtitle parser patch too, but AFAIK you prefer to open a new bug, so I'm doing it. Cheers, and thanks for GStreamer, Tomasz Sałaciński
Aww, and sorry - the patch is made against gstreamer-plugins-base-0.10.19.
Ok, one additional error: Totem is still missing subs, but only when seeking backward with arrow keys. Seeking with progress bar or seeking forward with right arrow key is working perfectly. Is seeking backward working differently in Totem? I remember the issue with missing audio on previous versions of GStreamer when seeking backward with arrow key.
Seeking backwards works the same way as seeking forwards, there's no real difference. Could you make a test file available that worked bad without your patch but works good with it? :) Also please create unified diffs (-u) in the future, they're much easier to read :) And against which version of gst-plugins-base did you create this patch? It seems this is already changed like in your patch since 2006
It happens with almost every file I have. The issue is, when seeking forward subtitles are shown instantly when they are supposed to be shown, after seeking backward you need to wait 5-10 seconds before the subtitles will appear. I made this against gstreamer-plugins-base-0.10.19. It happens on other subtitle formats, too. It doesn't happen if I will comment out the segment checking (but the performance is worse). Actually, disabling the segment checking makes subtitles work _perfectly_, but at the expense of performance. Enabling segment checking makes subtitles disappear for few seconds after seeking. It is very inconvenient, because microdvd parser is not checking for movie's FPS (and it should, according to specification: http://trac.annodex.net/wiki/MicroDVD, check this: " * Frame rates need to be converted into timings, thus it is necessary to obtain the frame rate of the video to ensure the syncronisation of subtitling. "). So if user wants to check if the subs are ok (if the framerate is ok), he needs to seek to few parts of the movie, and it takes time, because subs are appearing after few seconds.
The problem has to do with keyunit seeking. What happens is basically that avidemux will adjust the requested seek position to the position of the next key frame in the index. This will usually be before the requested seek position. The textoverlay element, however, will not know about this adjustment being made and won't know about the actual new start position of the stream, it will send data from the requested position (which is a few seconds after the actual start). That's where the initial gap/delay of the subtitle display comes from.
So is it possible to fix or should just be closed as WONTFIX? This is the only issue that bothers me (and many people AFAIK). It would be great to see this fixed.
Anything new on this bug?
Hi there, Is there anything new on this bug? It sits here for a quite long time.
The patch is not available anymore unfortunately. But this might have become much better with latest GIT of gst-plugins-base. Can you confirm?
Tomasz, can you please reopen this bugreport if this is still an issue for you? Thanks in advance!
Hello, Sorry for long delay. Yes, this is still an issue, but not with all video files, for example it happens with file marked as XVID MPEG-4. If there is any information I can provide you with?
I have this problem, too, but the subs disappear for longer than "just a few seconds". It can take up to a minute before they reappear.
*** Bug 632390 has been marked as a duplicate of this bug. ***
Related to bug #600648 and #686713
-- GitLab Migration Automatic Message -- This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity. You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/issues/12.