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.

 

Go Back   Doom9's Forum > General > Audio encoding

Reply
 
Thread Tools Search this Thread Display Modes
Old 26th April 2014, 13:00   #1  |  Link
zee944
Registered User
 
Join Date: Apr 2007
Posts: 240
opening DTS-HD MA with NicAudio

I've tried opening a DTS-HD MA track with this script:

Code:
LoadPlugin("NicAudio[2.0.4].dll")
a=NicDTSSource("movie.dts", DRC=1)	#a=NicAC3Source("movie.ac3", DRC=1)
flr = GetChannel(a, 1, 2)
fcc = GetChannel(a, 3)
lfe = GetChannel(a, 4)
lfc = MixAudio(fcc, lfe, 0.2071, 0.2071)
mix = MergeChannels(lfc, lfc)
lrc = MixAudio(flr, mix, 0.2929, 1.0)
blr = GetChannel(a, 5, 6)
MixAudio(lrc, blr, 1.0, 0.2929)
Normalize()
ConvertAudioto24bit()
AudioDubEx(BlankClip(length=Int(25*AudioLengthF(last)/Audiorate(last)), width=32, height=32, pixel_type="RGB24", fps=25), last)
VirtualDub opens this seemingly fine, but when I press play it just freezes, and the same happens when I want to save the audio.

Simplifying the script to this...:

Code:
LoadPlugin("NicAudio[2.0.4].dll")
NicDTSSource("movie.dts", DRC=1)
AudioDubEx(BlankClip(length=Int(25*AudioLengthF(last)/Audiorate(last)), width=32, height=32, pixel_type="RGB24", fps=25), last)
...it doesn't freeze, but no audio plays, and can't save the wave either. Why's that?

What I actually wanted to do is a proper stereo downmix of the DTS-HD MA 5.1 track.
zee944 is offline   Reply With Quote
Old 26th April 2014, 13:38   #2  |  Link
filler56789
SuperVirus
 
filler56789's Avatar
 
Join Date: Jun 2012
Location: Antarctic Japan
Posts: 1,043
Quote:
Originally Posted by zee944 View Post
opening DTS-HD MA with NicAudio
You'd better try DirectShowSource (with LAV Audio + Arcsoft's DTS decoder).
filler56789 is offline   Reply With Quote
Old 26th April 2014, 14:39   #3  |  Link
zee944
Registered User
 
Join Date: Apr 2007
Posts: 240
Quote:
Originally Posted by filler56789 View Post
You'd better try DirectShowSource (with LAV Audio + Arcsoft's DTS decoder).
How do I do that?

BTW, I've already decoded the six channels with eac3to. So I have 6 wavs. I can open them instead if that's easier, but I don't know how to make a stereo mix out of them.
zee944 is offline   Reply With Quote
Old 26th April 2014, 15:58   #4  |  Link
HolyWu
Registered User
 
HolyWu's Avatar
 
Join Date: Aug 2006
Location: Taiwan
Posts: 747
Doesn't eac3to also have -downDpl and -downStereo options to do the downmix job?
HolyWu is offline   Reply With Quote
Old 26th April 2014, 16:46   #5  |  Link
zee944
Registered User
 
Join Date: Apr 2007
Posts: 240
Quote:
Originally Posted by HolyWu View Post
Doesn't eac3to also have -downDpl and -downStereo options to do the downmix job?
You're perfectly right! I forgot about it.

I can't do dynamic range compression with that though - as far as I know, players do this when they downmix to stereo. Any suggestions?
zee944 is offline   Reply With Quote
Old 27th April 2014, 08:53   #6  |  Link
Richard1485
AviSynth monkey
 
Richard1485's Avatar
 
Join Date: Feb 2010
Posts: 272
NicDTSSource() does not decode DTS-HD MA. Extract the core with eac3to and try your first script again.
Richard1485 is offline   Reply With Quote
Old 27th April 2014, 12:18   #7  |  Link
tebasuna51
Moderator
 
tebasuna51's Avatar
 
Join Date: Feb 2005
Location: Spain
Posts: 5,883
Quote:
Originally Posted by zee944 View Post
I can't do dynamic range compression with that though - as far as I know, players do this when they downmix to stereo. Any suggestions?
NicAudio DRC parameter only work with AC3 than have DRC info in the stream, DTS audio don't have this info and the use of DRC parameter is useless.

And yes NicAudio can't decode DTS-MA, sometimes work decoding only the 'core' but is not recommended.

With (output.wav or other):

eac3to movie.dts output.wav -downStereo

you have the same downmix than with your avs script.
__________________
BeHappy, AviSynth audio transcoder.
tebasuna51 is offline   Reply With Quote
Old 27th April 2014, 12:43   #8  |  Link
zee944
Registered User
 
Join Date: Apr 2007
Posts: 240
Quote:
Originally Posted by Richard1485 View Post
NicDTSSource() does not decode DTS-HD MA. Extract the core with eac3to and try your first script again.
I did that and it works now, thanks!

Now the question is: is my first script "right"? Should I handle a DTS track the very same way as an AC3 track? Will my stereo mix be good?
zee944 is offline   Reply With Quote
Old 27th April 2014, 13:41   #9  |  Link
zee944
Registered User
 
