Author Topic: FLAC encoding level? Some of my perfect files have static *** FIXED twice! ***  (Read 20310 times)

0 Members and 1 Guest are viewing this topic.

Offline undertow

  • Newbie
  • Posts: 11
Hello, my first post here and I'd like to thanks the admins for the great information and tools here :)

I recently purchased a Kenwood Keg and the BMW CD changer interface module. Yesterday I flashed the DMS with the BMW firmware and connected it up to the OEM head unit.

Previously I'd been using a Dension Gateway 300 with 320 kbps MP3 files on a USB stick. Although I was expecting it, the difference upgrading to FLAC has been astonishing!

All my music for my home hifi is in FLAC and plays without any issues through a Squeezebox.

On the way to work this morning I noticed some albums play back with static or digital distortion.

Am I going to have to re-encode everything with a lower encoding level?

Can anyone tell me what the build date of the FLAC decoder is?

Thanks a lot :)
Ben
« Last Edit: April 13, 2012, 05:16:41 pm by undertow »
Kenwood KHD-CX910 + 250 GB DMS > BMW Business > Audison LRx 5.1k > Morel and JL Audio

Offline undertow

  • Newbie
  • Posts: 11
Re: FLAC encoding level? Some of my perfect files have static
« Reply #1 on: June 22, 2010, 06:55:55 pm »
So I re-encoded the problematic album at ever reducing encoding levels until I reached 1 and the imperfect playback remains.

Time to troubleshoot...perhaps the analog output of the Keg is overloading the input of my BMW head unit? Other albums with an encoding level of 8 are OK.
Kenwood KHD-CX910 + 250 GB DMS > BMW Business > Audison LRx 5.1k > Morel and JL Audio

Offline S80_UK

  • Global Moderator
  • Veteran.
  • *****
  • Posts: 392
  • Volvo S80 D5 with VW Phatbox
    • Volvo Phatbox Installation
Re: FLAC encoding level? Some of my perfect files have static
« Reply #2 on: June 22, 2010, 10:39:24 pm »
Changing the encoding level will not have any effect on the output of a FLAC decoder.  FLAC is lossless, after all.  The encoding level simply determines the amount of effort put in by the encoder into compressing the data more effectively.  Even then, the differences in file size between files encoded with levels 1 and 8 will generally be no more than around 10%.  The contents of the decoded output will be identical, and the effort required to decode them will also be very very similar. 

The decoder in the Phatbox is quite old (looking in the file I see a possible version number of 1.0.4).  That should not matter.  However, there is a possibility, especially if your files are tagged with album art, that they may be tripping up the decoder in some way.  If your files do have album art, try one or two without to see if it helps.  If not, then I suspect the problem lies elsewhere.  For what it's worth, almost all of my library on my Phatbox is in FLAC and works fine, encoded with version 1.2.1 at compression level 8.  And in case it matters, I do not have album art embedded in my files.

Offline undertow

  • Newbie
  • Posts: 11
Re: FLAC encoding level? Some of my perfect files have static
« Reply #3 on: June 23, 2010, 06:38:47 am »
Thanks a lot I will check the file tags tonight :)
Kenwood KHD-CX910 + 250 GB DMS > BMW Business > Audison LRx 5.1k > Morel and JL Audio

Offline VorTechS

  • Administrator
  • Veteran.
  • *****
  • Posts: 1678
  • PhatHack Media Manager & DMS Tools Wizard Author
Re: FLAC encoding level? Some of my perfect files have static
« Reply #4 on: June 23, 2010, 07:40:07 am »
I'm watching this with interest, so please post back the results! 

I was going to start on applying tag changes in PhatHackMM to files over the next few days, and I might need to make sure the transfer to DMS strips out any art tags where appropriate.

I'm also wondering if it's worth checking out the differences between the GM files and other firmware files, as I suspect the GM versions may contain different version of the decoders that supported album art?
Kenwood KDC-W7031 | Kenwood KHD-CX910 | 250GB DMS | PhatHack Media Manager v1.1.4 (Alpha) | VIOT

Catch me weekdays 8am-4pm GMT on IRC @ irc.freenode.net on channel #phathack (aka the chat link!!)

Offline undertow

  • Newbie
  • Posts: 11
Re: FLAC encoding level? Some of my perfect files have static
« Reply #5 on: June 23, 2010, 08:55:09 pm »
I've fixed it but it wasn't the tags! I was close to the problem in my second post about levels and clipping the input of the head unit.

After messing around with different FLAC files again, I temporarily disconnected the analog stereo harness from the Keg's RCA output.

When the Keg was playing music but it wasn't being sent to the head unit, I noticed that there was low level noise coming through my tweeters that directly corresponded with BMW data bus commands being sent when buttons were pressed and also when there was hard disk activity in the Keg.

I originally had the Keg wired in as shown below, then changed it to the second configuration:



Looking inside the BMW/Alpine interface, it has a pair of small output transformers near the RCA output. So I guess it has either isolated some sort of ground loop or changed the audio ground so that all the noise is removed.

