View Full Version : New version of NicAudio released (ver 1.5 from 2006-03-14)!
dimzon
3rd March 2006, 12:03
Hosted @ BeHappy workspace (http://www.gotdotnet.com/workspaces/workspace.aspx?id=1bb59ddf-901b-43a5-bd54-b0999e8e223e) (take look @ my signature)
NicAudio.dll v1.5 - AviSynth Audio Plugins for MPEG Audio/AC3/DTS/LPCM
patched by dimzon (dimzon541@gmail.com)
Syntax:
AC3: NicAC3Source("FileName.ac3", int "Channels", int "DRC")
DTS: NicDTSSource("FileName.dts", int "Channels", int "DRC")
MPA: NicMPASource("FileName.mpa", int "Channels")
LPCM: NicLPCMSource("FileName.lpcm", int "SampleRate", int "SampleBits", int "Channels")
RAW: NicRawPCMSource("FileName.raw", int "SampleRate", int "SampleBits", int "Channels")
Note: "Channels" specifies the maximum number of channels to output. This is
the only optional parameter.
Note: "DRC" specifies DRC algorytm. ) 0 means nothing (default), 1 means Normal
the only optional parameter.
Example:
LoadPlugin("NicAudio.dll")
NicAC3Source("c:\File.AC3")
or
LoadPlugin("NicAudio.dll")
NicAC3Source("c:\File.AC3", DRC=1)
or
NicLPCMSource("c:\File.lpcm", 48000, 16, 2)
(NicLPCMSource expects raw LPCM files. Not LPCM wav files. At present it only supports 2-channel LPCM wav files)
Filters compiled and gathered together by Nic. All under the GPL.
All credit should go to the excellent creator of these original filters
used in FilmShrink.sf.net - Attila T. Afra
All bug reports etc should go to me Nic ;)
http://nic.dnsalias.com reach me at http://forum.doom9.org/
Fizick
3rd March 2006, 15:47
What is DRC?
dimzon
3rd March 2006, 15:50
What is DRC?
Dynamic Range Compression
http://en.wikipedia.org/wiki/Audio_level_compression
Are you sure you've added dynamic range there Dimzon? ;)
I don't believe what you've added will make any difference. I will try to explain why.
1) if(0==_drc)
You should be checking to see if _drc is set rather than if it's zero. I.e. if ( _drc ) will suffice
2) a52_dynrng(State, 0, 0); Does nothing. There is no dynamic range code in liba52 (AFAIK). But the function you're calling does allow you to provide an external function to do the DRC. However, you are not doing that, you are passing NULL (0) so no DRC function is called.
Your best bet is to look into how AC3 Filter does it and copy that :)
Cheers,
-Nic
dimzon
3rd March 2006, 17:23
Are you sure you've added dynamic range there Dimzon? ;)
Dynamic range compression
-------------------------
void a52_dynrng (a52_state_t * state,
sample_t (* call) (sample_t, void *), void * data);
This function is purely optional. If you dont call it, liba52 will
provide the default behaviour, which is to apply the full dynamic
range compression as specified in the A/52 stream.
please, read this post http://forum.doom9.org/showthread.php?p=793155#post793155 and below!
Your best bet is to look into how AC3 Filter does it and copy that :)
WOW! Great idea!
Oh! :) Well done then Dimzon. I never noticed that. I misunderstood the code!
Sorry for my accusation. I was completely in the wrong. That will teach me to only give a cursory glance at the code.
Take Care :)
-Nic
ps
Oh and here's a mirror of the hosting for you :)
http://nic.dnsalias.com/NicAudio_25_dll_20060303.zip
dimzon
3rd March 2006, 17:52
Oh and here's a mirror of the hosting for you :)
http://nic.dnsalias.com/NicAudio_25_dll_20060303.zip
unfortunally current build still contain some bug
http://forum.doom9.org/showthread.php?p=793654#post793654
About NicAc3Source I detect a bug decoding 5.0 (without LFE) ac3 streams. Make a wav 6 channels (with LFE empty) but wrong mapping C_SL_FR_FL_SR_LFE, need Getchannels(4,3,1,6,2,5).
Seems like I found bug:
case A52_3F2R:
LFE = Flags && A52_LFE;
DecFlags = A52_3F2R;
if (LFE)
DecFlags |= A52_LFE;
ChannelCount = 6;
break;
In this case LFE variable is always = true.
Replaced to
LFE = 0!=(Flags &A52_LFE);
Same for DTS
Another new is my current internal version now assimilate MPASource Version 0.3 (c) Ernst Pechщ - 2004-01-09
It will produce floating-point output, based on MPG123 decoder and can decode Mpeg Layer III
Futher plans is to add faad2 decoder for native AAC decoding ;)
foxyshadis
3rd March 2006, 20:04
Native aac would be awesome; ffdshow as my directshowsource provider never works right (even though it works for viewing videos, odd), always downmixes 5.1 chanels wrong.
dimzon
4th March 2006, 00:53
Native aac would be awesome; ffdshow as my directshowsource provider never works right (even though it works for viewing videos, odd), always downmixes 5.1 chanels wrong.
AFAIK ffdshow use faad2 for decoding too... So if there are a bug in faad2 I can't fix it (my knowledge about AAC math is not enought)
In other case I can try to ask foobar2k developers to share modified faad2 sources with me - AFAIK they perform some quality/accuracy tweaking...
dimzon
4th March 2006, 12:26
Yet another idea - to wrap BASS library for decoding
http://www.un4seen.com/bass.html
The BASS library is free for non-money making use - if you are not charging for the software (and it has no other commercial purpose, eg. advertising), then you can use BASS in it for free.
MP3/MP2/MP1/OGG/WAV/AIFF/MOD/XM/WMA/FLAC/WavPack/Speex/Musepack /AAC/M4A/ALAC/TTA/APE/OptimFROG
Sounds promising, isn't it?
:cool:
dimzon
6th March 2006, 12:10
new version is out
dimzon
14th March 2006, 13:38
new version is out - new NicRawPcmSource to read raw pcm files (headerless wav)
slk001
14th March 2006, 22:34
NicLPCMSource expects raw LPCM files. Not LPCM wav files. At present it only supports 2-channel LPCM wav files
What does this mean? I always thought (in fact, I'm really pretty sure of this) that a .WAV file was an LPCM file with a header.
dimzon
14th March 2006, 22:51
What does this mean?
It mean you can read 24-bit LPCM audio demuxed from DVD (Some DVD has audio track in this lossless format)
Wilbert
14th March 2006, 23:14
So it supports LPCM (all of them) and 2 channel LPCM wav, right?
dimzon
14th March 2006, 23:21
So it supports LPCM (all of them) and 2 channel LPCM wav, right?
Quick looking @ code told me:
it supports only 2 channel LPCM (no wav at all)
If You need WAV file try DirectShowSource or WavSource or BassAudioSource
Mr_Odwin
4th April 2006, 17:35
I have a question that I guess may have been answered elsewhere, but I can't find it so here goes ...
Say you have 5.1 channel ac3 audio and you use the parameter "channels=2", what sort of downmixing occurs?
dimzon
4th April 2006, 17:38
I have a question that I guess may have been answered elsewhere, but I can't find it so here goes ...
Say you have 5.1 channel ac3 audio and you use the parameter "channels=2", what sort of downmixing occurs?
I really dosn't know (and I have no time now to read source code), sorry
Anyway I strongly recommend you to use downmixing via AviSynth (such scripts are avaluable in BeHappy-related threads)
vBulletin® v3.8.5, Copyright ©2000-2012, Jelsoft Enterprises Ltd.