Join Date: Apr 2007
Posts: 240
Quote:
Originally Posted by tebasuna51 View Post
eac3to movie.dts output.wav -downStereo

you have the same downmix than with your avs script.
Thanks! I guess it is a "proper" stereo downmixing of a DTS track then.
zee944 is offline   Reply With Quote
Old 27th April 2014, 14:37   #10  |  Link
Richard1485
AviSynth monkey
 
Richard1485's Avatar
 
Join Date: Feb 2010
Posts: 272
Quote:
Originally Posted by zee944 View Post
Now the question is: is my first script "right"? Should I handle a DTS track the very same way as an AC3 track? Will my stereo mix be good?
The script looks right. The downmix is fine, but I prefer this.

Code:
flr = GetChannel(a, 1, 2)
fcc = GetChannel(a, 3, 3)
lrc = MixAudio(flr, fcc, 0.3694, 0.2612)
blr = GetChannel(a, 5, 6)
MixAudio(lrc, blr, 1.0, 0.3694)
I normalize after downmixing to stereo. If you're concerned about dynamic range simply because you want to listen in a home environment, you can recompress to AC-3 at a bitrate that is high enough to be transparent (e.g. 384 kbps) and apply a DRC profile and dialnorm value e.g. film standard and -27. You can do this with WAV to AC3 encoder. I do this quite often for friends who dislike high dynamic range. Give it a try.
Richard1485 is offline   Reply With Quote
Old 27th April 2014, 18:48   #11  |  Link
zee944
Registered User
 
Join Date: Apr 2007
Posts: 240
Quote:
Originally Posted by Richard1485 View Post
The script looks right. The downmix is fine, but I prefer this.
How a player do the downmixing? Like "my" script do, or like yours?

Quote:
Originally Posted by Richard1485 View Post
If you're concerned about dynamic range simply because you want to listen in a home environment,
I'm only concerned about the dynamic range because as far as I know, players do DRC compression if the AC3 is flagged that way. I didn't know that in the case of DTS, this flag doesn't exist.
zee944 is offline   Reply With Quote
Old 27th April 2014, 19:37   #12  |  Link
Richard1485
AviSynth monkey
 
Richard1485's Avatar
 
Join Date: Feb 2010
Posts: 272
The script that I posted discards the LFE, which is what Dolby recommends. You can, of course, mix the LFE if you wish.

Quote:
I'm only concerned about the dynamic range because as far as I know, players do DRC compression if the AC3 is flagged that way. I didn't know that in the case of DTS, this flag doesn't exist.
In that case, you need only the PCM. You mentioned earlier that you successfully used eac3to to split your audio into WAVs. Does this mean that you have access to Arcsoft? If so, forget NicDTSSource and proceed to make your stereo PCM.
Richard1485 is offline   Reply With Quote
Old 28th April 2014, 09:07   #13  |  Link
zee944
Registered User
 
Join Date: Apr 2007
Posts: 240
Quote:
Originally Posted by Richard1485 View Post
You mentioned earlier that you successfully used eac3to to split your audio into WAVs. Does this mean that you have access to Arcsoft? If so, forget NicDTSSource and proceed to make your stereo PCM.
Yes, I have Arcsoft DTS Decoder.

I'm not sure what do you mean. You mean use eac3to and its -downStereo option?
zee944 is offline   Reply With Quote
Old 28th April 2014, 19:31   #14  |  Link
Richard1485
AviSynth monkey
 
Richard1485's Avatar
 
Join Date: Feb 2010
Posts: 272
I mean use eac3to to decode the DTS-HD MA. As I understand it from reading back through the thread, you chose to use NicDTSSource() despite the fact that it decodes only the lossy core because you thought it could apply DRC. Now that you have found that that is not the case, you might as well use Arcsoft

Either use eac3to input output.wav -downstereo if you want the built-in downmix or use eac3to input output.wavs if you want to apply the one I use. Better still, try them both and pick the one you like the best.
Richard1485 is offline   Reply With Quote
Old 29th April 2014, 14:54   #15  |  Link
zee944
Registered User
 
Join Date: Apr 2007
Posts: 240
Quote:
Originally Posted by Richard1485 View Post
Either use eac3to input output.wav -downstereo if you want the built-in downmix or use eac3to input output.wavs if you want to apply the one I use. Better still, try them both and pick the one you like the best.
Could you modify your script to use the six WAVs and put the LFE into the mix as well? It would be very helpful.
zee944 is offline   Reply With Quote
Old 30th April 2014, 00:39   #16  |  Link
Richard1485
AviSynth monkey
 
Richard1485's Avatar
 
Join Date: Feb 2010
Posts: 272
You might as well use the stereo downmix that eac3to uses. The discarding of the LFE is a big part of why I like the mix. But you might ask Tebasuna if he thinks it's possible. He's the expert.
Richard1485 is offline   Reply With Quote
Old 30th April 2014, 04:05   #17  |  Link
HolyWu
Registered User
 
HolyWu's Avatar
 
Join Date: Aug 2006
Location: Taiwan
Posts: 747
eac3to also has a -mixlfe option to mix LFE in when downmixing.
HolyWu is offline   Reply With Quote
Reply

Tags
dts, dts-hd, nicdtssource

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 17:58.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2020, vBulletin Solutions Inc.