Because of this noise issue on the bus and BMW head units don't have an easily accessible volume reading, I'm not sure whether the output level has also been reduced, stopping any clipping of the input.

Anyway, I'm glad it's fixed and my music is crystal clear again :)

On the weekend I'll try to find time to get out my multimeter and scope to see if I can work out what's different about the new grounding arrangement and determine the maximum unclipped signal levels from the different RCA outputs with a 1 kHz 0 dB test tone.
Kenwood KHD-CX910 + 250 GB DMS > BMW Business > Audison LRx 5.1k > Morel and JL Audio

Offline VorTechS

  • Administrator
  • Veteran.
  • *****
  • Posts: 1678
  • PhatHack Media Manager & DMS Tools Wizard Author
Re: FLAC encoding level? Some of my perfect files have static
« Reply #6 on: June 24, 2010, 06:36:46 am »
Well, I'm glad you have things sorted!  Out of interest, do any of your tracks have album art embedded in the tags?
Kenwood KDC-W7031 | Kenwood KHD-CX910 | 250GB DMS | PhatHack Media Manager v1.1.4 (Alpha) | VIOT

Catch me weekdays 8am-4pm GMT on IRC @ irc.freenode.net on channel #phathack (aka the chat link!!)

Offline undertow

  • Newbie
  • Posts: 11
Re: FLAC encoding level? Some of my perfect files have static
« Reply #7 on: June 24, 2010, 09:55:25 am »
Well I just looked on my work PC and found I have a local copy of the same FLAC album that was giving me problems.

Mp3tag says the files do not have album art; it also says nothing in my small collection of FLAC at work has any embedded album art.

If I can find files in my much larger FLAC library at home that have album art I will load some onto the DMS and try them out :) However I've done the vast majority of my FLAC rips myself using EAC and I know they don't have any album art.
Kenwood KHD-CX910 + 250 GB DMS > BMW Business > Audison LRx 5.1k > Morel and JL Audio

Offline S80_UK

  • Global Moderator
  • Veteran.
  • *****
  • Posts: 392
  • Volvo S80 D5 with VW Phatbox
    • Volvo Phatbox Installation
Re: FLAC encoding level? Some of my perfect files have static
« Reply #8 on: June 24, 2010, 02:22:45 pm »
Undertow - many thanks for reporting back and in such good detail.  I am glad you got to the root of the problem. 

Offline S80_UK

  • Global Moderator
  • Veteran.
  • *****
  • Posts: 392
  • Volvo S80 D5 with VW Phatbox
    • Volvo Phatbox Installation
Re: FLAC encoding level? Some of my perfect files have static
« Reply #9 on: June 24, 2010, 02:27:05 pm »
Well, I'm glad you have things sorted!  Out of interest, do any of your tracks have album art embedded in the tags?
Hi Stu,

As I understand it, the problem that some FLAC decoders have is that depending on how they are built, they may run out of buffer space when parsing the tags within a file.  This is most likely to happen with large album art embedded in the file.  However, I think it is highly dependent on the memory allocated and so may not always be a problem.  There is no fundamental problem between old and new FLAC versions, it is just that newer uses of the decoder probably have more generous memory allocations.

Cheers,

Les.

Offline mdp

  • A few posts under my belt.
  • *
  • Posts: 36
Re: FLAC encoding level? Some of my perfect files have static
« Reply #10 on: June 25, 2010, 12:34:35 am »
Hey Guys,
I am running a large library of flac libFLAC 1.2.1 20070917 level 5 (default of dbpoweramp) using the accurate rip database on a Hacked phatbox 160 GB containing cover-art.
Its running perfectly in Vw/audi.

Is it an idea to check the ID-tag on the file on the dms itself?
I am using Phatbox MM 2.35 to fill the dms.
Did someone found a way to tag the files write away? ??? ??? ???
No I add the older version id-tags of phatnoise in the pmm by editing the imported new files.

Grtz mdp
Phatbox 160 gb used in Audi, now running on Samsung 850 evo mSata 250 gb ssd in idee to mSata converter

Offline Terry_Kennedy

  • Moderator
  • Veteran.
  • *****
  • Posts: 253
  • There and back again
Re: FLAC encoding level? Some of my perfect files have static
« Reply #11 on: June 25, 2010, 09:27:54 am »
Looking inside the BMW/Alpine interface, it has a pair of small output transformers near the RCA output. So I guess it has either isolated some sort of ground loop or changed the audio ground so that all the noise is removed.

Correct. The Phatbox / Keg outputs are single-ended, while the BMW wants differential signaling. So with your original setup, you were grounding one side of the differential pairs, thus removing the noise immunity differential signaling provides.

BTW, if this wasn't a Phatnoise adapter or one modified by someone, it can harm your Phatbox. There's a jumper (which may just be a solder bridge instead of a real jumper) inside the adapter labeled 5/12. Factory default is 12, the Phatbox needs 5.

Offline undertow

  • Newbie
  • Posts: 11
Re: FLAC encoding level? Some of my perfect files have static
« Reply #12 on: June 25, 2010, 09:59:14 am »
Thanks Terry

