VideoHelp Forum




+ Reply to Thread
Results 1 to 13 of 13
  1. Hi,

    Looking at the many 5.1 tracks I have from Blu-ray rips (DTS or AC3), I have seen that they all look different. There's no volume reference level standard, and it seems how the mix ends up is just up to the individual audio engineer doing it. I have seen some terrible mixes, typically DTS, which even have clipping right out of the Blu-ray.

    Given my collection of rips, I would like to test the water and see if I can unify the 5.1 tracks with regards to at least a reference volume (or RMS) of some kind. Dolby has -31 dBFS for speaking, and I was thinking I could try to convert my DTS tracks to AC3. Basically,

    1) Find out the dial norm (should be the RMS).
    2) Find out good down mix coefficients for stereo, when surround equipment is not available.
    3) Use the dial norm and down mix coefficients as meta data for a conversion to AC3.
    4) Do an overall RMS volume normalization of the AC3 track.
    5) Finally, maybe apply some compression to achieve a good balance/mix. This maybe shouldn't be done as a last step, since it affects the previous steps.

    To find out the dial norm, I would need a tool that can analyze the RMS based on dialog, and I am not sure if such a tool exists that is also freeware, preferably. There are some cool ones like the TC Electronis LM6, but it costs a lot.

    Finding out good down mix coefficients for each 5.1 track... not sure how to do that. There's recommended coefficients from Dolby, but each 5.1 mix is unique (I would like to achieve a good sounding reference down mix for all my 5.1 tracks).

    I am also unaware of any freeware tool that can do RMS normalization.

    I was thinking of doing as much as I can in Audacity and Sox. There I can look the waveform, and apply various effects. And Sox can be used for various things, even finding out an approx. RMS.

    So do you guys think this is too ambitious? And do you have any tips for tools, or way of doing things?
    Quote Quote  
  2. Originally Posted by Mackan View Post
    I have seen some terrible mixes, typically DTS, which even have clipping right out of the Blu-ray.
    Too right. I've had eac3to detect clipping lots of times when re-encoding a DTS track to AC3.

    Can't help you, sorry, but this thread is likely to be very interesting. Someone here has your answer, no doubt.
    Pull! Bang! Darn!
    Quote Quote  
  3. Banned
    Join Date
    Oct 2004
    Location
    Freedonia
    Search Comp PM
    Originally Posted by Mackan View Post
    I was thinking of doing as much as I can in Audacity and Sox. There I can look the waveform, and apply various effects. And Sox can be used for various things, even finding out an approx. RMS.

    So do you guys think this is too ambitious? And do you have any tips for tools, or way of doing things?
    Are you doing this work under Linux or Mac? The use of sox is a giant red flag to me that you are not working under Windows because sox has been around forever and it's mostly used under Linux/Unix. You definitely need to tell us if you're not working under Windows as most of the expertise we have is in Windows around here. I'm not sure that most of our gurus even know what sox is.
    Quote Quote  
  4. Member
    Join Date
    Jun 2012
    Location
    United States
    Search Comp PM
    Originally Posted by Mackan View Post
    Hi,

    Looking at the many 5.1 tracks I have from Blu-ray rips (DTS or AC3), I have seen that they all look different. There's no volume reference level standard, and it seems how the mix ends up is just up to the individual audio engineer doing it. I have seen some terrible mixes, typically DTS, which even have clipping right out of the Blu-ray.
    Have you ever thought about searching out Laserdisc audio for some of those movies? I've seen folks rip and substitute it for audio that just wasn't done great. This or you could search out DVD audio that you could replace it with.

    As for sox being a red flag in a mostly Windows based community.....it isn't. It just shows that you're obviously diversified and learning what works for you. Good on you, you know more than I do in that department.

    Quote Quote  
  5. when going form dts to ac3 personally I would go one of these two ways using sox&aften:
    1. decode with ffmpeg, pipe to sox do drc with sox and then encode with aften
    2. decode with ffmpeg, pipe to aften and set the dialnorm&drc flags according to the values I want

    since a bunch of people have problems using compand to do drc in sox here's the options Hybrid offers/uses when doing drc:

    Film Standard
    Code:
    compand 0.1,0.3 -90,-90,-70,-64,-43,-37,-31,-31,-21,-21,0,-20 0 0 0.1
    Film Light
    Code:
    compand 0.1,0.3 -90,-90,-70,-64,-53,-47,-41,-41,-21,-21,0,-20 0 0 0.1
    Music Standard
    Code:
    compand 0.1,0.3 -90,-90,-70,-58,-55,-43,-31,-31,-21,-21,0,-20 0 0 0.1
    Music Light
    Code:
    compand 0.1,0.3 -90,-90,-70,-58,-65,-53,-41,-41,-21,-21,0,-11 0 0 0.1
    Speech
    Code:
    compand 0.1,0.3 -90,-90,-70,-55,-50,-35,-31,-31,-21,-21,0,-20 0 0 0.1
    54db Range / 5db Limit
    Code:
    compand 0.3,1 5:-80,-79,-54 -5 -90 0.2
    50db Range / 6db Limit
    Code:
    compand 0.3,1 5:-80,-79,-50 -6 -90 0.2
    46db Range / 7db Limit
    Code:
    compand 0.3,1 5:-80,-79,-46 -7 -90 0.2
    42db Range / 8db Limit
    Code:
    compand 0.3,1 5:-80,-79,-42 -8 -90 0.2
    38db Range / 9db Limit
    Code:
    compand 0.3,1 5:-80,-79,-38 -9 -90 0.2
    34db Range / 10db Limit
    Code:
    compand 0.3,1 5:-80,-79,-34 -10 -90 0.2
    30db Range / 11db Limit
    Code:
    compand 0.3,1 5:-80,-79,-30 -11 -90 0.2
    66db Range / 4db Limit
    Code:
    compand 0.3,1 5:-80,-79,-66 -4 -90 0.2
    70db Range / 4db Limit
    Code:
    compand 0.3,1 5:-80,-79,-70 -4 -90 0.2
    Quote Quote  
  6. Member
    Join Date
    Nov 2012
    Location
    India
    Search Comp PM
    use megui
    Quote Quote  
  7. I'm sorry for a delayed response, but mainly been busy with trying out different tools and techniques the last couple of months, to achieve good sounding AC3 tracks, including good sounding stereo downmixes. It's all a challenge… but I have learned a lot. Too much to cover in a reply here.

    @jman98
    Mainly using OS X at the moment.

    @Selur
    Yeah, I have tried out sox and the compand function a lot the last couple of months. I found the compand parameters on another forum, as well. The problem is that I don't know if sox compressor function introduces distortion or not. And I don't mean clipping. A really good compressor uses look ahead and adaptive attack/release time to avoid causing distortion of the waveforms for different frequencies. Sox compressor is fairly static I think, and won't give optimal results. From listening tests, I just feel something is not right… The results do not sound warm and nice enough, it sounds too sharp somehow, like if there's some distortion sometimes.

    The resulting waveform from sox compressor is very similar to the one I can study when applying Dolby drc via Compressor on OS X. This leads me to believe that the compand parameters are quite ok. There are more spikes from sox though, causing trouble to achieve higher volume level when downmixing.

    For those who don't know, Compressor is a cheap software tool from Apple themselves that can encode video and audio, including AC3. Given a DTS file, I typically decode it to a CAF file, import it into Compressor and encode an AC3 file where I can set dialnorm, drc and other metadata. I can then even decode the AC3 into a CAF again, and watch the waveform in Audacity.

    Then there is the whole issue of setting dialnorm correctly, and what drc profile to use. It's all a very cumbersome task. Given that modern tools recommend to measure dialnorm with LKFS instead of dBFS complicates things as well. A Dolby decoder will typically use dBFS when applying its attenuation and dry, and I am not sure if that is the same as LKFS, since that is a different measurement technique with weighting.

    I would say that I have all the tools to accomplish what I want, but I am not sure if it's worth doing the dialnorm and drc for AC3 tracks anymore. But if you don't, and listen to the AC3 in stereo mode, it might sound terrible since the decoder cannot use drc. I've noticed that as well.

    I have checked the dialnorm and waveforms of AC3 tracks from some iTunes movies, and it seems they always set dialnorm to -27 despite I measured it to be -22 one time. Makes me think they don't really care so much. But at the same time they do use film standard drc, which will then not do its job correctly if dialnorm is set incorrectly.

    For AC3 encoding there is also a 90 degree phaseshift recommended to be applied. However, I noticed some strange artifacts when doing on some movie tracks. Some surround sounds get shifted too much to the left, and vice versa. I guess this all depends if the original DTS track already was phaseshifted or not, which seems impossible to know. Ah, just troubles.

    At the moment I thinking of continue to use ffmpeg for AC3 encode, set dialnorm to -31 and drc to none and skip all other metadata. But still need to create a great stereo track separately from the DTS. Current stereo downmixes, including DPL2 and others can be achieved in sox, but the dynamic range is too high, the dialogue is too low. Need to apply some compression somehow, but not too much, and make it sound warm and nice without distortion.

    Also not sure of the quality of ffmpeg's AC3 encoder compared to other ones. I have heard it's really good, but cannot confirm it. It's very fast compared to commercial ones like in Compressor. But I also think ffmpeg does not apply 90 degree phaseshift. Documentation is quite poor for open source tools sometimes, unfortunately. Also noticed that ffmpeg always apply drc when decoding an AC3 track to CAF/WAV. Seems it cannot be fully turned off with the drc_scale parameter, which is not documented anywhere.
    Last edited by Mackan; 15th Dec 2012 at 07:45.
    Quote Quote  
  8. Originally Posted by Selur View Post
    since a bunch of people have problems using compand to do drc in sox here's the options Hybrid offers/uses when doing drc:

    Film Standard
    Code:
    compand 0.1,0.3 -90,-90,-70,-64,-43,-37,-31,-31,-21,-21,0,-20 0 0 0.1
    I plotted the DRC curve for your compand function above, and it seems it didn't follow the expected curve from Dolby. I tried to modify it, and this one seemed to give the expected curve.

    Code:
    compand 0.1,0.3 -90,-84,-43,-37,-31,-31,-26,-26,-16,-21,0,-20.25 0 0 0.1
    Maybe you want to look into it, and see if you agree. I left a message to the, I think, original author of these compand parameters, but not sure he cares anymore.

    I've also never understood the null band that Dolby uses for Film Standard. It is not symmetrically placed around the -31 dBFS, while Film Light is.
    Quote Quote  
  9. Originally Posted by Selur View Post
    when going form dts to ac3 personally I would go one of these two ways using sox&aften:
    1. decode with ffmpeg, pipe to sox do drc with sox and then encode with aften
    2. decode with ffmpeg, pipe to aften and set the dialnorm&drc flags according to the values I want
    Could you please help with command line options?
    I'd like to decode ac3 / dts to ac3 with 13 db dynamic compression (dynamic compression in the way XBMC does)
    Quote Quote  
  10. I have no clue how XBMC does dynamic compression and dynamic compression is no simple 13db volume boost.
    -> you might want to first figure out what you want exactly before you start to mess with dynamic compression
    Quote Quote  
  11. Quiet sounds should be louder, loud sound should be quieter.
    scale from 1 (quiet) to 10 (loud)
    before compression: 10 loudest sound, 1 is the quietest
    after: 8 loudest sound, 3 is the quitest

    What does range and limit mean?

    What is more compressed?
    54db Range / 5db Limit
    30db Range / 11db Limit
    Quote Quote  
  12. I used http://ffmpeg.org/ffmpeg-filters.html#Audio-Filters

    ffmpeg -i audio.ac3 -af "compand=.3 .3 .3 .3 .3:1 1 1 1 1:-90/-60 -60/-40 -40/-30 -20/-20:6:0:-90:0.2" -b:a 640k audio_new.ac3

    This sound really distorted, I think the problem is clipping
    Quote Quote  
  13. What does range and limit mean?
    limit: maximal allowed change (in dB)
    range: is the lowest dB value under which no changes are applied
    -> best look at the explanation inside the sox manual (http://sox.sourceforge.net/sox.html) regarding compand

    What is more compressed?
    depends on the sound, the both have different ranges and limits

    This sound really distorted, I think the problem is clipping
    opening the file inside a tool which shows you the wave front (like in example Audacity) should visualize that.
    (iirc. both sox and ffmpeg also have filters to analyse the volumes of a stream)

    Cu Selur
    Quote Quote  



Similar Threads

Visit our sponsor! Try DVDFab and backup Blu-rays!