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 595123 - [playbin2] Should hide the difference between subtitles and subpictures
[playbin2] Should hide the difference between subtitles and subpictures
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-base
0.10.25
Other Linux
: Normal normal
: 0.10.26
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on: 570753 600370
Blocks: 591662 591706
 
 
Reported: 2009-09-14 06:19 UTC by Sebastian Dröge (slomo)
Modified: 2009-11-12 12:28 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
playbin2: Aggregate subpicture and text streams in properties (3.31 KB, patch)
2009-11-02 02:33 UTC, Jan Schmidt
none Details | Review
playsink: Use subtitleoverlay for subtitles (6.44 KB, patch)
2009-11-03 12:09 UTC, Sebastian Dröge (slomo)
committed Details | Review
playsink: Add a queue before subtitleoverlay (7.99 KB, patch)
2009-11-03 12:09 UTC, Sebastian Dröge (slomo)
committed Details | Review
playbin2/playsink: Remove everything related to subpicture streams (23.28 KB, patch)
2009-11-03 12:09 UTC, Sebastian Dröge (slomo)
committed Details | Review
playbin2: Set subtitle caps as raw caps for the uridecodebins (5.17 KB, patch)
2009-11-03 12:09 UTC, Sebastian Dröge (slomo)
committed Details | Review
assrender.dot (65.63 KB, text/plain)
2009-11-03 12:39 UTC, Sebastian Dröge (slomo)
  Details
ssaparse.dot (66.33 KB, text/plain)
2009-11-03 12:40 UTC, Sebastian Dröge (slomo)
  Details
external-subtitle.dot (34.13 KB, text/plain)
2009-11-03 12:49 UTC, Sebastian Dröge (slomo)
  Details
playsink: Add a queue before the video sink if no subtitles are rendered (4.57 KB, patch)
2009-11-03 13:15 UTC, Sebastian Dröge (slomo)
committed Details | Review

Description Sebastian Dröge (slomo) 2009-09-14 06:19:30 UTC
Hi,
IMHO playbin2 should hide the difference between subtitles and subpictures. From the application point of view it's both subtitles, just that (as an implementation detail) the subpicture subtitles are not plain text.

Having this differentiation in the public playbin2 API makes it more difficult for applications to use it.

Also, from the inside of playbin2, both could be handled the same way. I was planning to write a subtitlebin that abstracts this handling and for example for something like assrender it would have to do exactly the same as for something like dvdspu (the bin would have one video sink, one subtitle sink and a video src)

(FYI this subtitlebin would also scale the subpicture subtitles to fit the video and all that but that's not exactly interesting for this bug I guess)
Comment 1 Sebastian Dröge (slomo) 2009-10-09 06:18:13 UTC
For this playsink has to be changed too... good that we don't make any real API stability guarantees yet.
Comment 2 Jan Schmidt 2009-11-02 02:33:16 UTC
Created attachment 146710 [details] [review]
playbin2: Aggregate subpicture and text streams in properties

Make the text stream properties reflect the aggregate of available
text and subpicture streams.
Comment 3 Jan Schmidt 2009-11-02 02:35:43 UTC
This patch achieves the goal somewhat, by making subpicture streams visible and selectable via the current-text property, as per other subtitle types. 

There are still some limitations, and potential weirdness when both subpicture *and* text streams are available in a given file - it's probably possible to end up with 2 streams (one text, and one subpicture) being rendered at the same time, because the de-selected type doesn't get disabled properly.
Comment 4 Sebastian Dröge (slomo) 2009-11-02 05:29:25 UTC
Don't worry about those other weirdnesses, today or tomorrow I'll also make subtitles and subpictures internally the same for playbin2/playsink.

Thanks for that patch though, saves me some time :)
Comment 5 Sebastian Dröge (slomo) 2009-11-03 12:09:12 UTC
Created attachment 146816 [details] [review]
playsink: Use subtitleoverlay for subtitles
Comment 6 Sebastian Dröge (slomo) 2009-11-03 12:09:22 UTC
Created attachment 146817 [details] [review]
playsink: Add a queue before subtitleoverlay

