FLAC Multichannel Decoding Error

Hi,

Firmware: 2.02.32

Live has really stupid error in decoding of Multichannel 5.1 FLAC:

Instead of using the tracks as FL FR C LFE LS RS, which it does for multichannel WAV, it’s using them as FL FR C LS RS LFE, which is more in line with DTS and AC3. As the result I have no RS during playback and rest of effects channels swapping each other.
That is really annoying, especially we count that commercial tracks are produced in proper way.

Do you have any idea, what shall I do?
My local WD Support is really useless, they propose is to replace this kind of model with the same model (sic!) only.
May I ask you, is this error permanent or not?
If this error will be permanent for Live, does this error exist in other models of WD or not (WD support has no idea!)? In my country is avaialble WD TV 4. Gen. now only.

Thank you for help

Sorry, I can’t help but just can say “me too”.  When playing my multichannel flac music files I noticed that vocals were concentrated in my left surround speaker.  I knew it was wrong but didn’t know exactly what was happening.  It would be good if they could fix this.

1 Like

I try to not write “fine I am not alone” :wink:

Thank you for your answer. You listen on the left because of moving and swapping channels, if I good understood, what happens, SR is SL, LFE is SR, SL is LFE. That is danger for rear speakers, which aren’t as usual full freq speakers, for sure they are not for LFE signal, so my advice is not listen multichannel FLAC on WD.
Sometimes I think also, mistake is bigger and in SL is Center, but I have no idea, how to check that.

BTW. that is really stupid, WD:

— first, you did not know still until now about that error*,

— second, you have no power to resolve the problem by your own proposition (I have mine only 2 months, you said me, you will replace me my item for 4. Gen, but after RMA done, you said, that you changed minds, so why I think, I am done with WD’s lies and corporation for sure. Thank you WD!),

— third, you do not know what is definition of the channeling into FLAC and you try to produce the hardware for music play, really?

* Why? Today after posting here I rollback the item, in old firmaware exists the same error.

iplas wrote:

Hi,

 

Firmware: 2.02.32

 

Live has really stupid error in decoding of Multichannel 5.1 FLAC:

Instead of using the tracks as FL FR C LFE LS RS, which it does for multichannel WAV, it’s using them as FL FR C LS RS LFE, which is more in line with DTS and AC3. As the result I have no RS during playback and rest of effects channels swapping each other.
That is really annoying, especially we count that commercial tracks are produced in proper way.

 

Do you have any idea, what shall I do?
My local WD Support is really useless, they propose is to replace this kind of model with the same model (sic!) only.
May I ask you, is this error permanent or not?
If this error will be permanent for Live, does this error exist in other models of WD or not (WD support has no idea!)? In my country is avaialble WD TV 4. Gen. now only.

 

Thank you for help

 

Hi guys, we have passed this along to support. 

1 Like

"Hi guys, we have passed this along to support. "

…and then?

iplas wrote:

"Hi guys, we have passed this along to support. "

 

…and then?

…and then support contacts you to see what they can do to help you.  Please keep an eye on your private messages.

iplas:

Could you share any feedback you had from WD with us. I have been frustrated by this same problem for months and concluded that the problem had to lie either in the WD TV live or in my Pioneer AV receiver, but unable to identify which device was the root of the problem. I have reviewed most of the community posts but there is no post that says with authority that multi-channel flac files are supported at all.

My question to the community is, does the WD TV LlIVE support multi-channel flac files and the error that iplas has identified is a firmware error, or does the WD TV Live not support multi-channel flac files period?

What program did you encode the FLAC files with?

I notice when I create 5.1/7.1 FLAC files with EAC3To and then look at the thing with MediaInfo the Channel positions  parameters (Layout) are blank, yet if I encode them with MakeMKV instead the field is completely filled in.  It must mean something.

Look at your files with MediaInfo and see if the layout is actually there.

Shortly after I posted, a forum moderator arranged for a WD customer service rep to contact me. In the interest of anyone else experiencing the same problem and searching the posts for a solution, I plan to post whatever feedback I get.

The following is the detail I provided to WD:

  "The media player I own is:

