#3: Support for other audio file formats besides MP3
- Proposed by
- Nate Aune
- Proposal type
- Architecture
- State
- being-discussed
Motivation
While MP3 is probably the most popular audio file format, there are other file formats which are more suitable for some situations. ATAudio should be format agnostic and be able to support any audio file format.
Assumptions
This proposal is only proposing to parse various audio file formats and does not cover the "re-encoding of an uploaded file into other formats":http://www.pymedia.org/tut/recode_audio.html. Although this is something that could be explored in another improvement proposal.
Proposal
In the current version (0.4), ATAudio is not able to handle files other than MP3 because its tied to an ID3Storage layer which presumes that the uploaded file is an MP3.
We need to make a generic file class which can identify the type of file (by file extension or MIME type) and use the appropriate parsing method to extract the metadata.
Implementation
The allowed_content_types should be set to the various audio MIME types (audio/mpeg, etc.) and after the file is uploaded we need to detect which file type it is and use the appropriate parser to extract the metadata.
We can probably utilize the "pymedia":http://www.pymedia.org module to do this parsing.
Deliverables
Methods to parse the various audio file formats. Need to test the playback feature to make sure that the audio files can still be played no matter what format they are in.
Risks
Most of the players are assuming that the files are in one format, and one format only. We need to test to make sure that if someone has uploaded a folder of various audio file formats, that when you go to play it back, the player doesn't get confused when it encounters different audio file formats.
Participants
Nate Aune, Salim Fadhley, Volodymyr Cherepanyak