INTERACT FORUM

Please login or register.

Login with username, password and session length
Advanced search  
Pages: [1]   Go Down

Author Topic: Volume Leveling and DTS(flac) files  (Read 5249 times)

parabolic

  • Recent member
  • *
  • Posts: 5
Volume Leveling and DTS(flac) files
« on: October 27, 2014, 04:18:52 pm »

I have a collection of 5.1 DTS files that I´ve wrapped into flac´s for tagging etc.   The rest of my music collection are (volume leveled) stereo flac´s.

I bitstream everything into my receiver over spidf - and it works perfect for the dts/stereo files if I leave the volume leveling OFF. But the DTS files with volume leveling won´t bitstream perfectly to the receiver.....

 I know the easiest solution would be to decode everything within MC20, but my current setup won´t allow multichannel over spdif, so ....

My question is;    Is it possible to control volume leveling/bitstreaming on a per file basis, such as with tagging.

The scenario being;   for designated 5.1 files = volume leveling OFF ..... for stereo files = volume leveling ON.

I need help :)
Logged

mwillems

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 5234
  • "Linux Merit Badge" Recipient
Re: Volume Leveling and DTS(flac) files
« Reply #1 on: October 27, 2014, 06:14:51 pm »

You could accomplish what you want by using zoneswitch, if you wanted to turn off volume levelling for all 5.1 files, for example, you could set up a rule to switch based on the existing "channels" tag.

E.g. setup 1) a zone that bitstreams with volume levelling turned off, and 2) a zone that has volume leveling turned on.  Then setup a zoneswitch rule that plays in the 2) zone with the rule
Code: [Select]
[channels]=2

Then set a rule that plays to zone 1 with the rule
Code: [Select]
-[channels]=2.  

Set the two rules to stop playback in the oppostie zone.  

Then any time you play something it should get routed correctly automatically from there.

If you only want certain 5.1 files to have volume levelling turned off, you might be able to find some attribute they share (like DTS encoding) and use that as the basis of the rule instead.  You shouldn't need to make a custom tag if there's something all the files that you want to have special treatment have in common.
Logged

6233638

  • Regular Member
  • Citizen of the Universe
  • *****
  • Posts: 5353
Re: Volume Leveling and DTS(flac) files
« Reply #2 on: October 27, 2014, 09:01:45 pm »

FLAC is a container for PCM audio only.
When you try to store other formats inside a FLAC container like DTS (or DoP) it should not be surprising when things break.
It just happens that when you send an AVR a PCM signal it will try to detect if it contains a DTS bitstream or not, which is why it "works" at full volume, but Media Center does not know to bitstream it and disable volume control.
 
I am curious; does Media Center list these files as "DTS" or "FLAC" in the compression field? It should be reported as FLAC.
 
If you want to store DTS audio in a separate container for tagging and chapter support, you should use MKA files, as the container was actually designed to support it.
What I will say though, is that even though the MKA files I have created decode correctly, and list "DTS" in the compression field, they don't seem to be bitstreamed when I enable the option, so that is a bug which needs to be fixed.
 
P.S. Technically DTS in FLAC should be a 2 channel signal unless the DTS stream is being decoded, so I'm not sure that your ZoneSwitch rule would work.
Logged

parabolic

  • Recent member
  • *
  • Posts: 5
Re: Volume Leveling and DTS(flac) files
« Reply #3 on: October 29, 2014, 05:36:14 pm »

The "FLAC" files are indeed 2 channel only ...... in reality they are basic DTS (PCM) files - losslessly compressed..... so at full volume they play bitperfect through the SPDIF to the external decoder.

So, MC really isn´t automatically differentiating between these DTS/Flac files and other stereo files in the collection.  But then again, I don´t mind having to manually tag these files as ´bypass volume leveling´  or ´force bitstream´ .... whatever floats MC´s boat :)

What sets these DTS files apart though is the Dynamic Range (128)  is always at 0.1 or 0.0   .... basically they are out-of-this-world compressed audio files, with zero dynamic range ....   maybe I can hack the ´Dynamic volume´ reference number, so that it disables volume leveling automatically ?

It would be easy for the developers to have MC check a specific tag for 5.1 files .... it would make searching for theses files easier also.....

Logged

Hendrik

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 10935
Re: Volume Leveling and DTS(flac) files
« Reply #4 on: October 29, 2014, 05:43:15 pm »

You should just store your DTS in a way thats not a giant hack, then you would have none of these problems. :)
If you store your DTS for example in a .mka container and enable DTS bitstreaming, you will not only have MC automatically not destroy it with volume leveling, but you will also have it mark them properly as 5.1

Putting DTS into a lossless audio codec like FLAC is not something we officially support, since there is no sane way to detect that properly, so you are on your own, I'm afraid.
Logged
~ nevcairiel
~ Author of LAV Filters

parabolic

  • Recent member
  • *
  • Posts: 5