WD TV Live Streaming Media Player (Gen 3 2011 NTSC)

P/N:        WDBHG70000NBK-01

S/N:        [Deleted]

Firmware:    2.02.32

The Audio/Video setup I use is:

Video Output:    HDMI (Auto)

Aspect Ratio:    Widescreen

Audio Output:    Digital Pass-Through via HDMI Only

    Auto Detect

        Dolby Digital            Channel: 6 Sample: 32 44 48 88 96

        Dolby Digital Plus    Channel: 8 Sample: 32 44 48 88 96

        DTS                           Channel: 7 Sample: 32 44 48 88 96

        Dolby TrueHD          Channel: 8 Sample: 32 44 48 88 96

        PCM                         Channel: 8 Sample: 32 44 48 88 96

HDMI CEC:    On

DD Dynamic Range Control:    Off

    The media player is connected to a Pioneer VSX-1123-K AV Receiver, which supports the above audio media streams.

    The media file I am using to test the media player surround sound support is a 24 bit 48 kHz WAV (PCM) file obtained from http://www.jensign.com/bdp95/7dot1voiced/. The characteristics of the file as displayed by MediaInfo are:

Format                                   : Wave

File size                                : 7.46 MiB

Duration                                 : 9s 49ms

Overall bit rate mode                    : Constant

Overall bit rate                         : 6 913 Kbps

Audio

Format                                   : PCM

Format settings, Endianness              : Little

Format settings, Sign                    : Signed

Codec ID                                 : 00001000-0000-0100-8000-00AA00389B71

Duration                                 : 9s 49ms

Bit rate mode                            : Constant

Bit rate                                 : 6 912 Kbps

Channel(s)                               : 6 channels

Channel positions                        : Front: L C R, Back: L R, LFE

Sampling rate                            : 48.0 KHz

Bit depth                                : 24 bits

Stream size                              : 7.46 MiB (100%)

    When this file is processed by the media player, the AV receiver recognizes an incoming PCM stream and the correct channel/speaker output sequence is heard:

Channel    1      2       3     4        5      6

WAV         FL    FR    C    LFE    BL    BR

    When I convert this file to FLAC using libFLAC 1.3.0, the characteristics of the FLAC file as displayed by MediaInfo are:

Format                                   : FLAC

Format/Info                              : Free Lossless Audio Codec

File size                                : 332 KiB

Duration                                 : 9s 49ms

Overall bit rate mode                    : Variable

Overall bit rate                         : 300 Kbps

Audio

Format                                   : FLAC

Format/Info                              : Free Lossless Audio Codec

Duration                                 : 9s 49ms

Bit rate mode                            : Variable

Bit rate                                 : 293 Kbps

Channel(s)                               : 6 channels

Channel positions                        : Front: L C R, Back: L R, LFE

Sampling rate                            : 48.0 KHz

Bit depth                                : 24 bits

Stream size                              : 323 KiB (98%)

Writing library                          : libFLAC 1.3.0 (UTC 2013-05-26)

    Further, viewing this file in Audacity confirms that the correct channel/speaker relationship has been maintained.

    When this file is processed by the media player, the AV receiver again recognizes the PCM stream, but this time the channel/speaker output sequence is in error:

Channel    1        2      3      4        5      6

FLAC         FL    FR    BL   BR     C      LFE

    (Another indicator that the WAV to FLAC conversion was accurate, if the FLAC file is converted back to a WAV file and since this is a lossless process, the resultant WAV file is processed correctly by the media player.)

    It isn’t clear from the WD Community posts that I was able to find, if this is an error with the WD TV Live firmware, or if the WD TV live just doesn’t support FLAC surround sound files period.

    Another surround sound audio file error that I have experienced, which may or may not be related, is that 5.0 WAV files are processed and sent to the AV receiver as stereo files. It isn’t clear from my AV receiver display whether it is receiving a stereo PCM stream or some other format. I haven’t done enough tests to determine if the multiple channels have been mixed together or if the receiver is only receiving two channels, and which ones.   If you wish I can submit that problem as a separate problem."

