After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 797134 - gst-player: Subtitle offset configuration support
gst-player: Subtitle offset configuration support
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-bad
git master
Other All
: Normal enhancement
: 1.15.1
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2018-09-12 20:00 UTC by Philippe Normand
Modified: 2018-11-01 10:47 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
subtitleoverlay: Add a subtitle-ts-offset property (3.98 KB, patch)
2018-10-28 14:58 UTC, Philippe Normand
committed Details | Review
playsink: Add text-offset property (5.11 KB, patch)
2018-10-28 14:58 UTC, Philippe Normand
none Details | Review
playbin: New text-offset property (2.54 KB, patch)
2018-10-28 14:58 UTC, Philippe Normand
committed Details | Review
playbin3: New text-offset property (2.62 KB, patch)
2018-10-28 14:58 UTC, Philippe Normand
committed Details | Review
examples/playback-test: New entry for text-offset updates (3.82 KB, patch)
2018-10-28 14:58 UTC, Philippe Normand
committed Details | Review
player: API additions for text-video-offset property (4.91 KB, patch)
2018-10-28 15:01 UTC, Philippe Normand
reviewed Details | Review
playsink: Add text-offset property (5.21 KB, patch)
2018-10-28 17:34 UTC, Philippe Normand
committed Details | Review
player: API additions for subtitle-video-offset property (4.99 KB, patch)
2018-10-28 17:36 UTC, Philippe Normand
committed Details | Review

Description Philippe Normand 2018-09-12 20:00:44 UTC
Sometimes subtitles are not properly synchronized with the movie. Having a property like the av-offset but for subtitles would be great.
Comment 1 Philippe Normand 2018-10-27 16:56:29 UTC
I started some patches for playsink, playbin and gst-player for this. Playsink now has a "text-offset" property. Feel free to name-bikeshed :)
Comment 2 Philippe Normand 2018-10-28 14:58:42 UTC
Created attachment 374080 [details] [review]
subtitleoverlay: Add a subtitle-ts-offset property

This property controls the synchronisation offset between text and video in
nanoseconds, by updating the parser src pad offset.
Comment 3 Philippe Normand 2018-10-28 14:58:46 UTC
Created attachment 374081 [details] [review]
playsink: Add text-offset property

When the playsink contains a text chain this property controls the
synchronisation of the subtitles and video by controlling the underlying
subtitleoverlay::subtitle-ts-offset property.
Comment 4 Philippe Normand 2018-10-28 14:58:51 UTC
Created attachment 374082 [details] [review]
playbin: New text-offset property

This new property controls the synchronisation offset between the text and video
streams. Positive values make the text ahead of the video and negative values
make the text go behind the video.
Comment 5 Philippe Normand 2018-10-28 14:58:55 UTC
Created attachment 374083 [details] [review]
playbin3: New text-offset property

This new property controls the synchronisation offset between the text and video
streams. Positive values make the text ahead of the video and negative values
make the text go behind the video.
Comment 6 Philippe Normand 2018-10-28 14:58:59 UTC
Created attachment 374084 [details] [review]
examples/playback-test: New entry for text-offset updates
Comment 7 Philippe Normand 2018-10-28 15:01:13 UTC
Created attachment 374085 [details] [review]
player: API additions for text-video-offset property

This new property contols the synchronisation offset between text and video in
nanoseconds.
Comment 8 Sebastian Dröge (slomo) 2018-10-28 17:12:41 UTC
Review of attachment 374081 [details] [review]:

::: gst/playback/gstplaysink.c
@@ +4064,3 @@
+
+  if (tchain && tchain->overlay) {
+    g_object_set (tchain->overlay, "subtitle-ts-offset", text_offset, NULL);

If a text-sink is set on playsink, you need to set the ts-offset property on it instead
Comment 9 Sebastian Dröge (slomo) 2018-10-28 17:14:44 UTC
Comment on attachment 374085 [details] [review]
player: API additions for text-video-offset property

I think everywhere else in GstPlayer we call this "subtitle", not "text". Let's keep it consistent.
Comment 10 Philippe Normand 2018-10-28 17:34:39 UTC
Created attachment 374090 [details] [review]
playsink: Add text-offset property

When the playsink contains a text chain this property controls the
synchronisation of the subtitles and video by controlling the underlying
subtitleoverlay::subtitle-ts-offset property.
Comment 11 Philippe Normand 2018-10-28 17:36:43 UTC
Created attachment 374091 [details] [review]
player: API additions for subtitle-video-offset property

This new property contols the synchronisation offset between subtitles and video
in nanoseconds.
Comment 12 Philippe Normand 2018-11-01 09:58:09 UTC
Attachment 374080 [details] pushed as 3cd38be - subtitleoverlay: Add a subtitle-ts-offset property
Attachment 374082 [details] pushed as dc5006f - playbin: New text-offset property
Attachment 374083 [details] pushed as 610fa16 - playbin3: New text-offset property
Attachment 374084 [details] pushed as 07d078e - examples/playback-test: New entry for text-offset updates
Attachment 374090 [details] pushed as ea3b074 - playsink: Add text-offset property
Comment 13 Philippe Normand 2018-11-01 09:59:43 UTC
Comment on attachment 374091 [details] [review]
player: API additions for subtitle-video-offset property

Attachment 374091 [details] pushed as de26abc - player: API additions for subtitle-video-offset property
Comment 14 Víctor Manuel Jáquez Leal 2018-11-01 10:11:09 UTC
Review of attachment 374091 [details] [review]:

::: docs/libs/gst-plugins-bad-libs-sections.txt
@@ +865,3 @@
 
+gst_player_get_text_video_offset
+gst_player_set_text_video_offset

sorry for arrive late, but these should be gst_player_{set|get}_subtitle_video_offset ??
Comment 15 Philippe Normand 2018-11-01 10:37:56 UTC
Oh yes, sorry about this! I'll fix it. Thanks Víctor!
Comment 16 Philippe Normand 2018-11-01 10:47:56 UTC
commit d3fd78084ad07382656d68288331fe62a87aa0b7 (HEAD -> master, origin/master)
Author: Philippe Normand <philn@igalia.com>
Date:   Thu Nov 1 10:44:44 2018 +0000

    docs: Follow-up fix for GstPlayer new subtitle-video-offset API
    
    These symbols were not renamed after the initial review in Bugzilla.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=797134