HydrogenAudio

Digital Audio/Video => Movie/Multichannel audio => Topic started by: polemon on 2012-02-02 02:00:52

Title: How to decode files with large number of channels and/or high sample r
Post by: polemon on 2012-02-02 02:00:52
Suppose I have a FLAC wich uses eight channels with 384kHz sample rate.

Now, in order to work with that file, I'd like to decode it first into a PCM format. But eight channels and 384kHz sample rate can't be handled by a .WAV file, what else should I use? Also, .WAV files can't get larger than 4GB, which is quite problematic at high sample rates and high number of channels.

The other way round is interesting as well: Suppose I have eight channels, each on in his separate .WAV file, how do I combine them together to one multichannel FLAC, or lossless formats like Ogg/Vorbis?

What I need is some sort of PCM file, that stores the channels as simple values. I don't need much metadata, that can be stored in external files without problems.

Please don't ask "why do you need so many channels", or "that high sample rate doesn't make sense!". This is a hypothetical question that is supposed to help me develop software, if you must know.
Title: How to decode files with large number of channels and/or high sample r
Post by: lvqcl on 2012-02-02 03:24:59
Quote
But eight channels and 384kHz sample rate can't be handled by a .WAV file

WAV can handle them btw.
Title: How to decode files with large number of channels and/or high sample r
Post by: DVDdoug on 2012-02-02 18:12:24
Quote
Now, in order to work with that file, I'd like to decode it first into a PCM format.
Most audio editors "work with" large files by using a proprietary PCM format for internal/temporary storage.  So you can open a large file, edit it, and save it in a format that can handle the file size.

Quote
The other way round is interesting as well: Suppose I have eight channels, each on in his separate .WAV file, how do I combine them together to one multichannel FLAC, or lossless formats like Ogg/Vorbis?
An audio editor or DAW should be able to handle that too.  The audio editor is probably going to have the PCM data in seperate arrays for each channel (but that's up to the programmer).  If you feed that data from the arrays into the CODEC correctly, the CODEC will arrange the channel data correctly. 

You'd have to dig into the code if you want to know how to directly interface with the CODECS, or how the various file formats store multichannel data.    Audacity is an open source audio editor, and there are open source CODECS too.  And there's information on MSDN (http://msdn.microsoft.com/en-us/)... if you can find it...

I've used WAVtoAC3encoder (http://code.google.com/p/wavtoac3encoder/) to encode some DVD soundtracks, and it allows me to feed-in a multichannel WAV, or separate WAVs for each channel.  I think SurCode and the other professional encoders have the same option.    Since I'm working with movie-length files, I have to use 6 separate WAVs (for 5.1 digital surround).    It can actually handle non-compliant WAV files of any size, but I don't have a tool to create such WAV files.


Quote
What I need is some sort of PCM file, that stores the channels as simple values.
Take a look at the RF64 (http://en.wikipedia.org/wiki/RF64) format.  The only issue is that you need software that's compatible with it...  For example, my video editor can't open RF64 files.  There may be a couple of other similar formats too... Maybe W64?