I received a form letter advising me that the information would be passed on to WD engineers but that there was no guarantee if or when a solution would be made available. I received no feedback whether the WD TV Live was designed to support FLAC multi-channel and this was a firmware problem, or if the device just wasn’t designed with this feature.

ndjamena:

As you can see from the Mediainfo listings, the channel/speaker layout appears to be the same in the original WAV and the converted FLAC file. I thought that maybe the absence of a channel mask in the tag of the original FLAC created was an issue so I added what I believe was the correct channel mask for a 5.1 mapping but that did not change any of the results.

On the surface, it looks like the WD TV Live reads the FLAC file, and then streams the PCM content to the HDMI output with the channel/speaker relationship in the wrong sequence.

I have opened support tickets, complained in forums, and other things on this exact issue many times over the last several years.  I really wish they would get this corrected.

Oh Interesting. I’ve had plenty of problems trying to decode Monkey’s Audio format (.ape) but not FLAC. Or at least not yet.

I do not have a lot of APE files. I have standarized on FLAC. But other than the multi-channel files I do not recall having any problems with any other sound formats. Are you saying that you are successfully decoding multi-channel FLAC files?

The WD TV Live does not have any problems with 2 channel FLAC files. The problem arises with multi-channel (e.g. surround sound) FLAC files.

After some specific questions posed to WD tech support, they have confirmed that the WD TV live is suppose to support multi-channel FLAC files, but that the failure to decode them properly is a know firmware issue. There does not appear to be a target date for fixing the issue.

Multi-channel audio files have tags that identify the channel to speaker mapping. My suspicion is that the WD TV live is either not processing the tags or misinterpreting them.

I should add that although the WD TV live decodes 5.1 surround wav files properly (I haven’t tested 6.1 or higher), it definitely does not decode 5.0 or 4.0 wav files. You might ask why would you want to. It turns out that I have a number of old 4 channel encoded vinyls that I want to run through my preamp/4 channel decoder and convert/digitize to 4.0 wav files and hopefully to 4.0 FLAC.eventually.

The problem exists also in  commercial retail files, e.g. from 2L Records. I think, that is the answer, you are lookin’ for :wink:

Folks,

After first note here about the problem the WD proposed to exchange the model to refurbished newer model WD TV Live.

The problem exists in that hardware also and is not fixed until today.

More or less the technician from WD was writing to me an e-mail once a week, that they work on it, but this automatic contact stopped from WD side around finish the last year.

So last 3-4 months I landed without any contact from WD, without the fix and with refurbished hardware instead my fabric new with the same hard issue.

Have I say, that is probably last shopping with WD?

What shall I do? That is crazy, they need more than half a year to fix something, they done and they know about so long time!

Great disappointment.

I hope, you will read my post above, Bill S.

I think I have had the problem in the WD devices for much longer than the 1 1/2 years. 
I like how you open a support ticket and they ignore it for a short while, then close it without ever fixing it or even getting back to you.  Next thing I get from them is a support survey.  I think I have had that happen 3 times over the last several years

I love my WD Tv Live devices, but this lingering FLAC multi-channel issue is a major problem for me.

My only work around has been to de compress those FLACs to WAVs, at least they are playable now.

It has been a year since iplas first posted and I contributed my experience trying to process FLAC multi-channel files with the WD TV Live. I have had no response from WD support since I reported the problem a year ago. I briefly updated the firmware from 2.02.32 to confirm that FLAC support was not “corrected”, but rolled back the update due to a number of other issues. I don’t know what the current status of the player is. Consumer focus seems to be on “smart” features and sophisticated GUIs. The market may not longer want a media player that can play almost any popular audio and video format developed in the last 30 years.

A week ago I visited this forum to see if a solution had been identified. Failing that I decided that I was going to tackle the problem head-on. After some research and finding the right tools I think I may have found a solution for anyone using this device (and others) to play multi-channel files. The following discussion is based on testing at the 2.02.32 firmware level and the processing of up to 5.1 channel files. (I don’t have 7.1 hardware to test with). An extension of the following process should be valid for 7.1 and up.

I will get to the detail of the procedure shortly but first some background.

Multi-channel media files are mapped as as follows:

