Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion. Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules. |
|
![]() |
|
Thread Tools | Search this Thread | Display Modes |
![]() |
#1 | Link | |
Registered User
Join Date: Nov 2012
Posts: 30
|
Dialogue nightmode downmix preset for 5.1 DTS to 2.0 AAC stereo using ffmpeg and qaac
After converting many DTS movie tracks from 5.1 to 2.0 using eac3to, I have found the default eac3to channel mappings to result in very quiet dialogues and overly loud music and action scenes. Although the eac3to channel downmix coefficients have a scientific basis, they often do not sound good in practice bceause of low dialogue volume. This preset is for those looking for clear dialogues with left and right channel music still being audible but more in the background.
Requires: ffmpeg.exe and qaac.exe Quote:
FL' = 0.71*FC + FL + BL FR' = 0.71*FC + FR + BR This "nightmode" preset uses the following channel matrix: FL' = FC + 0.30*FL + 0.30*BL FR' = FC + 0.30*FR + 0.30*BR As you can see - front center (dialogues) come in properly now and stay at the original level - while the music and explosions remain a background effect and don't overpower you. This preset solves the problem of you having to constantly fiddle with the volume knob when watching DTS 5.1 converted to 2.0 movies in order to hear dialogues. (Especially for watching movies in the night where you don't want to wake others but still want to be able to hear dialogues). Try it out and you will notice a much better movie watching experience for 5.1 to 2.0 converted movies. Last edited by robertcollier4; 24th March 2014 at 00:27. |
|
![]() |
![]() |
![]() |
#4 | Link | |
Registered User
Join Date: Nov 2012
Posts: 30
|
Quote:
There is no double-lossy encoding here, that was made sure of. Ffmpeg is muxing 5 channels to 2 channels - and then passing that to qaac as a 32-bit float PCM (raw) data stream. It was also verified that the actual libdts module returns 32-bit float PCM - so there is no dithering happening when the data is being passed from ffmpeg libdts decoder to qaac aac encoder. The lossy encoding is happening only once - and that is by QuickTime AAC (qaac command line). This is why we are explicitly telling ffmpeg to "-acodec pcm_f32le". Yes you could do the AAC encoding with ffmpeg - but I hydrogenaudio listening tests show that the best encoder is Quicktime AAC encoder. Last edited by robertcollier4; 24th March 2014 at 00:22. |
|
![]() |
![]() |
![]() |
#5 | Link |
Kid for Today
Join Date: Aug 2004
Posts: 3,477
|
DTS & AAC are both lossy, so that's double-lossy...or maybe you meant DTS HD MA...still, you can use ffdshow audio's(and even LAV Audio's I think) built-in decoding matrix and downmix to stereo using custom coeffs in realtime without any encoding whatsoever. I do it all the time, with VST plugins on top of it and it's all processed in 32fp and fed to Reclock as is.
|
![]() |
![]() |
![]() |
#6 | Link |
Registered User
Join Date: May 2014
Posts: 2
|
Sorry for bumping an old thread but I wanted to see if someone could perhaps fill a request.
I found this post really useful. I use a 2.0 system and like to watch movies at night, so the volume fluctuations can really be very annoying. Re-encoding the audio via this is really quick and can make a big difference in watching movies with a lot of actions and explosions. I was wondering, if its not to difficult, possible for someone to write a batch that does just this to a file that is dragged into the batch. It would save a lot of time and convenience. It would also be nice if it merged the converted audio file into a new mkv but it would not be absolutely necessary. I tried doing it myself but was not capable of doing so. Just thought I'd give it a shot. |
![]() |
![]() |
![]() |
#7 | Link |
Registered User
Join Date: Nov 2012
Posts: 30
|
@Cybore - try running this in the same directory as your MKV file.
Code:
@echo off set PATH_MKVMERGE=E:\PortableApps\VideoProcessing\mkvtoolnix set PATH_QAAC=E:\PortableApps\VideoProcessing\qaac set PATH_FFMPEG=E:\PortableApps\VideoProcessing\ffmpeg set PATH=%PATH%;%PATH_MKVMERGE%;%PATH_QAAC%;%PATH_FFMPEG% @echo on cd /d %~dp0 For %%a IN ("*.mkv") Do ( echo ---------------------- BATCH STARTING %%~na%%~xa ffmpeg.exe -report -loglevel verbose -i "%%~na%%~xa" -map 0:a:0 -f wav -acodec pcm_f32le -ac 2 -af pan=stereo:FL=0.25*FL+FC+0.6*LFE:FR=0.25*FR+FC+0.6*LFE - | qaac.exe --tvbr 127 --quality 2 --rate keep --ignorelength --no-delay - -o "%%~na-ffmpeg.m4a" 1>>qaac.log 2>&1 If exist "%%~na.srt" ( mkvmerge.exe --split 4000M -o "%%~na-2chnightmode%%~xa" --no-chapters --no-audio "%%~na%%~xa" "%%~na-ffmpeg.m4a" "%%~na.srt" 1>>"mkvmerge.log" 2>&1 ) Else ( mkvmerge.exe --split 4000M -o "%%~na-2chnightmode%%~xa" --no-chapters --no-audio "%%~na%%~xa" "%%~na-ffmpeg.m4a" 1>>"mkvmerge.log" 2>&1 ) ) This will convert all MKV files in the current directory. If you would like it to similarly convert other filetypes, such as .MP4 - just replace the line: Code:
For %%a IN ("*.mkv") Do ( Code:
For %%a IN ("*.mp4") Do ( Last edited by robertcollier4; 13th May 2014 at 07:47. |
![]() |
![]() |
![]() |
#9 | Link |
Registered User
Join Date: Jul 2014
Posts: 20
|
While custom matrixing coefficients will alleviate the dynamic range inconsistencies, it may still not be a "proper" solution.
Replicating Dolby's DRC system in a DAW with FilmLight/Standard compression presets is a better option. The problem with custom matrices is that they alter the stereo imaging, resulting in a very pronounced center (if you boost the center channel for dialogue intelligibility). |
![]() |
![]() |
![]() |
#12 | Link | |
None
Join Date: Jul 2007
Location: The Background
Posts: 273
|
Quote:
Here is, for example, Dolby's "Film Standard" DRC preset: Max Boost: 6 dB (below -43dB). Boost Range: -43 to -31dB (2:1 ratio). Null Band Width: 5dB (-31 to -26dB). Early Cut Range: -26 to -16dB (2:1 ratio). Cut Range: -16 to +4dB (20:1 ratio). How do we replicate, if possible, these options in Audacity or other audio editors? |
|
![]() |
![]() |
![]() |
#13 | Link |
Moderator
![]() Join Date: Feb 2005
Location: Spain
Posts: 6,658
|
You can try with the compand command of sox
You can see some samples of that command in https://forum.doom9.org/showthread.p...165#post779165 Don't work fine with avisynth soxfilter but you can try with sox command line. Remember than Dolby Compression curves are based in normalized dialog (at -31 dB, for that the Null Band preserved), but not all sources are compliant with that and the output can't be like desired. The Dolby recomendations (Dialog Normalization, DRC system) are good if all sources respect them, but there are many sources with high volume (TV commercials, Loudness war, ...) and you need turn up the volume always with Dolby compliant sources.
__________________
BeHappy, AviSynth audio transcoder. |
![]() |
![]() |
![]() |
Tags |
2.0, 5.1, downmix, dts, stereo |
Thread Tools | Search this Thread |
Display Modes | |
|
|