Hi Going to supply some feedback as an FFmpeg dev, because this is not the first time the subject of containers have come up on this list
On 2017-05-22 23:14, Albert Cahalan wrote: >> Or Matroska (.mka): > ... >>> See https://www.xiph.org/ogg/doc/rfc3533.txt . Make it work with the >>> Ogg Encapsulation Format. > Either way, it still needs a file suffix. > > The idea that "ogg" would work for arbitrary audio/video data has been > a disaster. Apps claim the file extension, but can't decode all possible > ways of encoding the data. You may have 5 apps that handle a format, > covering all possible encodings in total, but no app handles everything. Works fine for mkv and mka. The only reason why you'd need a codec-specific file extension is if you have a bunch of different single-codec programs for dealing with them. This hasn't been the case since the early 2000's. Programs like VLC and mpv exist now. Differentiating on essence kind (audio vs video+audio) makes some sense however, since a good audio player may suffer from having to also be a good video player (and vice versa). Exception might be if you want to associate with say the FreeDV program > You can't even safely use the container format unless you can mark the > header at a fixed offset with a clear indicator that will ensure that file > magic never just claims "ogg", because that would imply Vorbis. You'll > get files saved as "ogg" and served up with a MIME type that doesn't > make it clear that codec2 is in use. Files won't play right. Yes, the essence codec used is typically marked in some kind of header or footer. codec2 mode would likely be coded in extradata (WAVEFORMATEX in RIFF containers, 'wave' in MOV etc.) with one or two bytes taking the value of CODEC2_MODE_* in codec2.h MIME is also poorly implemented in many Web servers (apache2 for example), this is hardly new. Format probing (file, ffprobe, mediainfo) should always be used since the truth is in the data. Similarly Web browsers should rely on MIME or possibly format probing if the server is crap > Headerless: filename.codec2 (Mac type DEC2) How do you differentiate modes without a header? This should not be encouraged > MIME type: prefix the file extension with "audio/", w/o "x-" Can MIME specify modes I wonder.. RFC 4281 seems to suggest syntax like: "audio/ogg; codecs=codec2.700C" or perhaps "audio/ogg; codecs=codec2.8" for an Ogg containing codec2 in mode 700C. "audio/wav; codecs=49362.8" ditto for .wav (assuming codec2 gets assigned ID=0xC0D2, see RFC 2361) "audio/codec2; mode=8" raw codec2 mode 700C data, assuming we can use a key like "mode" > That said, Matroska and Ogg are only suitable if file magic is > trivial. There must > not be any chance of misdirecting the data to a Vorbis-only player or similar. Vorbis-only player? What is this, 1997? :) That's all I have time to write on this right now. This does not address issues with picking a container, which I've touched on before on this list. TL;DR it must handle seeking in a decent fashion, for which Ogg sucks. MOV and WAV are OK. MKV seems fine too. I'd go with WAV since it's tiny, stupid and simple /Tomas SA2TMS ------------------------------------------------------------------------------ Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot _______________________________________________ Freetel-codec2 mailing list Freetel-codec2@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/freetel-codec2