Channel           1      2      3      4       5      6       7      8
7.1 WAV           FL     FR     FC     LFE     BL     BR      SL     SR
5.1 WAV           FL     FR     FC     LFE     BL     BR
5.1 FLAC          FL     FR     BL     BR      FC     LFE

I've also seen the following mappings, but I don't know how 'official' they are:

5.0 WAV           FL     FR     FC     BL      BR
4.0 WAV (Quad)    FL     FR     BL     BR
3.0 WAV           FL     FR     FC
2.0 WAV (Stereo)  FL     FR
1.0 WAV (Mono)                  FC

The channel number represents the sequence in which the channel is found in the media file. Therefore, channel 1 is expected to be the Front Left Speaker and channel 2 is expected to be the Front Right speaker, in both the WAV and FLAC formats. As you can see, channel 3 and up mapping is different in the WAV and FLAC files. For example, if you compress a WAV file with the above mapping to a FLAC file, the sequence of the channels is retained, and based on the FLAC mapping, channel 3, which represents the Front Centre, is now located as channel 3 in the FLAC file, which represents the Back Left speaker in a FLAC file. When you play this FLAC file on the WD TV Live, the original Front Centre sound will come out of the Back Left speaker, the original LFE sound will come out of the Back Right speaker, and so on. If you uncompress the FLAC file back into a WAV file, the channel sequence is retained, and the WAV file will have the correct sequence again (as I observed in a previous post).

(Another way to specify channel mapping is by using a metadata tag in the extensible WAV format (Microsoft Wavex), but I have not found a software program that will allow me to test how channel mapping in a tag is processed by the WD TV Live, if at all. If someone could identify a program that will allow me add a metadata tag to a WAV and manipulate the channel map portion of the tag, I would appreciate that. This also begs the question: how would you apply that to a FLAC file.)

If the WAV and FLAC files have the 5.1 channel-mappings as documented above, the WD TV Live media player will play the files correctly. If the channels are not mapped as documented, the sound will come out of the wrong speakers. If the file has less that 6 channels, as documented above in 5.0-1.0 files, the WD TV Live will play only channels 1 and 2, the front left and front right tracks; that is, the player treats the file as a Stereo file. In the example of a 1.0 WAV with a Mono track as channel 3 (FC), the media player would play the empty channels in the FL and FR speakers, and ignore channel 3; i.e. there would be no sound coming out of any speaker.

The secret to getting multi-channel media files to be processed correctly by the WD TV Live, is to use a tool to remap the channels of the source file, to the required mapping of the target file, i.e. WAV or FLAC. The tool that I used to remap my files is Audacity, a free audio editor which can be downloaded here:
http://audacityteam.org/

I am going to describe the process using two examples.

A. The first example documents converting a 4.0 quad WAV file to a 5.1 WAV file. This example will introduce the concepts of building a multi-channel WAV, inserting missing channels and remapping them. Since there are less than 6 channels in the source file, without modification, this would be played as a 2 channel stereo file by the WD TV Live. The source channel files were created from a quad SQ matrix encoded vinyl LP from the early '70s. Running the turntable output through an SQ hardware decoder/preamp, I created four WAV files representing the FL, FR, BL and BR audio.

  1. From the Audacity File menu, you ‘Open’ the FL WAV file first, and then ‘Import:Audio’, each of the remaining WAV files in the following order, FR, BL and BR.
    The Audacity main window will display 4 mono channels in the sequence that they were loaded, FL, FR, BL and BR.

  2. From the File menu select ‘Export Audio’ and you will be given the opportunity to specify where the target file is to be stored and the ‘Type’ of target file. For the purpose of this example, you select ‘Other uncompressed files’, ‘Options:’, ‘Header:WAV(Microsoft)’, ‘Encoding:Signed 24-Bit PCM’, ‘Save’

  3. Audacity will then display the ‘Advance Mixing Options’ with the 4 channel source WAV on the left, and 4 channel target on the right. Move the ‘Output Channels’ slider to the right to specify a 6 channel target file. Two ‘empty’ channels, are added as channels 5 and 6.

  4. Select the source channel 3 (BL) and remap is to target channel 5. Similarly, remap source channel 4 (BR) to target channel 6. The target WAV channels now conform to the standard 5.1 WAV mapping, with channel 3, the FC speaker, and channel 4, the LFE, being empty. Select ‘OK’

  5. Audacity displays an ‘Edit Metadata’ screen which will give the opportunity to add Artist Name, Track Title, etc. Fill in and/or press ‘OK’. Audacity will then create the file.

