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 537622 - [matroskademux] Doesn't export covers (file attachments)
[matroskademux] Doesn't export covers (file attachments)
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-good
git master
Other Linux
: Normal normal
: 0.10.9
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks: 318748
 
 
Reported: 2008-06-10 15:56 UTC by Bastien Nocera
Modified: 2008-06-16 10:57 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Bastien Nocera 2008-06-10 15:56:16 UTC
Using:
http://www.gnome.org/~hadess/mewmew-vorbis-ssa-cover.mkv

$ mkvmerge -i mewmew-vorbis-ssa-cover.mkv 
File 'mewmew-vorbis-ssa-cover.mkv': container: Matroska
Track ID 1: video (V_MS/VFW/FOURCC, XVID)
Track ID 2: audio (A_VORBIS)
Track ID 3: subtitles (S_TEXT/SSA)
Track ID 4: subtitles (S_TEXT/SSA)
Track ID 5: subtitles (S_TEXT/SSA)
Track ID 6: subtitles (S_TEXT/SSA)
Track ID 7: subtitles (S_TEXT/SSA)
Track ID 8: subtitles (S_TEXT/SSA)
Track ID 9: subtitles (S_TEXT/SSA)
Track ID 10: subtitles (S_TEXT/SSA)
Track ID 11: subtitles (S_TEXT/SSA)
Track ID 12: subtitles (S_TEXT/SSA)
Track ID 13: subtitles (S_TEXT/SSA)
Track ID 14: subtitles (S_TEXT/SSA)
Track ID 15: subtitles (S_TEXT/SSA)
Track ID 16: subtitles (S_TEXT/SSA)
Track ID 17: subtitles (S_TEXT/ASS)
Track ID 18: subtitles (S_TEXT/ASS)
Attachment ID 3599413032: type 'image/jpeg', size 37496 bytes, file name 'cover.jpg'

But GStreamer doesn't seem to export the attachment to applications:
$ gst-launch-0.10 -t playbin uri=file:///home/hadess/foo.mkv 
Setting pipeline to PAUSED ...
Pipeline is PREROLLING ...
FOUND TAG      : found by element "matroskademux0".
     video codec: XVID MPEG-4
   language code: eng
FOUND TAG      : found by element "matroskademux0".
   language code: jpn
FOUND TAG      : found by element "matroskademux0".
   language code: eng
FOUND TAG      : found by element "matroskademux0".
   language code: dut
FOUND TAG      : found by element "matroskademux0".
   language code: eng
FOUND TAG      : found by element "matroskademux0".
   language code: fin
FOUND TAG      : found by element "matroskademux0".
   language code: fre
FOUND TAG      : found by element "matroskademux0".
   language code: ger
FOUND TAG      : found by element "matroskademux0".
   language code: heb
FOUND TAG      : found by element "matroskademux0".
   language code: hun
FOUND TAG      : found by element "matroskademux0".
   language code: ita
FOUND TAG      : found by element "matroskademux0".
   language code: jpn
FOUND TAG      : found by element "matroskademux0".
   language code: nor
FOUND TAG      : found by element "matroskademux0".
   language code: pol
FOUND TAG      : found by element "matroskademux0".
   language code: por
FOUND TAG      : found by element "matroskademux0".
   language code: rus
FOUND TAG      : found by element "matroskademux0".
   language code: spa
FOUND TAG      : found by element "matroskademux0".
   language code: swe
FOUND TAG      : found by element "vorbisdec0".
         encoder: Xiph.Org libVorbis I 20020717
 encoder version: 0
     audio codec: Vorbis
 nominal bitrate: 112001
         bitrate: 112001
Pipeline is PREROLLED ...
Setting pipeline to PLAYING ...

It should export the cover as GST_TAG_IMAGE
Comment 1 Sebastian Dröge (slomo) 2008-06-11 08:40:57 UTC
Yeah attachments should be handled somehow, I've that on my TODO list already.

Problem is, how do we detect if an attached image is meant as a (front) cover or if it's the booklet of a CD for example? If we simply put all images into GST_TAG_IMAGE applications will probably have fun doing something meaningful with them. Do you have an idea? :)
Comment 2 Bastien Nocera 2008-06-11 17:18:19 UTC
Most applications fake it using the attachment filename (eg. "*cover*.jpg" is a cover), so either the filename should be exported in the caps, as is done for the image-type, or we could put voodoo magic for special-casing cover images in the demuxer.

The former is probably a better idea.
Comment 3 Sebastian Dröge (slomo) 2008-06-16 10:57:38 UTC
Ok, fixed in CVS. The demuxer now posts GST_TAG_IMAGE if the mimetype is "image/*" or if the filename contains the string "cover". Otherwise it posts the attachment as GST_TAG_ATTACHMENT.

I'll add support for this in the muxer later.

2008-06-16  Sebastian Dröge  <slomo@circular-chaos.org>

        * gst/matroska/Makefile.am:
        * gst/matroska/matroska-demux.c: (gst_matroska_demux_reset),
        (gst_matroska_demux_parse_attached_file),
        (gst_matroska_demux_parse_attachments),
        (gst_matroska_demux_parse_contents_seekentry),
        (gst_matroska_demux_loop_stream_parse_id):
        * gst/matroska/matroska-demux.h:
        * gst/matroska/matroska-ids.c: (gst_matroska_register_tags):
        * gst/matroska/matroska-ids.h:
        * gst/matroska/matroska.c: (plugin_init):
        Parse Attachments and post them as GST_TAG_IMAGE if we detect
        it as image and otherwise as GST_TAG_ATTACHMENT. Include filename
        and description of the attachments in the caps. Fixes bug #537622.