ffmpegthumbnailer icon indicating copy to clipboard operation
ffmpegthumbnailer copied to clipboard

Curated list of MIME types

Open MoonSweep opened this issue 2 years ago • 2 comments

Hi,

I use ffmpegthumbnailer with pcmanfm on Debian unstable. Long story short, after a big update some days ago, they didn't generate thumbnails for AVI files anymore, and after a long hunt, I found that the "culprit" was shared-mime-info which changed this type from video/x-msvideo to video/vnd.avi, which wasn't listed in ffmpegthumbnailer's desktop file.

Although adding video/vnd.avi in the file was sufficient to fix the problem (which I noticed you already did in the master branch), I built a curated list of video MIME types, compliant with shared-mime-info 2.4.

Here are the steps I used to build it:

  • greping all video/ MIME types from /usr/share/mime/packages/freedesktop.org.xml, sorting them in alphabetical order
  • adding other video types (application/, but not x-content/), also sorting them in alphabetical order

Compared to the current list, some types were removed, either because they're only aliases, or because they're not listed by shared-mime-info at all (so a file manager won't even ask a thumbnailer to generate thumbnails for them, just like I experienced with AVI files):

  • video/jpeg (the type is actually video/x-mjpeg)
  • video/x-flc (the type is actually video/x-flic)
  • video/x-ms-asx (it's actually audio/x-ms-asx, a playlist format)
  • video/x-ms-wax, video/x-ms-wmx and video/x-ms-wvx (aliases of audio/x-ms-asx)

If ffmpegthumbnailer is actually intelligent enough to read those playlists, choose a video file, and generate a thumbnail for it, then I guess audio/x-ms-asx could be added.

So this new list contains no aliases, nor unrecognized types. It should be easier to maintain.

MimeType=video/3gpp;video/3gpp2;video/annodex;video/dv;video/isivideo;video/mj2;video/mp2t;video/mp4;video/mpeg;video/ogg;video/quicktime;video/vnd.avi;video/vnd.mpegurl;video/vnd.radgamettools.bink;video/vnd.radgamettools.smacker;video/vnd.rn-realvideo;video/vnd.vivo;video/vnd.youtube.yt;video/wavelet;video/webm;video/x-anim;video/x-flic;video/x-flv;video/x-javafx;video/x-matroska;video/x-matroska-3d;video/x-mjpeg;video/x-mng;video/x-ms-wmv;video/x-nsv;video/x-ogm+ogg;video/x-sgi-movie;video/x-theora+ogg;application/mxf;application/vnd.ms-asf;application/vnd.rn-realmedia;application/x-matroska;

For information, here is an analysis on the current list (in alphabetical order):

application/mxf                 mime-type
application/vnd.rn-realmedia    mime-type
application/x-matroska          mime-type
video/3gp                       alias of video/3gpp
video/3gpp                      mime-type
video/divx                      alias of video/vnd.avi
video/dv                        mime-type
video/fli                       alias of video/x-flic
video/flv                       alias of video/x-flv
video/jpeg                      non-existent
video/mp2t                      mime-type
video/mp4                       mime-type
video/mp4v-es                   alias of video/mp4
video/mpeg                      mime-type
video/msvideo                   alias of video/vnd.avi
video/ogg                       mime-type
video/quicktime                 mime-type
video/vivo                      alias of video/vnd.vivo
video/vnd.avi                   mime-type
video/vnd.divx                  alias of video/vnd.avi
video/vnd.mpegurl               mime-type
video/vnd.rn-realvideo          mime-type
video/vnd.vivo                  mime-type
video/webm                      mime-type
video/x-anim                    mime-type
video/x-avi                     alias of video/vnd.avi
video/x-flc                     non-existent
video/x-fli                     alias of video/x-flic
video/x-flic                    mime-type
video/x-flv                     mime-type
video/x-m4v                     alias of video/mp4
video/x-matroska                mime-type
video/x-mpeg                    alias of video/mpeg
video/x-mpeg2                   alias of video/mpeg
video/x-ms-asf                  alias of application/vnd.ms-asf
video/x-ms-asx                  non-existent
video/x-msvideo                 alias of video/vnd.avi
video/x-ms-wm                   alias of audio/x-ms-asx
video/x-ms-wmv                  mime-type
video/x-ms-wmx                  alias of audio/x-ms-asx
video/x-ms-wvx                  alias of audio/x-ms-asx
video/x-nsv                     mime-type
video/x-ogm+ogg                 mime-type
video/x-theora+ogg              mime-type

Regards,

-- Raphaël

MoonSweep avatar Dec 17 '23 01:12 MoonSweep

Ping ?

MoonSweep avatar Feb 15 '24 13:02 MoonSweep

Also application/ogg could be added (video/ogg is a sub-class of it).

MoonSweep avatar Feb 15 '24 13:02 MoonSweep

Thanks, I updated the desktop file

dirkvdb avatar Sep 13 '24 18:09 dirkvdb