The adaptor is from an original PhatNoise BMW kit, I also have the RadioShack ADC but don't need it as my car doesn't have the upgraded factory stereo.

I just tried some FLAC with album art and they played perfectly. Here's a screenshot of the album art tags in one file, it contains two images:



Kenwood KHD-CX910 + 250 GB DMS > BMW Business > Audison LRx 5.1k > Morel and JL Audio

Offline undertow

  • Newbie
  • Posts: 11
Re: FLAC encoding level? Some of my perfect files have static *** FIXED x 2 ***
« Reply #13 on: February 22, 2012, 10:32:48 pm »
This thread is 18 months old but I've recently changed BMW's and have some more information which may help someone else. I've also got another request for help at the bottom of this post.

I've now got an E39 of the same year that my E46 was - 2002.

The E39 has the M Audio DSP system, first thing I did on getting it home was to transfer the Keg over. Immediately noticed the same issue with static in songs from some albums, probably occurring more often than on the E46.

This immediately led me to suspect what I now believe to be the root cause of this issue: the output from the Keg is overloading the input on the OEM headunit. Maybe the KHD-CX910 has hotter outputs than normal PhatNoise boxes?

One album playing with lots of static was simply acoustic guitars and vocals. It's well mixed and has plenty of dynamic range.

I re-encoded the FLAC for this album with a -6dB level reduction and the static completely disappeared. Furthermore, having to turn the volume up higher to provide a normal listening level also improved how everything sounded and there was generally a reduction in subtle sibilance that hinted at the onset of this 'static' distortion. Note the peak level in this album before my level change was perfect at -0.2 dBFS.


The latest BMW firmware is v9 but whilst running the DMS Tools, I noticed one of the changes made in v8 was something like "reduced output level to improve sound quality".

Does anyone know if it's possible to rebuild the BMW firmware with an even lower output level?
Kenwood KHD-CX910 + 250 GB DMS > BMW Business > Audison LRx 5.1k > Morel and JL Audio

Offline S80_UK

  • Global Moderator
  • Veteran.
  • *****
  • Posts: 392
  • Volvo S80 D5 with VW Phatbox
    • Volvo Phatbox Installation
Re: FLAC encoding level? Some of my perfect files have static *** FIXED ***
« Reply #14 on: February 27, 2012, 11:01:52 pm »
***VERY UNLIKELY*** in my view.  I don't think anyone has dug into the firmware in a very long time, and the parts that would need to be addressed to fix audio issues would be well buried.

I don't know the BMW set up, but doesn't the Keg still output analog audio?  Then the M-DSP box takes that and feeds it into the BMW electronics.  If that is the case, the it should be possible to attenuate the audio between the Keg and the M-DSP box using some suitable resistor networks.

Offline undertow

  • Newbie
  • Posts: 11
Re: FLAC encoding level? Some of my perfect files have static *** FIXED ***
« Reply #15 on: March 02, 2012, 05:38:00 pm »
Thanks but I've already tried a home made attenuator :)

Unfortunately it introduced a lot of hard disk seeking noise onto the audio, as the ground is partially connected to the signal wire.

I'm going to try swapping the 910 with a spare generic PhatBox box I have to see if it's related to the output level of the 'eXcelon' unit.

I've also just installed a JBL MS-8 which has a direct aux in. That's Plan C or is it E by now... :)
Kenwood KHD-CX910 + 250 GB DMS > BMW Business > Audison LRx 5.1k > Morel and JL Audio

Offline S80_UK

  • Global Moderator
  • Veteran.
  • *****
  • Posts: 392
  • Volvo S80 D5 with VW Phatbox
    • Volvo Phatbox Installation
Re: FLAC encoding level? Some of my perfect files have static *** FIXED ***
« Reply #16 on: March 02, 2012, 06:06:16 pm »
Unfortunately it introduced a lot of hard disk seeking noise onto the audio, as the ground is partially connected to the signal wire.

Plan F - line isolating transformer...?  

That's how I fixed the noise issues in my Volvo installation - here  http://wiki.phathack.com/VW_Phatbox_to_Volvo_Transplant_%28How_To%29

(about half-way down the page)

Offline undertow

  • Newbie
  • Posts: 11
Re: FLAC encoding level? Some of my perfect files have static *** FIXED ***
« Reply #17 on: March 05, 2012, 11:19:11 am »
Already tried one and it didn't change anything!

Also tried the generic PhatBox over the weekend, still got the same distortion from the same songs. Oh well :)
Kenwood KHD-CX910 + 250 GB DMS > BMW Business > Audison LRx 5.1k > Morel and JL Audio

Offline undertow

  • Newbie
  • Posts: 11
Re: FLAC encoding level? Some of my perfect files have static *** FIXED ***
« Reply #18 on: April 13, 2012, 05:16:11 pm »
Very happy to report I no longer have any distortion!

I had my early BM54 unit updated to the latest firmware.

That's changed the gain levels in whatever internal processing the unit does. Everything is now crystal clear :)
Kenwood KHD-CX910 + 250 GB DMS > BMW Business > Audison LRx 5.1k > Morel and JL Audio