Ogg Video container files not supported in mime definitions

Bug #17165 reported by Matt Feifarek
18
Affects Status Importance Assigned to Milestone
shared-mime
Fix Released
Wishlist
shared-mime-info (Ubuntu)
Fix Released
Low
Sebastien Bacher

Bug Description

*.ogm is an Ogg Media Container (like AVI). It should be supported for default
media-player support, including thumbnailing in Nautilus.

Currently, it is an unknown filetype on Hoary (and probably all other Gnome distros)

https://bugs.freedesktop.org/show_bug.cgi?id=1002: https://bugs.freedesktop.org/show_bug.cgi?id=1002

Revision history for this message
In , Stéphane Loeuillet (leroutier) wrote :

well well well, the eternal debate between container and content

ogg can contain tags, audio stream (including vorbis), video stream (including
thora), subs
riff is a container too (avi/wav/mid), like matroska (mkv)
mpeg streams were pure before id3 shit came in and did a terrible mess
ogm is a bad hack from the windows world

Revision history for this message
In , Stéphane Loeuillet (leroutier) wrote :

see bug #397 about the same issue for asf (container) and wma/wmv (classic
extensions)

Revision history for this message
In , Christophe Fergeau (teuf-gnome) wrote :

Created an attachment (id=1508)
proof of concept patch

This patch adds various glob patterns to try to fix what is explained in this
bug. However, there's still a problem with mime sniffing, ogm files will be
sniffed as application/ogg files :-/

Revision history for this message
In , Fabian (fsturm) wrote :

Hi!

At least the way ogg files are handled right now in xdg is wrong!
The file from shared-mime-info-0.15 /usr/share/mime/packages/freedesktop.org.xml
contains:

  <mime-type type="application/ogg">
    <comment>Ogg Vorbis audio</comment>
   [...]

And this is wrong! ogg is not Ogg Vorbis audio only e.g. ogg media streams
containing video get the same.

Please correct at least this error until a better solution is found.

thanks, Fabian

Revision history for this message
Matt Feifarek (matt-dalchemy) wrote :

*.ogm is an Ogg Media Container (like AVI). It should be supported for default
media-player support, including thumbnailing in Nautilus.

Currently, it is an unknown filetype on Hoary (and probably all other Gnome distros)

Revision history for this message
In , Christophe Fergeau (teuf-gnome) wrote :

http://bugzilla.gnome.org/show_bug.cgi?id=302757 has comments related to this
issue, in particular magic patterns we could use (though I guess this is an ugly
hack, but it seems to work...)

Revision history for this message
In , j^ (j) wrote :

to my idea was to use the mime magic paterns to match all known codecs
and fallback to application/ogg if not known.
the problem with the attached version is that it matches "Ogg Multimedia"
in the list view until one selects the file. than it will do an exact match.
is this a bug in nautilus not using the priortiy?

---
  <mime-type type="application/ogg">
    <comment>Ogg Multimedia</comment>
    <magic priority="40">
      <match type="string" value="OggS" offset="0"/>
    </magic>
    <glob pattern="*.ogg"/>
  </mime-type>
  <mime-type type="audio/vorbis">
    <comment>Ogg Vorbis audio</comment>
    <magic priority="50">
      <match type="string" value="OggS" offset="0">
        <match type="string" value="\x01vorbis" offset="28"/>
      </match>
    </magic>
    <glob pattern="*.ogg"/>
  </mime-type>
  <mime-type type="audio/x-oggflac">
    <comment>Ogg FLAC audio</comment>
    <magic priority="50">
      <match type="string" value="OggS" offset="0">
        <match type="string" value="fLaC" offset="28"/>
      </match>
    </magic>
    <glob pattern="*.ogg"/>
  </mime-type>
  <mime-type type="audio/x-speex">
    <comment>Ogg Speex audio</comment>
    <magic priority="50">
      <match type="string" value="OggS" offset="0">
        <match type="string" value="Speex " offset="28"/>
      </match>
    </magic>
    <glob pattern="*.ogg"/>
  </mime-type>
  <mime-type type="video/x-theora">
    <comment>Ogg Theora video</comment>
    <magic priority="50">
      <match type="string" value="OggS" offset="0">
        <match type="string" value="\x80theora" offset="28"/>
      </match>
    </magic>
    <glob pattern="*.ogg"/>
  </mime-type>
  <mime-type type="video/x-ogm">
    <comment>OGM video</comment>
    <magic priority="50">
      <match type="string" value="OggS" offset="0">
        <match type="string" value="video" offset="29"/>
      </match>
    </magic>
    <glob pattern="*.ogm"/>
  </mime-type>

Revision history for this message
Sebastien Bacher (seb128) wrote :

Thanks for the bug, there is an upstream bugzilla entry about this:
https://bugs.freedesktop.org/show_bug.cgi?id=1002

Revision history for this message
Sebastien Bacher (seb128) wrote :

*** Bug 19362 has been marked as a duplicate of this bug. ***

Revision history for this message
In , Christian Neumair (chris-gnome-de) wrote :

Created an attachment (id=3969)
Committed patch

Patch that was committed to shared-mime-info, and fixes the issue together with
recent xdgmime updates.

Distributors: Don't blindly distribute it. Ensure that you also ship the recent
update-mime-database.c changes and Matthias Clasen's work on xdgmime if you
want to backport this one. It won't break, but doesn't improve the situation.

Revision history for this message
Daniel Holbach (dholbach) wrote :

The bug was fixed with 0.17.

Changed in shared-mime-info:
status: Unconfirmed → Fix Released
Revision history for this message
In , Sebastien Bacher (seb128) wrote :

should that bug be marked as fixed?

Revision history for this message
In , Christian Neumair (chris-gnome-de) wrote :

Yes, thanks.

Changed in shared-mime:
importance: Unknown → Wishlist
Changed in shared-mime:
importance: Wishlist → Unknown
Changed in shared-mime:
importance: Unknown → Wishlist
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.