clementine-player / Clementine

:tangerine: Clementine Music Player
https://www.clementine-player.org/
GNU General Public License v3.0
3.72k stars 671 forks source link

Library doesn't pick up opus files #3993

Open Clementine-Issue-Importer opened 10 years ago

Clementine-Issue-Importer commented 10 years ago

From michael....@gmail.com on November 26, 2013 15:31:46

What steps will reproduce the problem? 1. Add directory with Opus-encoded audio files to Library

  1. Update Library What is the expected output? What do you see instead? Songs should appear in the Library. Instead they do not. What version of the product are you using? On what operating system? Clementine version 1.2. Happens on both OSX and Linux. Please provide any additional information below.

Original issue: http://code.google.com/p/clementine-player/issues/detail?id=3993

artfulrobot commented 7 years ago

Weird thing I've found is that if the file has an .ogg extension it's not in the library. If it has a .opus extension, it is. Same file.

Ferroin commented 7 years ago

This is working as expected.

Quoting Wikipedia:

Before 2007, the .ogg filename extension was used for all files whose content used the Ogg container format. Since 2007, the Xiph.Org Foundation recommends that .ogg only be used for Ogg Vorbis audio files. The Xiph.Org Foundation decided to create a new set of file extensions and media types to describe different types of content such as .oga for audio only files, .ogv for video with or without sound (including Theora), and .ogx for multiplexed Ogg

Further reference: https://wiki.xiph.org/MIME_Types_and_File_Extensions

GStreamer honors the Xiph.org file extension conventions, hence it assumes that a file ending in .ogg is an Ogg encapsulated Vorbis audio stream. Because an Opus stream is not the same thing, it fails to recognize the file as an audio file. It accepts .opus as an extension as well since that's much clearer and became it's own de-facto convention.

If you look at most other software though, a majority of applications behave in the same manner (Firefox for example has the same behavior, it won't recognize an Opus stream in an Ogg container if the file extension is .ogg).

artfulrobot commented 7 years ago

Sounds fair enough! Thanks for careful explanation.