A. The second example I will describe is probably a more common scenario than the first one. You have a 5.1 WAV file and you want to create a 5.1 FLAC file that is processed correctly by a WD TV Live.

What is the incentive to do this?
Consider the file size of a 6 min audio track in various formats:

WAV 24 bit sample size, 96 KHz bit rate (DVD quality), PCM 4.0= 394 MB (The original quad WAV)
WAV 24 bit sample size, 96 KHz bit rate, PCM 4.0+2 (5.1)= 591 MB (Adding two ‘empty’ channels to an uncompressed file format, results in a significant increase in the size of the file.)
FLAC 24 bit sample size, 96 KHz bit rate, PCM 4.0+2 (5.1)= 277 MB (The compressed FLAC format significantly reduces the file size.)
MP3 16 bit sample size, 44.1 KHz bit rate (CD quality), 320 Kbps constant bit rate stereo (2 channel)=14 MB

As you can see, there is a significant reduction in file size using the FLAC format for multi-channel audio files. The size can be further reduced by lowering the audio quality of the target file in the above process from DVD 24-96 to CD 16-44.1.

  1. From the Audacity File menu, ‘Open’ the 5.1 WAV file. You will be given the option of creating a copy of the file for editing purpose or modifying the original. I would recommend the former. Press ‘OK’. The Audacity main window will display 6 mono channels and, if the source WAV 5.1 file has been correctly mapped, should be in the FL, FR, FC, LFE, BL and BR sequence.

  2. From the File menu select ‘Export Audio’. For the purpose of this example, you would select ‘Type:FLAC’. ‘Options’ allows you to specify the quality level of the FLAC compression and the bit rate/depth of the target FLAC file. Higher bit rate equals bigger output file. Press ‘Save’.

  3. In the ‘Advance Mixing Options’ window you now remap the 5.1 WAV channels of the source to the 5.1 FLAC map of the target, as documented above. That is, channel 3 (FC) from the source file is remapped to channel 5 in the target file, channel 4 (LFE) from the source file is remapped to channel 6 in the target file, channel 5 (BL) from source to channel 3 in the target and channel 6 (BR) from source to channel 4 in the target. Select ‘OK’.

  4. Fill in any desired metadata and press ‘OK’ to create the FLAC file.

You can find a 6_Channel_ID.wav file for testing these procedures at
http://www-mmsp.ece.mcgill.ca/documents/audioformats/wave/Samples.html
Please note that the creator of this file has recorded the call out of the speaker positions so that all but the LFE are called out in sequence. In spite of the fact that LFE is in channel 3, due to the time the LFE note is recorded, it is called out as the last speaker, which could cause some confusion.

I haven’t had time to try this but I think Audacity Advanced Mixing Options can be used to create pseudo 5.1 media files from a less than 6 channel source. Take example A above. When the 4.0 source channels are remapped to their target 5.1 channels, the FL and FR can also simultaneously be mapped to the FC channel in the target. With proper gain control, the FC volume can be adjusted to complement the FL and FR volume in the target. Similarly, the FL, FR, BL and BR can also simultaneously be mapped to the LFE channel in the target. With proper filter applied to each channel, frequencies below 120 Hz can be removed from the target FL, FR, BL and BR, and frequencies above 120 HZ removed from the mixed target LFE channel. I can’t comment on the realism of the result.

I am not familiar enough with Audacity to know if there is some way to create a template or script, to automate loading of target file, set re-mapping and output characteristics and produce output file. Without such a facility, each track must be loaded, modified and saved manually. This process could be time consuming if you have a large multi-channel file collection. It is also prone to error. You want to ensure that each track of an album is processed with the same options. For example, I discovered that after I loaded a source file and accidentally clicked on one of the loaded tracks, I inadvertently reduced the gain of the track. If I hadn’t listened to each target file before deleting the source and noticed the error, I could have lost the time and effort creating the source.

