Filter the media input
We have no idea what kind of media formats people will put into irfi.
But we want to only present an audio/video player for things they can play in their browsers.
One solution is to transcode everything to known-compatible formats:
-
<audio>
: MP3 -
<video>
: H.264 and MP3 in a.mp4
file
The problem is that we would need to do the actual transcoding in an asynchronous task queue (e.g Celery with Redis). This will take more time to implement, configure and deploy than we have.
As a result we (@mgautierfr, @fheslouin and I) have decided to filter what we accept as inputs instead:
- for audio files we would accept:
- MP3 which is both ubiquitous and compatible with almost everything;
- AAC (in a
.mp4
container) which is compatible with almost everything; - WAV as it seems to be what many Android phones produce by default, however that isn't compatible with Internet Explorer;
- for video files we would accept:
- H.264 and MP3 in a
.mp4
file - H.264 and AAC in a
.mp4
file
- H.264 and MP3 in a
Maybe hachoir can help? http://hachoir3.readthedocs.io/developer.html#hachoir-metadata-example