Currently, all ogg files are registered in the database as application/ogg
And inside the mime analyzer there is this horrible check to infer the media type for ogg files
// Special code for ogg - detect if it's video (theora), // else label it as sound. if ( $mime == 'application/ogg' && file_exists( $path ) ) { // Read a chunk of the file $f = fopen( $path, "rt" ); if ( !$f ) { return MEDIATYPE_UNKNOWN; } $head = fread( $f, 256 ); fclose( $f ); $head = str_replace( 'ffmpeg2theora', '', strtolower( $head ) ); // This is an UGLY HACK, file should be parsed correctly if ( strpos( $head, 'theora' ) !== false ) { return MEDIATYPE_VIDEO; } elseif ( strpos( $head, 'vorbis' ) !== false ) { return MEDIATYPE_AUDIO; } elseif ( strpos( $head, 'flac' ) !== false ) { return MEDIATYPE_AUDIO; } elseif ( strpos( $head, 'speex' ) !== false ) { return MEDIATYPE_AUDIO; } elseif ( strpos( $head, 'opus' ) !== false ) { return MEDIATYPE_AUDIO; } else { return MEDIATYPE_MULTIMEDIA; } }
That really needs a better long term and more maintainable implementation.