Re: Volume Leveling and DTS(flac) files
« Reply #5 on: October 29, 2014, 05:57:19 pm »

Point taken :)  ....I used to be a Foobar2000 user..... at one time this flac wrapping "hack" was the only way to play tagged dts files .... or so I thought ....

.... It probably isn´t a major hassle to reconvert the entire library to .mka files ... if that solves my issues, then it is more then worth the effort....

Logged

6233638

  • Regular Member
  • Citizen of the Universe
  • *****
  • Posts: 5353
Re: Volume Leveling and DTS(flac) files
« Reply #6 on: October 29, 2014, 07:02:03 pm »

If you store your DTS for example in a .mka container and enable DTS bitstreaming, you will not only have MC automatically not destroy it with volume leveling, but you will also have it mark them properly as 5.1

Putting DTS into a lossless audio codec like FLAC is not something we officially support, since there is no sane way to detect that properly, so you are on your own, I'm afraid.
Is DTS in MKA officially supported?
Bitstreaming does not seem to work with it either, even though the compression field reads DTS.
I can supply a sample if required.
 
It would be easy for the developers to have MC check a specific tag for 5.1 files .... it would make searching for theses files easier also.....
I've no idea what DTS in FLAC reads in the compression or channels fields, but I'd expect "FLAC" and "2".
5.1 channel FLAC is a thing (proper PCM from DVD Audio discs) so even if it were listed as 5.1 it should still be treated as PCM.
Logged

parabolic

  • Recent member
  • *
  • Posts: 5
Re: Volume Leveling and DTS(flac) files
« Reply #7 on: October 31, 2014, 01:22:24 pm »

I can´t get MKA wrapped DTS files to bitstream properly either.... they seem to get internally decoded to 2ch by MC....

Same goes for straight up .dts files - there is an error in playback - unless downmixing to 2ch is enabled in output format.

DTS(wav) files do play properly - flac wrapped do play fine also, if volume leveling is off.....

DTS enabled movies have no problems whatsoever......

.....actually flac/wav wrapped dts files are the ONLY way to properly bitstream .dts files right now.... the only problem is; volume leveling needs to be OFF.

Logged

ferday

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 1732
Re: Volume Leveling and DTS(flac) files
« Reply #8 on: October 31, 2014, 03:22:54 pm »


 I've no idea what DTS in FLAC reads in the compression or channels fields, but I'd expect "FLAC" and "2".
5.1 channel FLAC is a thing (proper PCM from DVD Audio discs) so even if it were listed as 5.1 it should still be treated as PCM.

6 channel .flac can be made from decoding .dts (or any other multi-channel format) files as well.  because i use HDMI for multi, i converted all my .dts (and all other multi formats) to 6 channel flac for the tagging and format homogeneity, and just keep the .dts files separate for archiving.  i can't determine a difference in sound from playing the 6-flac or the original .dts

all of my multi files have no issues with volume leveling but i'm on a different use case...i'll try to wrap a .dts to flac/mka when i have time and see how it goes over my spdif
Logged

parabolic

  • Recent member
  • *
  • Posts: 5
Re: Volume Leveling and DTS(flac) files
« Reply #9 on: October 31, 2014, 04:00:05 pm »

The obvious upgrade path would be to go HDMI to receiver... having MC decode everything into multichannel streams.... but, right now I'm stuck with the SPIDF bitstreaming....and I´m sure many share my predicament.

If anyone else can verify if the .mka wrapped DTS (or .dts files in general) fail to play via spdif bitstream, that would at least confirm that issue per se....regardless of personal setups.
Logged

6233638

  • Regular Member
  • Citizen of the Universe
  • *****
  • Posts: 5353
Re: Volume Leveling and DTS(flac) files
« Reply #10 on: October 31, 2014, 11:09:39 pm »

I can´t get MKA wrapped DTS files to bitstream properly either.... they seem to get internally decoded to 2ch by MC.
DTS is a two-channel audio track which decodes to multichannel when run through a DTS decoder.
 
As I said above, Media Center correctly detects that the audio inside an MKA file is using DTS, but the current version does not enable bitstreaming with it. It's a bug which needs to be fixed.
 
However, since MKA is supposed to store DTS audio, I'm sure that it will be, unlike DTS-in-FLAC which will not.
 
6 channel .flac can be made from decoding .dts (or any other multi-channel format) files as well.
Yes, but then you are converting a lossy format (DTS) into a lossless one (PCM) which is, ironically, a lossy process, since you have now converted floating-point values to integer.
 
It will typically result in much larger files as well. A full album of DTS audio stored in an MKA file is about 500MB, compared to 2GB when converted to 6 channel FLAC.
 
And if you are trying to play over S/PDIF, you can no longer bitstream the files since you have removed their DTS encoding. (though bitstreaming is not currently working)
Logged
Pages: [1]   Go Up