Skip to main content

Notice

Please note that most of the software linked on this forum is likely to be safe to use. If you are unsure, feel free to ask in the relevant topics, or send a private message to an administrator or moderator. To help curb the problems of false positives, or in the event that you do find actual malware, you can contribute through the article linked here.
Topic: Multichannel FLAC files not playing back (Read 9397 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Multichannel FLAC files not playing back

Hi all,
I recently encoded a few 5.1ch 48kHz 24bit WAV files to FLAC, but for some reason everytime I try and play them back in winamp they don't play and I get an error followed by winamp crashing. I've decoded the files fine with the commandline tool, and when I downmix the WAV to stereo and encode it plays back fine. Is this happening because I only have 2 speakers on my soundcard? (well technically I have 4 outputs, just I don't use the other 2). I want to keep the 5.1 versions as flac simply because I'm planning to get a 5.1 system within the next few months.
Any ideas whats going on?
Thanks!

Multichannel FLAC files not playing back

Reply #1
Hi,

Sorry to dig up such an old topic, but I'm having a very similar problem. I cannot play my 48KHz, 24-bit, 6-channel FLAC files in Winamp - the program crashes with an error in in_flac.dll almost immediately after it attempts to play the track. I have tested this with both the normal FLAC plug-in and the enhanced Media Library plug-in, and both have the same issues.

I can play 48KHz, 24-bit stereo FLAC files fine in Winamp, and the 48KHz, 24-bit, 6-channel PCM WAV files play fine in Winamp too, it seems to be this FLAC configuration that doesn't work. (I haven't tried 16-bit 6-channel FLAC either, however). Does anyone have any ideas how this might be solved? I tried debugging the plug-in a bit, but don't really have time right now to perform look at it in-depth.

Thanks in advance,

Multichannel FLAC files not playing back

Reply #2
>2 channel playback is not supported in the winamp plugin.  I'm not sure how to feed it samples so if you have source code for wave that would help.

also, channel assignment for 5.1 has not been standardized in FLAC yet.

Josh

Multichannel FLAC files not playing back

Reply #3
Ah, right, must have missed that... cheers.

Multichannel FLAC files not playing back

Reply #4
>also, channel assignment for 5.1 has not been standardized in FLAC yet.

Whats holding choosing a standard back? there are 2 standards, Miscrosoft wave and dvd ac3 (as used by ogg vorbis), why not choose one and be done with it?

Multichannel FLAC files not playing back

Reply #5
in FLAC, channel assignment is kind of mixed up with interchannel decorrelation method.  I was thinking about an elegant way to fix this for 5.1 as well as find an appropriate and patent-free decorrelation method for 5.1.  since I don't have either, what I will probably do as a stopgap for the next release is just specify at least one channel ordering of independent channels for 5.1-7.1 as they are currently used in home theater.  I think vorbis has this but there was some confusion about order(?)  I'm open to suggestions.

Josh

Multichannel FLAC files not playing back

Reply #6
Quote
in FLAC, channel assignment is kind of mixed up with interchannel decorrelation method.  I was thinking about an elegant way to fix this for 5.1 as well as find an appropriate and patent-free decorrelation method for 5.1.  since I don't have either, what I will probably do as a stopgap for the next release is just specify at least one channel ordering of independent channels for 5.1-7.1 as they are currently used in home theater.  I think vorbis has this but there was some confusion about order(?)  I'm open to suggestions.

Josh
[a href="index.php?act=findpost&pid=356178"][{POST_SNAPBACK}][/a]

Vorbis I Specification contains the following:
Quote
4.3.9. output channel order

Vorbis I specifies only a channel mapping type 0. In mapping type 0, channel mapping is implicitly defined as follows for standard audio applications:

one channel
    the stream is monophonic
two channels
    the stream is stereo. channel order: left, right
three channels
    the stream is a 1d-surround encoding. channel order: left, center, right
four channels
    the stream is quadraphonic surround. channel order: front left, front right, rear left, rear right
five channels
    the stream is five-channel surround. channel order: front left, front center, front right, rear left, rear right
six channels
    the stream is 5.1 surround. channel order: front left, front center, front right, rear left, rear right, LFE
greater than six channels
    channel use and order is defined by the application

Applications using Vorbis for dedicated purposes may define channel mapping as seen fit. Future channel mappings (such as three and four channel Ambisonics) will make use of channel mappings other than mapping 0.
I have based multi channel ordering on this within oggdropXPd and oggenc2.8.

For encoding, where the WAVEFORMATEXTENSIBLE channel mask matches the channels specifed above, the channels are reordered to the vorbis map, otherwise, they are encoded in the order presented. For decoding, mutli channel vorbis streams are assumed to conform to the above ordering and remapped to WAVEFORMATEXTENSIBLE order, and anything else is decoded in the order presented. If the encoded order is incorrect, then the decoded order will also be incorrect as there is no facility to include a 'channel mask' in the encoded data.

Multichannel FLAC files not playing back

Reply #7
Greetings, everyone.  I have been reading the forums here for a while, but this is my first post.  Anyway, I have experienced the same problem with multichannel flac files in Winamp.  I suppose I will keep the files for backup purposes (of course), but in case I do want to listen to them, if they don't play in Winamp, what program will successfully play them?  Thanks.

p.s. Josh, if you read this, how far are we from the next flac release?

Multichannel FLAC files not playing back

Reply #8
ok, I hope john and spoon are still tracking this topic...

multichannel assignment is the last major thing to do for the next FLAC release.  to fully support the 18 speakers in the WAVEFORMATEXTENSIBLE channel mask would take a format change because FLAC currently only supports 8 channels, so I hope to come up with a stopgap assignment that fits within the current format and will handle the vast majority of assignments in use.

the FLAC frame header specifies only the number of channels and assignment for stereo, there is no channel mask.  so it looks like I just need to pick a mapping for 3, 4, 5, 6, 7, and 8.  I don't mind using the first 8 channels of WAVEFORMATEXTENSIBLE except that to cover 6.1 and 7.1 surround needs 9 'consecutive' channels, 2 or 1 of them being blank, since in the WAVE order, the back center speaker is at bit 8.  (SDDS 7.1 is a different beast; I don't think that's widely used right?)

Code: [Select]
SPEAKER_FRONT_LEFT                0x1
SPEAKER_FRONT_RIGHT               0x2
SPEAKER_FRONT_CENTER              0x4
SPEAKER_LOW_FREQUENCY             0x8
SPEAKER_BACK_LEFT                0x10
SPEAKER_BACK_RIGHT               0x20
SPEAKER_FRONT_LEFT_OF_CENTER     0x40
SPEAKER_FRONT_RIGHT_OF_CENTER    0x80
SPEAKER_BACK_CENTER             0x100
SPEAKER_SIDE_LEFT               0x200
SPEAKER_SIDE_RIGHT              0x400
SPEAKER_TOP_CENTER              0x800
SPEAKER_TOP_FRONT_LEFT         0x1000
SPEAKER_TOP_FRONT_CENTER       0x2000
SPEAKER_TOP_FRONT_RIGHT        0x4000
SPEAKER_TOP_BACK_LEFT          0x8000
SPEAKER_TOP_BACK_CENTER       0x10000
SPEAKER_TOP_BACK_RIGHT        0x20000


I wouldn't mind going with the vorbis channel 0 map except it's unspecified for 7-8 channels.  so what would you suggest?

Multichannel FLAC files not playing back

Reply #9
...
the FLAC frame header specifies only the number of channels and assignment for stereo, there is no channel mask.  so it looks like I just need to pick a mapping for 3, 4, 5, 6, 7, and 8.  I don't mind using the first 8 channels of WAVEFORMATEXTENSIBLE except that to cover 6.1 and 7.1 surround needs 9 'consecutive' channels, 2 or 1 of them being blank, since in the WAVE order, the back center speaker is at bit 8.  (SDDS 7.1 is a different beast; I don't think that's widely used right?)
...
I wouldn't mind going with the vorbis channel 0 map except it's unspecified for 7-8 channels.  so what would you suggest?

For what it's worth, my suggestion for 7.1 is to follow Microsoft's path, being that WAVEFORMATEXTENSIBLE is a Microsoft format.  They recommend channel mask 1599 (0x63F) for 7.1 content in Windows Media.

Multichannel FLAC files not playing back

Reply #10
Is there really enough content in 7.1 or 6.1 (never heard of that one) to even worry about at this time? How many computers or devices are out there that can even matrix out that many channels, from a *flac* source, and have 6.1 or 7.1 speaker systems to play the channels?

Multichannel FLAC files not playing back

Reply #11
Audigy 4, Revolution 7.1 and even some onboard chips support 7.1, there are also affordable/popular and good enough 7.1 home theater systems from Creative.

Multichannel FLAC files not playing back

Reply #12
I don't know why microsoft went with SDDS for 7.1  it's practically irrelevant for home theater and even less so for the PC.  their own docs even say "The 7.1 SDDS configuration, which is the default used in Microsoft Windows® XP, makes use of five front speakers. Although this configuration is used commonly in large commercial theaters, it may not provide the best experience in a home system."  so I'm fine for leaving that to a future format change because I actually don't think it will ever be used.

I would like to concentrate on what the most likely usage is, home theater.  as far as I know, the standard 6.1 setup is dolby digital ex/dts-es which adds surround-back which can be discrete in dts-es.  and 7.1 (not counting sdds) is just doubled back surround channels, so the source is still 6.1 or 5.1.  so I wouldn't mind punting on 7.1 until the most common use emerges.

the ordering choices for 5.1 seem to be:

Code: [Select]
SMPTE/ITU     L  R  C  LFE Ls  Rs
DTS           L  R  Ls Rs  C   LFE
Dolby/Vorbis  L  C  R  Ls  Rs  LFE


I'm still unclear on the most common channel assignments for 3, 4, and 5 channels.

Josh

Multichannel FLAC files not playing back

Reply #13
Is it possible to use (store) channel count and channel mask, just like microsoft proposes  ?

The use of channel mask is more flexible, because, for example, 4-ch audio may be L-R-C-LFE and may be L-R-LS-RS, and a fixed mapping cannot cover these two cases.

It would be also cool to have an option to specify multiple mono input files, channel count and a mask, according to the table  :
Quote
1.   Front Left - FL
2.   Front Right - FR
3.   Front Center - FC
4.   Low Frequency - LF
5.   Back Left - BL
6.   Back Right - BR
7.   Front Left of Center - FLC
8.   Front Right of Center - FRC
9.   Back Center - BC
10.   Side Left - SL
11.   Side Right - SR
12.   Top Center - TC
13.   Top Front Left - TFL
14.   Top Front Center - TFC
15.   Top Front Right - TFR
16.   Top Back Left - TBL
17.   Top Back Center - TBC
18.   Top Back Right - TBR
[/size]
E.g.: -cc N ch1.wav ch2.wav ... chN.wav -cm M.

Multichannel FLAC files not playing back

Reply #14
Is it possible to use (store) channel count and channel mask, just like microsoft proposes

not without a format change, which is why I don't want to do it right now.  microsoft's mask also seems slightly arbitrary, e.g. differentiating between side-left/right and back-left/right when most surround setups designate them as surround-left/right and have general placement requirements that don't necessarily fit into 'side' or 'back'.  and I don't see anything stopping, say sony, coming up with SDDDDDDS with left-left-right-left-front-left-of-center that doesn't fit the mask.  who knows if DD+ 13.1 even does.

at this point I just want to hit what people are actually using/will use the most.

Josh

Multichannel FLAC files not playing back

Reply #15
An Audigy 2 supports 7.1, but that's not really the point I was making.  I've had 5.1 speakers on my HTPC for quite a while now, and still I'd say only 5% of the media that I watch/listen has even a 5.1 audio track.  The only 7.1 conent that I have ever played is one high-def WMV file (and it sounded just fine on 5.1 speakers).

Audigy 4, Revolution 7.1 and even some onboard chips support 7.1, there are also affordable/popular and good enough 7.1 home theater systems from Creative.




Josh, are you targeting playback or just some overall standard?  Can the encoder handle a 2-channel wav file + N mono wav files? Because with my multitrack recording, I can forsee having a stereo mix using 2 channels and a 5.1 mix using the remaining 6 channels.  This would be more for archival/transportation usage than playback.

Multichannel FLAC files not playing back

Reply #16
An Audigy 2 supports 7.1, but that's not really the point I was making.  I've had 5.1 speakers on my HTPC for quite a while now, and still I'd say only 5% of the media that I watch/listen has even a 5.1 audio track.  The only 7.1 conent that I have ever played is one high-def WMV file (and it sounded just fine on 5.1 speakers).

I think it is important to standardize/implement features before some progressive content provider will choose WMA Lossless over FLAC due to lack of ahead-looking. In other words, only supporting what is widespread at the moment is probably not enough. Microsoft also has a point  :
Quote
The PC has become a good multimedia platform for today's applications. CD-quality audio (stereo, 16-bit, 44.1 kHz) is typically the highest audio quality achieved on the PC platform. As the industry moves forward, new content is being authored for standards that eclipse those currently defined. This includes higher sampling rates, greater bit depths, and multiple channel (greater than stereo) audio streams and playback systems. In order to keep pace with new data formats and delivery mechanisms, a standard must be produced to ensure consistency between applications and hardware.