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 588638 - [katedec] add x-dvd-subpicture output
[katedec] add x-dvd-subpicture output
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-bad
git master
Other All
: Normal enhancement
: 0.10.14
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2009-07-15 10:58 UTC by ogg.k.ogg.k
Modified: 2009-08-10 23:25 UTC
See Also:
GNOME target: ---
GNOME version: Unversioned Enhancement


Attachments
Create x-dvd-subpicture bitmaps from suitable background images (54.66 KB, patch)
2009-07-15 10:59 UTC, ogg.k.ogg.k
needs-work Details | Review
add two category names to the simple subtitles type check (704 bytes, patch)
2009-07-20 11:35 UTC, ogg.k.ogg.k
needs-work Details | Review
Create SPU format images from suitable background images (55.19 KB, patch)
2009-07-20 12:59 UTC, ogg.k.ogg.k
committed Details | Review

Description ogg.k.ogg.k 2009-07-15 10:58:25 UTC
As requested in https://bugzilla.gnome.org/show_bug.cgi?id=525743#c37,
this patch adds to katedec the ability to convert suitable background
images to DVD style SPU bitmaps.
Comment 1 ogg.k.ogg.k 2009-07-15 10:59:57 UTC
Created attachment 138432 [details] [review]
Create x-dvd-subpicture bitmaps from suitable background images
Comment 2 ogg.k.ogg.k 2009-07-15 11:02:00 UTC
The following command plays a Theora/Vorbis/Kate stream using dvdspu:

gst-launch filesrc location=test.ogv ! oggdemux name=demux ! queue ! theoradec ! ffmpegcolorspace ! dvdspu name=spu ! ffmpegcolorspace ! xvimagesink demux. ! queue ! katedec ! spu.
Comment 3 ogg.k.ogg.k 2009-07-15 12:23:07 UTC
Ah, yes:
it seems that displaying a SPU outside the video crashes dvdspu.
This can happen if a DVD was encoded at a lower than original resolution.
Images are kept in the Kate stream at original resolution. This looks
to be a bug in dvdspu (encoding the SPU to display at 0x0 makes it work
fine (as it's fully onscreen for my test case then)).
Since katedec does not know the size of the video the SPU will be drawn
onto, it cannot rescale it at decode time (which is what the tiger element
does, as it overlays).
Storing pre-scaled images in the Kate stream seems like a poor idea (and
doesn't fix the problem anyway) as upscaling the video on playback will
have lesser resolution subtitles).
Comment 4 Jan Schmidt 2009-07-15 16:26:30 UTC
I was pretty focussed on DVD as I wrote the dvdspu element - there may be more than a few places where it assumes it's doing either 720x480 or 720x576 video in some way.

That said, I didn't have much trouble adapting it to support Blu-ray PGS subpictures, so it can handle (for e.g.) 1920x1080 OK too - it may just need extra checks around only rendering within the video frame.
Comment 5 ogg.k.ogg.k 2009-07-20 11:35:19 UTC
Created attachment 138808 [details] [review]
add two category names to the simple subtitles type check

This is to be applied after the patch to add 'SUB' to the
new split-media-type-in-two change in
https://bugzilla.gnome.org/show_bug.cgi?id=525743
so image based subs can go through katedec too.
Comment 6 Tim-Philipp Müller 2009-07-20 12:41:22 UTC
Could you udpate this/these so they apply against git master?
 
Comment 7 Tim-Philipp Müller 2009-07-20 12:48:06 UTC
Oops.
Comment 8 ogg.k.ogg.k 2009-07-20 12:59:30 UTC
Created attachment 138818 [details] [review]
Create SPU format images from suitable background images

Replaces and merges the two patches, against this morning's git master.
Comment 9 Tim-Philipp Müller 2009-07-20 23:08:02 UTC
Great stuff, thanks!

commit 7ae5022cee9bdcb46f62b109058caf82fe2db2be
Author: Vincent Penquerc'h <ogg.k.ogg.k@googlemail.com>
Date:   Mon Jul 20 13:54:49 2009 +0100

    katedec: create SPU format images from suitable background images
    
    Make katedec fabricate dvd-style subpictures for subtitle overlay
    bitmaps, for easier playbin2 integration (#588638).

Now we just need to make dvdspu handle 'oversized' subpicture input properly, then we can hook everything up in playbin2.
Comment 10 ogg.k.ogg.k 2009-07-20 23:15:24 UTC
Thanks for the rapid fire commits. I'll try to have a look at fixing
the dvdspu one, but it's code I'm not familiar with, so might take
some time.
Besides, there are cases where it'll be unreadable due to clipping,
unless scaled (which has its own readability problems).
Comment 11 ogg.k.ogg.k 2009-07-24 13:44:27 UTC
dvdspu fixed (for my test cases):
http://bugzilla.gnome.org/show_bug.cgi?id=589609