You can read upstream how magic was determined. Basically I took the
proposal of Stanislav and adapted it after reading about mpeg headers on
rfc3555 and Wikipedia (details on
https://bugs.freedesktop.org/show_bug.cgi?id=14276#c7)

The attached sample file is a video/mp2t, recorded by a common settop
box. Stanislavs files seem to have slightly different header bits. This
file is ok for testing. But for the magic I still prefer to obey as
close as possible the standards for mpeg transport streams.

BUT...!! As a final test I applied the patch and then checked the
mimetype of almost every file in my installed Karmic. This includes the
sources and testfiles of shared-mime-info. (warning: this took hours!):

  $ sudo find /bin /boot /etc /home /lib /opt /root /sbin /tmp /usr /var \
     -xdev -type f -exec mimetype \{\} \; | grep video/mp2t

Unfortunately I found that files beginning with 'GIMP' also match the
magic and gimp resource files are not yet in the mime-database (so
tweaking priorities is not a solution). Therefore I will try to tighten
the magic to exclude those files. Please stay tuned...


** Attachment added: "sample for mimetype video/mp2t, recorded by a settop box"
   http://launchpadlibrarian.net/41888302/test-mp2t.ts

-- 
.ts files always get recognized as application/x-linguist and never as 
video/mpeg (transport stream)
https://bugs.launchpad.net/bugs/502642
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.

-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to