Any other order can optionally be accepted with a new parameter like Aften do:
CODE
[-chmap #] Channel mapping order of input audio
0 = WAVE mapping FL,FR,FC,LFE,SL,SR (default)
1 = AC-3, OGG mapping FL,FC,FR,SL,SR,LFE
2 = MPEG, DTS mapping FC,FL,FR,SL,SR,LFE
0 = WAVE mapping FL,FR,FC,LFE,SL,SR (default)
1 = AC-3, OGG mapping FL,FC,FR,SL,SR,LFE
2 = MPEG, DTS mapping FC,FL,FR,SL,SR,LFE
2) A new parameter must be included to ignore the wav header fields RiffLength and DataLength. This behavior is assumed by recent encoders like:
CODE
NeroAacEnc -ignorelength ...
Aften -readtoeof 1 ...
Aften -readtoeof 1 ...
Reasons:
- The know thread in this forum: http://www.hydrogenaudio.org/forums/index....showtopic=16033
- The most knew free transcoders uses the standard order:
Foobar2000 actually actually produce wrong mapped multichannel ogg files.
AviSynth based (BeHappy, Wavi, ...) need special remapper functions for ogg output.
eac3to, the transcoder for new formats like E-AC3, TrueHD, DTS-HD, also need a extra remap.
- Actually the transcoders send the uncompressed audio data by STDOUT to encoder STDIN with the minimal standard header well know for everybody.
The AudioFormat (int/float), NumChannels, SampleRate and BitDepth is enough (littleendian assumed) to encoder, the WAVE_FORMAT_EXTENSIBLE header can't be required because is less accepted.
- The RAW format is less flexible than standard wav header because we need construct the command line before open the input file.
See this sample:
CODE
eac3to track.thd stdout.wav | oggenc2 -q 5 - -o track.ogg
We don't know is track.thd is 2 or 6 channels, 16 or 24 bits. If we use standard header is really easy.
- For the same reason (STDOUT -> STDIN) the decoder don't know the Datalength until the end of file is reached, but the header must contain this info and is another problem.
If the input file is CBR the datalength (num of samples) can be estimated but is impossible with VBR input without read until eof.
When the output is a file the decoder reopen the file to write the correct header but using STDOUT the RiffLength and DataLength can be corrected.
If exist a method to say the ogg encoder "Ignore these header fields and work like with raw data" the problem is solved.
- With the -ignorelength parameter also the irregular wav files > 4GB can be managed (also a problem for STDOUT).
Is easy than a multichannel wav file reaches this size (83 minutes for a 24 bit, 6 ch, 48 KHz) and can be produced by many soft (Foobar2000, Faad, AviSynth-methods ...).