This will improve playback, and the same thing is done
for subpicture streams too.
Comment 7 Sebastian Dröge (slomo) 2009-11-03 12:09:30 UTC
Created attachment 146818 [details] [review]
playbin2/playsink: Remove everything related to subpicture streams

These will soon be handled the same way as subtitle streams.
Comment 8 Sebastian Dröge (slomo) 2009-11-03 12:09:38 UTC
Created attachment 146819 [details] [review]
playbin2: Set subtitle caps as raw caps for the uridecodebins

This will make sure that no subparse is ever plugged and subtitleoverlay
in playsink can select whatever it wants for subtitle decodebin.
Comment 9 Sebastian Dröge (slomo) 2009-11-03 12:10:46 UTC
These patches are on top of those in bug #600370 btw
Comment 10 Sebastian Dröge (slomo) 2009-11-03 12:22:12 UTC
All this should be here too in a few minutes: http://cgit.freedesktop.org/~slomo/gst-plugins-base
Comment 11 Sebastian Dröge (slomo) 2009-11-03 12:39:25 UTC
Created attachment 146822 [details]
assrender.dot

Graph of playbin2 during playback of a Matroska file with ASS subtitles that are rendered with assrender
Comment 12 Sebastian Dröge (slomo) 2009-11-03 12:40:36 UTC
Created attachment 146823 [details]
ssaparse.dot

Same but this time without assrender installed: will use ssaparse/textoverlay
Comment 13 Sebastian Dröge (slomo) 2009-11-03 12:49:39 UTC
Created attachment 146824 [details]
external-subtitle.dot

And a bit different with an external subtitle file.

Btw, to create nice pictures from this call

dot -Tpng -oexternal-subtitle.png external-subtitle.dot
Comment 14 Sebastian Dröge (slomo) 2009-11-03 13:15:36 UTC
Created attachment 146827 [details] [review]
playsink: Add a queue before the video sink if no subtitles are rendered

In case there are subtitles, this queue is already before the subtitle
overlay.
Comment 15 Sebastian Dröge (slomo) 2009-11-03 13:32:38 UTC
Ok, instead of polluting bugzilla, latest patches are here: http://cgit.freedesktop.org/~slomo/gst-plugins-base/
Comment 16 Tomasz Sałaciński 2009-11-06 17:37:02 UTC
(In reply to comment #14)
> Created an attachment (id=146827) [details] [review]
> playsink: Add a queue before the video sink if no subtitles are rendered
> 
> In case there are subtitles, this queue is already before the subtitle
> overlay.

Will this fix the bug http://bugzilla.gnome.org/show_bug.cgi?id=531166 ( Bug 531166 -  [textoverlay] subtitles shown with delay after keyframe seek) ?
Comment 17 Sebastian Dröge (slomo) 2009-11-07 07:15:19 UTC
(In reply to comment #16)
> (In reply to comment #14)
> > Created an attachment (id=146827) [details] [review] [details] [review]
> > playsink: Add a queue before the video sink if no subtitles are rendered
> > 
> > In case there are subtitles, this queue is already before the subtitle
> > overlay.
> 
> Will this fix the bug http://bugzilla.gnome.org/show_bug.cgi?id=531166 ( Bug
> 531166 -  [textoverlay] subtitles shown with delay after keyframe seek) ?

Depends, if its an external subtitle file: yes. For internal (i.e. inside Matroska or another container format) subtitles it only became better, not perfect yet.
Comment 18 Sebastian Dröge (slomo) 2009-11-12 12:27:47 UTC
commit e91458f13caa92e5c3d15f67f1c0c8b0a23a5c33
Author: Sebastian Dröge <sebastian.droege@collabora.co.uk>
Date:   Tue Nov 3 12:47:55 2009 +0100

    playbin2: Set subtitle caps as raw caps for the uridecodebins
    
    This will make sure that no subparse is ever plugged and subtitleoverlay,
    that subpicture streams are handled the same was as subtitles and that
    subtitle renderers are used if available.
    
    Fixes bugs #595123, #570753, #591662, #591706.