I hope that this post will help other WD TV Live users in getting multi-channel audio files working. The fact that a proper mapped file is processed correctly by the WD TV Live, suggests that maybe the firmware is not that far off track. The only thing that may be missing is correct processing of channel mapping metadata. Maybe WD doesn’t even consider this a problem with the firmware and therefore is ignoring us.

There are three methods that Live TV uses for audio.

  1. Stereo
  2. Pass through to optical
  3. Pass through to hdmi

Stereo is the only audio decoded by the box. Outside that the audio stream is offloaded to an external device for processing and decoding.
I currently use dbPoweramp to encode flac and have never had an issue, mind you all my rips are checked against Accuraterip as well which should report any mapping issues.

What are you using to encode the audio files? Do they work correctly on other devices?

The channel mapping by the streamer is incorrect though on on some multi channel flac files

The more I dig into this, the more I feel like I’m going down a rabbit hole.

I’m inclined to agree with langholm. The FLAC specification at https://xiph.org/flac/format.html#frame_header indicates that the multi-channel implementation follows the recommendation of the SMPTE/ITU-R. The documentation that I have seen from the ITU-R recommends that all implementations of multi-channel media adopt the same channel order and speaker mapping. That mapping is reflected in the FLAC header specification and is identical to the WAV mapping. The fact that the FLAC channel mapping that I have documented above works with the WD live, means that either the WD is not implementing the FLAC decoding properly or my home theater receiver is not decoding the PCM stream properly.

I’m more inclined to believe the former. The WD TV Live is decoding both the WAV file, and decompressing and decoding the FLAC file, to a PCM stream. My receiver is only aware of the PCM stream and not aware of either the WAV file or FLAC file source and would not remap the channels based on the source. I would also assume that if a significant number of WD community members are reporting the same problem, the thing we have in common is the WD and not the receiver. It is highly unlikely that all our different surround sound receivers are mapping the channels wrong. This is also in line with WD customer service agreeing with me a year ago that there was a problem with the firmware interpreting FLAC multi-channel files. As a result of the above posting I have been contacted by WD customer service who again would like to talk to me about my issues. I will do that in the new year and maybe I can get some clarification.

This would suggest that if you have a limited number of multi-channel files, you can remap the FLAC files to the non-standard channel mapping as a work around in order to get the sound out of the correct speakers. Since this is a lossless process, you can always remap them back to the standard format if the firmware ever gets fixed, or you need the files to work with another media player. I would love to hear the experience that anybody has had with the mappings and another media player.

Oneeyedfred, I recommended Audacity as a program to perform the channel remapping and WAV to FLAC conversion because it is a free program, does the remapping and it shows the waveform of each channel. After a little bit of practice it is easy to recognize each of the speaker waveforms. I have not found a way to use it to automate the same procedure on multiple files. dbPoweramp is a commercial program that I would highly recommend to anyone who wants to do audio conversions in a batch mode. It has a channel remap DSP that can be setup to apply a particular remap on many files at the same time. It also uses all the processors in your computer to convert as many files simultaneously as you have processor cores. Excellent program worth the money.

By default dbPoweramp does not remap the channels of an audio file converted from WAV to FLAC. With the version I am familiar with, the channel mapper DSP has to be inserted into the process. I am not sure what you are using as the source of the conversion, a WAV file or using the dbPoweramp ripper to perform a straight conversion to FLAC. If you are not having a problem I would be curious what the source and FLAC channel mappings are.

I have used various programs to convert WAV to FLAC files (including FLAC executable with FLACfrontend) with the same result, they all create the same channel map as the source input; which makes sense if the channel mappings are the same for both formats.

I mentioned the wave extensible format of WAV files in the previous post. Microsoft actually recommends this format be used for multi-channel and high resolution WAV media. This format has a tag that can be used to specify special characteristics of the WAV including a channel bitmap that can remap the physical channel order. Again I don’t know how this applies to a FLAC.