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 > Capturing and Editing Video > Avisynth Development

Reply
 
Thread Tools Search this Thread Display Modes
Old 3rd March 2006, 12:03   #1  |  Link
dimzon
BeHappy/MeGUI developer
 
dimzon's Avatar
 
Join Date: Oct 2003
Location: Moscow, Russia
Posts: 1,727
New version of NicAudio released (ver 1.5 from 2006-03-14)!

Hosted @ BeHappy workspace (take look @ my signature)

Code:
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/

Last edited by dimzon; 14th March 2006 at 13:39. Reason: new version is out
dimzon is offline   Reply With Quote
Old 3rd March 2006, 15:47   #2  |  Link
Fizick
AviSynth plugger
 
Fizick's Avatar
 
Join Date: Nov 2003
Location: Russia
Posts: 2,183
What is DRC?
Fizick is offline   Reply With Quote
Old 3rd March 2006, 15:50   #3  |  Link
dimzon
BeHappy/MeGUI developer
 
dimzon's Avatar
 
Join Date: Oct 2003
Location: Moscow, Russia
Posts: 1,727
Quote:
Originally Posted by Fizick
What is DRC?
Dynamic Range Compression
http://en.wikipedia.org/wiki/Audio_level_compression
dimzon is offline   Reply With Quote
Old 3rd March 2006, 17:02   #4  |  Link
Nic
Moderator
 
Join Date: Oct 2001
Location: England
Posts: 3,285
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
Nic is offline   Reply With Quote
Old 3rd March 2006, 17:23   #5  |  Link
dimzon
BeHappy/MeGUI developer
 
dimzon's Avatar
 
Join Date: Oct 2003
Location: Moscow, Russia
Posts: 1,727
Quote:
Originally Posted by Nic
Are you sure you've added dynamic range there Dimzon?

Quote:
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.ph...155#post793155 and below!


Quote:
Originally Posted by Nic
Your best bet is to look into how AC3 Filter does it and copy that
WOW! Great idea!
dimzon is offline   Reply With Quote
Old 3rd March 2006, 17:45   #6  |  Link
Nic
Moderator
 
Join Date: Oct 2001
Location: England
Posts: 3,285
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
Nic is offline   Reply With Quote
Old 3rd March 2006, 17:52   #7  |  Link
dimzon
BeHappy/MeGUI developer
 
dimzon's Avatar
 
Join Date: Oct 2003
Location: Moscow, Russia
Posts: 1,727
Quote:
Originally Posted by Nic
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.ph...654#post793654

Quote:
Originally Posted by tebasuna51
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:
Code:
	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
Code:
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
dimzon is offline   Reply With Quote
Old 3rd March 2006, 20:04   #8  |  Link
foxyshadis
ангел смерти
 
foxyshadis's Avatar
 
Join Date: Nov 2004
Location: Lost
Posts: 9,445
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.
__________________
There are four boxes to be used in defense of liberty: soap, ballot, jury, and ammo. Please use in that order.
foxyshadis is offline   Reply With Quote
Old 4th March 2006, 00:53   #9  |  Link
dimzon
BeHappy/MeGUI developer
 
dimzon's Avatar
 
Join Date: Oct 2003
Location: Moscow, Russia
Posts: 1,727
Quote:
Originally Posted by foxyshadis
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 is offline   Reply With Quote
Old 4th March 2006, 12:26   #10  |  Link
dimzon
BeHappy/MeGUI developer
 
dimzon's Avatar
 
Join Date: Oct 2003
Location: Moscow, Russia
Posts: 1,727
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?
dimzon is offline   Reply With Quote
Old 6th March 2006, 12:10   #11  |  Link
dimzon
BeHappy/MeGUI developer
 
dimzon's Avatar
 
Join Date: Oct 2003
Location: Moscow, Russia
Posts: 1,727
new version is out
dimzon is offline   Reply With Quote
Old 14th March 2006, 13:38   #12  |  Link
dimzon
BeHappy/MeGUI developer
 
dimzon's Avatar
 
Join Date: Oct 2003
Location: Moscow, Russia
Posts: 1,727
new version is out - new NicRawPcmSource to read raw pcm files (headerless wav)
dimzon is offline   Reply With Quote
Old 14th March 2006, 22:34   #13  |  Link
slk001
Registered User
 
Join Date: Apr 2002
Posts: 399
Quote:
Originally Posted by dimzon
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.
slk001 is offline   Reply With Quote
Old 14th March 2006, 22:51   #14  |  Link
dimzon
BeHappy/MeGUI developer
 
dimzon's Avatar
 
Join Date: Oct 2003
Location: Moscow, Russia
Posts: 1,727
Quote:
Originally Posted by slk001
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)
dimzon is offline   Reply With Quote
Old 14th March 2006, 23:14   #15  |  Link
Wilbert
Moderator
 
Join Date: Nov 2001
Location: Netherlands
Posts: 6,335
So it supports LPCM (all of them) and 2 channel LPCM wav, right?
Wilbert is offline   Reply With Quote
Old 14th March 2006, 23:21   #16  |  Link
dimzon
BeHappy/MeGUI developer
 
dimzon's Avatar
 
Join Date: Oct 2003
Location: Moscow, Russia
Posts: 1,727
Quote:
Originally Posted by Wilbert
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
dimzon is offline   Reply With Quote
Old 4th April 2006, 17:35   #17  |  Link
Mr_Odwin
FAVC Man
 
Mr_Odwin's Avatar
 
Join Date: Nov 2005
Posts: 411
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?
Mr_Odwin is offline   Reply With Quote
Old 4th April 2006, 17:38   #18  |  Link
dimzon
BeHappy/MeGUI developer
 
dimzon's Avatar
 
Join Date: Oct 2003
Location: Moscow, Russia
Posts: 1,727
Quote:
Originally Posted by Mr_Odwin
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)
dimzon is offline   Reply With Quote
Reply

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 09:47.


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