View Full Version : NicAudio 2.0.6 in CodePlex project
tebasuna51
15th March 2008, 02:45
IMPORTANT EDIT
At this moment (2016) I recommend use LWLibavAudioSource like AviSynth audio decoder instead NicAudio (or BassAudio).
Then I never will make new versions of NicAudio.
---------------------------------------------------------------------------------------------------- EDIT END
Like was announced in this thread (http://forum.doom9.org/showthread.php?p=1106929#post1106929), I open a new project in CodePlex to unify the NicAudio sources and continue the development (if any).
In last years there are mod's from Dimzon, Nic (of course), IanB and now for me. All of them, and also the BeHappy people, are invited to the NicAudio developer team.
In http://www.codeplex.com/NicAudio there are now the source code and a first release (2.0 to begin a new age).
Any comment are welcome.
EDIT: Actual version 2.0.6 (2012-08-27)
CHANGE LOG
------
27/08/2012 Tebasuna 2.0.6
ac3,dts Solved some initialization issues with no-linear decode.
http://forum.doom9.org/showthread.php?p=1587337
lpcm,raw Some minor improvements.
25/10/2011 Tebasuna 2.0.5
dts Accepted special stereo dts modes Lt+Rt, A+B (dual mono)...
12/08/2009 Tebasuna 2.0.4
lpcm Solved bug writing last block in some cases
25/06/2009 Tebasuna 2.0.3
mpa Skip ID3v2,3,4 initial tag to avoid false sync frames.
buzzqw
15th March 2008, 09:14
thanks for your effort tebasuna51!
what's about adding support for flac, multichannel pcm (as in bluray dvd), AC3+, DTSHD... ?
yea, know.. tha latter are a little bit difficult... but
BHH
tebasuna51
15th March 2008, 11:52
what's about adding support for flac,
BassAudio can decode flac.
multichannel pcm (as in bluray dvd),
Done, LPCM in BluRay mode, with something like:
NicLPCMSource("FileName.pcm", 96000, -24, 8)
AC3+, DTSHD... ?
See the TODO list in the readme.txt
DTSHD, I don't know a free decoder, actually we can use DelayCut to extract the core dts.
AC3+, is still in beta stage in ffmpeg project.
MLP/ThrueHD, the ffmpeg decoder seems correct, we need a volunteer to include this decoder. Anyone?
buzzqw
15th March 2008, 13:22
NicLPCMSource("FileName.pcm", 96000, -24, 8)
nice, but a "automatic" recognition of file will be even better.. like NicLPCMSource("FileName.pcm") .. if possible
i know bassaudio (and thanks again btw).. but having a single dll for most common audio formats will be easier
BHH
tebasuna51
15th March 2008, 21:06
nice, but a "automatic" recognition of file will be even better.. like NicLPCMSource("FileName.pcm") .. if possible
Maybe you can persuade Madshi to work in the NicAudio developer team. :)
Atak_Snajpera
7th April 2008, 18:56
Mp2 and Mp3 decoding is not perfect :)
Source (mp2) and transcoded files (AC3 AAC OGG) using BePipe
http://www.sendspace.com/file/nizv9b
tebasuna51
8th April 2008, 00:07
Mp2 and Mp3 decoding is not perfect :)
Source (mp2) and transcoded files (AC3 AAC OGG) using BePipe
http://www.sendspace.com/file/nizv9b
Thanks for the sample.
Of course your output files are corrupted but I can't reproduce these results. Using your source.mp2 and decoding with NicMPG123Source() function I obtain perfect outputs ac3, aac and ogg.
With your source.mp2 I obtain bitidentical wav files using old or new NicAudio, old or new MPASource (WarpEnterprises). The differences with Bass decoder are less than -135 dB (32 bits float), and the differences with Lame 3.97 are less than -96 dB (16 bit int).
In your Command_Line_Example.cmd (simplified):
bepipe --script "import(^job1.avs^)" | ...
In job1.avs there are more AviSynth functions or only the NicMPG123Source()?
Any user can reproduce the corrupted outputs?
Atak_Snajpera
8th April 2008, 17:27
#VideoSource
LoadPlugin("C:\Users\Dawidos\Documents\Delphi_Projects\RipBot264\Tools\dgindex\DGDecode.dll")
video=MPEG2Source("C:\Temp\RipBot264temp\job1\job1.d2v")
#AudioSource
LoadPlugin("C:\Users\Dawidos\Documents\Delphi_Projects\RipBot264\tools\AviSynth plugins\NicAudio\NicAudio.dll")
audio=NicMPG123Source("C:\Temp\RipBot264temp\job1\job1 L2 2ch 48 384 DELAY -221ms.mp2")
audio=ResampleAudio(audio,48000)
#Delay
audio=DelayAudio(audio,-0.221)
#Normalize
audio=Normalize(audio,1)
#AudioDub
audio=ConvertAudioTo16bit(audio)
AudioDub(video,audio)
tebasuna51
9th April 2008, 03:07
Mp2 and Mp3 decoding is not perfect :)
Bug detected and fixed. Thanks for your help.
The problem was a continuous message:
MPEG 1.0 layer II, 384 kbit/s, 48000 Hz stereo
mixed with the audio data only with Bepipe, works fine with BeHappy. A file (common.c in mpg123-lib) send the message to stdout instead stderr.
Please use the new NicAudio.dll v2.0.1 (http://www.codeplex.com/NicAudio)
dimzon
9th April 2008, 11:39
The problem was a continuous message:
MPEG 1.0 layer II, 384 kbit/s, 48000 Hz stereo
mixed with the audio data only with Bepipe, works fine with BeHappy. A file (common.c in mpg123-lib) send the message to stdout instead stderr.
OMG! Very funny side-effect ;)
Fizick
13th April 2008, 20:01
tebasuna51,
Seems, you rename NicMpaSource to NicMPG123Source?
Please add some note to documentation.
tebasuna51
13th April 2008, 20:31
tebasuna51,
Seems, you rename NicMpaSource to NicMPG123Source?
Please add some note to documentation.
Nope, the original NicMpaSource was based in libmad libraries without support for mp3, only mp1/2.
Dimzon add NicMPG123Source (2006-03-06) using the MPASource from WarpEnterprises and mpg123-lib, with support for mp3 and VBR.
Like NicMPG123Source make the same than NicMpaSource + mp3 + VBR, I supress NicMpaSource.
There are only a reference in the changelog:
"libmad deprecated"
maybe I need explain this better.
Susana
24th April 2008, 20:12
Thank you very much for continuing this proyect tebasuna51. I had an ac3 3/0.1 and with nicaudio 1.x couldn't use avisynth; now it works fine with v2.x. Using avisynth scripts speeds up sincronization tasks :)
Atak_Snajpera
3rd May 2008, 21:03
NicAudio can not decode this AC3
http://www.mediafire.com/?tz0blxwtp9e
Decoding via DirectShowSource (FFDshow Audio) and BassAudio work.
tebasuna51
4th May 2008, 01:24
NicAudio can not decode this AC3
http://www.mediafire.com/?tz0blxwtp9e
Yep, NicAudio decode this ac3 and output 10:54 of 5.1 ... silence :rolleyes:
The problem is first frame (5.1), all parameters are taken from first frame and when second frame arrive is a 2.0 then is filled with silence and so on.
This mix of 5.1 frames and 2.0 are common in TV captures (movie-commercials) and fill with silence this frames is a good idea to maintain the sync but the first frame must be the appropriate.
DelayCut is necesary to examine and repair, see the log:
[Input info]
Bitrate=384
Actual rate=384.000000
Sampling Frec=48000
TotalFrames=20446
Bytesperframe=1536.0000
Filesize=31405056
FrameDuration= 32.0000
Framespersecond= 31.2500
Duration=00:10:54.272
Channels mode=3/2: L+C+R+SL+SR
LFE=LFE: Present
[Target info]
StartFrame=0
EndFrame=20445
NotFixedDelay= 0.0000
Duration=00:10:54.272
====== PROCESSING LOG ======================
Time 00:00:00.000; Frame#= 1. Crc1 error SILENCED: read = 53A4; calculated=DBA7
Time 00:00:00.032; Frame#= 2. Some basic parameters changed between Frame #1 and this frame
Time 00:04:24.192; Frame#= 8257. Some basic parameters changed between Frame #2 and this frame
Time 00:04:24.192; Frame#= 8257. Crc1 error SILENCED: read = A88B; calculated=2088
Time 00:04:24.224; Frame#= 8258. Some basic parameters changed between Frame #8257 and this frame
Number of written frames = 20446
Number of Errors= 5
Like you can see the first frame is 5.1. The message:
"Frame#= 2. Some basic parameters changed"
is a big warning, you need use Delay Start -32 ms to delete the first frame and the fixed ac3 is decoded fine by NicAudio.
There are also another 5.1 frame (8257) but now isn't a problem, is filled with silence.
Underground78
6th June 2008, 18:48
Bug detected and fixed. Thanks for your help.
The problem was a continuous message:
MPEG 1.0 layer II, 384 kbit/s, 48000 Hz stereo
mixed with the audio data only with Bepipe, works fine with BeHappy. A file (common.c in mpg123-lib) send the message to stdout instead stderr.
Please use the new NicAudio.dll v2.0.1 (http://www.codeplex.com/NicAudio)
Hello,
I have a similar problem when I encode using x264 cli an avs script with NicMPG123Source and SoundOut, I have this kind of output :
http://img182.imageshack.us/img182/3425/bugjs7.gif (http://imageshack.us)
I use the last version of NicAudio and SoundOut. If I remove SoundOut the problem disappeares so I don't really know if NicAudio is really guilty ...
Thanks in advance,
Underground78
tebasuna51
6th June 2008, 20:36
Yes, but now the message is in stderr and don't corrupt the audio.
The audio output is ok, you can minimize the window.
In next version I delete the annoying message.
Underground78
6th June 2008, 20:47
Yes, but now the message is in stderr and don't corrupt the audio.
The audio output is ok, you can minimize the window.
In next version I delete the annoying message.
Yes, I know it's not really a big problem except for reading the progress of the encoding so thank you ! :)
Atak_Snajpera
6th June 2008, 23:30
Will we see eac3 support in near future. FFmpeg should have it by now.
tebasuna51
7th June 2008, 01:58
Will we see eac3 support in near future. FFmpeg should have it by now.
We need developers to do the job.
Kurtnoise
24th June 2008, 07:00
seems that the last version has some trouble with wav sources extracted from VirtualDubMod...easy to reproduce : take an AVI file with mp3 as audio track -> extract the audio stream to wav with the tool and then try to transcode it. An error raises unfortunately with the RawWavSource(...). Works fine with WavSource(...) though.
Could you look at this please ?
tebasuna51
24th June 2008, 08:13
seems that the last version has some trouble with wav sources extracted from VirtualDubMod...easy to reproduce : take an AVI file with mp3 as audio track -> extract the audio stream to wav with the tool and then try to transcode it. An error raises unfortunately with the RawWavSource(...). Works fine with WavSource(...) though.
Could you look at this please ?
RawavSource can open uncompressed audio formats and work with wav files extracted with VirtualDub/Mod if the audio is in 'Full Processing Mode' <No compression (PCM)>
When wav files are extracted in 'Direct Stream Output' mode are only wav headers and the compressed stream. Then RawavSource send the message:
unsupported Audio Format
These streams, in wav container, can be open with NicMPG123Source, if mp3, or NicAc3Source if ac3.
EDIT: If these streams are opened with WavSource the default internal decoder is applied, maybe for mp3 can be accepted, but if is ac3 the DRC is applied losing quality.
Kurtnoise
24th June 2008, 12:47
thanks for the confirmation...
tebasuna51
25th September 2008, 11:36
New release NicAudio v2.0.2 (http://www.codeplex.com/NicAudio)
CHANGE LOG
----------
24/09/2008 Tebasuna 2.0.2
- mp3: Anoying message supress.
- ac3: 1MB (at least 13 sec) initial garbage assumed like delay instead reject the file.
Now ac3 delayed with VirtualDub style are delayed acordly (same behaviour than standard players).
- dts: Correct decode more amod+lfeon options instead automatic downmix. Support for padded dts.
Core extraction in DTS HD. Seems work fine with DTS High Res. (CBR),
still in beta stage with DTS Master Audio (VBR) please report any problem.
- rawav: Not needed first parameter, by default assumed ignorelength if > 2GB
Improved w64 support.
Note:
The DTS MA support can be slow:
- At the begining we need scan all the file to know the FrameCount (basic to be managed by AviSynth) because the extra HD frames have variable length.
- When do rewind/forward the method used to locate the exact frames need explore the file from the begining to search the correct position.
- To extract the core from a DTS MA I always recommend use DelayCut before.
stax76
25th September 2008, 11:55
Thanks for the new release, it's very useful for MPEG4 GUIs. Request: something like NicAutoSource accepting all supported source formats and a parameter and function to downmix ac3/dts to stereo would be very useful.
Edit: seems downmix is already supported.
Wilbert
25th September 2008, 20:51
@tebasuna51,
A user doesn't need to agree to the GPL in order to be able to download and use a plugin which is GPLed. I hope you can remove that ...
IanB
26th September 2008, 00:42
Good work :D
But loose the smart arse javavirused download links, i.e. javascript:__doPostBack('ctl00$ctl00$Content$TabContentPanel$Content$ReleasePanelOrderingContainer$ReleaseFilesCtrl$FileList$ctl00$FileNameLink','').
Please provide links that you can Right Click/Save As or wget [paste] with.
Leak
26th September 2008, 09:26
But loose the smart arse javavirused download links
I doubt that's in his control - Codeplex is a site like SourceForge (though it's probably biased towards Windows and .Net) so he has to use what everyone there uses...
Blame ASP.Net for those links - but even then whoever wrote the code for those download pages would have to be out of his mind to have it produce such links...
tebasuna51
26th September 2008, 11:11
I don't understand (and don't want understand) about licenses and don't have a fix space to host.
I used Codeplex because Dimzon use it for BeHappy, but no problem to host NicAudio in Doom or warpenterprises.
Here is the last release and sources (http://www.sendspace.com/file/lrxb8x).
yonta
26th September 2008, 12:18
Thanks for the update!
I tested the new version and here's what I found.
NicMPG123Source("test.mpa", Normalize=1)
NicMPG123Source("test.mpa", Normalize=0)
NicMPG123Source("test.mpa", 1)
NicMPG123Source("test.mpa", 0)
All of the above scripts fail with an error saying "invalid argument to NicMPG123Source".
NicMPG123Source("test.mpa")
This one works.
All ac3/dts/dts-hd/LPCM samples I have seem to work just fine.
Gavino
26th September 2008, 13:05
Normalize is a bool, so you need to say, for example
NicMPG123Source("test.mpa", Normalize=true)
yonta
26th September 2008, 13:38
Normalize is a bool, so you need to say, for example
NicMPG123Source("test.mpa", Normalize=true)
Aah, stupid me!
Thanks for the tip.
Fizick
26th September 2008, 15:20
It is not violation of GPL
tin3tin
24th October 2008, 14:32
Is there a way to force it to read paths with '-' letters?
I'm getting an acces violation error on paths like:
"C:\pa -th\audio.mp3"
tebasuna51
24th October 2008, 17:01
Is there a way to force it to read paths with '-' letters?
I'm getting an acces violation error on paths like:
"C:\pa -th\audio.mp3"
Tested without problem this .avs:
NicMPG123Source("D:\pa -th\audio.mp3")
SoundOut()
Maybe the problem is out of NicAudio.
tin3tin
24th October 2008, 23:19
Well, here NicMPG123Source and mpasource will not load an audiofile with '-' in the path. If I take it out it works.
DirectShowSource works with the '-' in the path.
Could it be ffdshow related(I got that installed).
tebasuna51
25th October 2008, 03:39
Well, here NicMPG123Source and mpasource will not load an audiofile with '-' in the path. If I take it out it works.
DirectShowSource works with the '-' in the path.
Could it be ffdshow related(I got that installed).
Where don't load?
Please put your OS, avs file and app to open the avs file.
ffdshow isn't related.
tin3tin
26th October 2008, 08:32
Strange, now I can't reproduce it(on this computer. I'm using XP sp3 on both my computers, using NicMPG123Source in MPC).
Another thing: I don't get any error messages when NicMPG123Source can't load a file with try ... catch(val).
Is it just me or how is this done properly?
tebasuna51
26th October 2008, 11:07
Another thing: I don't get any error messages when NicMPG123Source can't load a file with try ... catch(val).
Is it just me or how is this done properly?
try... catch() ?
Call you NicMPG123Source from a C# source?
NicAudio is writen in C++, you have the sources available, the error messages go by STDERR.
I'm using XP SP3 also.
tin3tin
26th October 2008, 11:42
The file Error.mp3 is a nonsense txt file with the extention changed to mp3.
err_msg=""
try{
loadplugin("NicAudio.dll" )
NicMPG123Source("Error.mp3")
}
Catch(err_msg) {blankclip(length=1,width=720,height=576,fps=25).Subtitle(err_msg)}
This doesn't produce an error message.
[EDIT: On the "-" faults - I think I've found the reason in a changed behaviour in the wxwidgets textctrl.getlabel function which somehow now doesn't deal properly with those strings and getvalue must be used instead. So sorry about that.]
Gavino
26th October 2008, 13:37
try... catch() ?
Call you NicMPG123Source from a C# source?
try ... catch is an Avisynth script language construct (as well as being found in C# or C++).
NicAudio is writen in C++, you have the sources available, the error messages go by STDERR.
In an Avisynth plugin, it's usual to report errors via the ThrowError function provided by the script environment. Looking at the code of the constructor, I can see that NicMPG123Source does this if it cannot open the input file at all, but not if it contains invalid data.
I would regard that as a bug.
tebasuna51
26th October 2008, 18:41
try ... catch is an Avisynth script language construct (as well as being found in C# or C++).
:eek:
Seems I don't know very much about AviSynth.
Gabino, the AviSynth docs spanish translation is pending, maybe you can help the newbies like me with problems with english language.
In an Avisynth plugin, it's usual to report errors via the ThrowError function provided by the script environment. Looking at the code of the constructor, I can see that NicMPG123Source does this if it cannot open the input file at all, but not if it contains invalid data.
I would regard that as a bug.
Yes, is true, then the best way to see if is a valid mp3 is check Audiolength (clip), must be > 0 for a valid mp3 and = 0 when don't exist a valid mp3 frame.
I can add a new ThrowError exit when vi.num_audio_samples==0 in next release.
Thanks.
tebasuna51
28th October 2008, 10:58
In an Avisynth plugin, it's usual to report errors via the ThrowError function provided by the script environment. Looking at the code of the constructor, I can see that NicMPG123Source does this if it cannot open the input file at all, but not if it contains invalid data.
I would regard that as a bug.
Other NicAudio functions (Ac3, dts) also exit without ThrowError when input file is empty:
if (!StreamLength) { // Dummy audio
...
Info.num_audio_samples = 0;
return;
}
Like you see can be detected with Audiolength(), but do you think I must add a ThrowError here instead the normal Return?.
Gavino
28th October 2008, 14:01
Other NicAudio functions (Ac3, dts) also exit without ThrowError when input file is empty: ...
Like you see can be detected with Audiolength(), but do you think I must add a ThrowError here instead the normal Return?.
I would prefer a ThrowError but I suppose you could argue that a clip with AudioLength = 0 is an accurate description of what you have.
Are there any circumstances where you would actually want to regard such a file as valid and not report an error?
tebasuna51
28th October 2008, 15:57
I'm not the author of this soft and I don't know if is necessary or not.
I also prefer a error with a description than need check AudioLength.
If nobody need this 'Dummy audio' I will add a ThrowError in next release.
tebasuna51
28th October 2008, 18:56
Request: something like NicAutoSource accepting all supported source formats...
Here is a beta to test:
uNicAudio203b.7z
(Edit: the actual uNicAudio v2.0.4 is distributed with the standard NicAudio v2.0.4)
Syntax:
UnicAudioSource("FileName.ext", int "Param1", int "Channels", int "SampleBits")
- A unique function call instead 5 different.
- The bool param in NicMPG123Source now is int. The last parameter order in RAW/LPCM was changed.
- Now we can detect mp3, ac3 (VirtualDub) and dts (dtswav) in wav container and use the appropriate decoder.
edit: included the TrowError mentioned in previous post.
IanB
28th October 2008, 23:11
@tebasuna51,
You should not confuse the trivial but valid empty file i.e. "vi.num_audio_samples==0" with any error conditions.
The accepted error path is to throw an Avisynth exception with a useful text message.
I leave it to you as to whether zero length input files are an error or a zero length clip, but please be consistent. Consider the raw mode type of files without any header will validly be zero length for zero samples.
tebasuna51
29th October 2008, 01:40
You should not confuse the trivial but valid empty file i.e. "vi.num_audio_samples==0" with any error conditions.
The accepted error path is to throw an Avisynth exception with a useful text message.
I leave it to you as to whether zero length input files are an error or a zero length clip, but please be consistent. Consider the raw mode type of files without any header will validly be zero length for zero samples.
No problem for me. You are the boss. :rolleyes:
Remember me when I make a request, like the maskchannels audio property, only to be consistent when output WAVE_FORMAT_EXTENSIBLE headers.
Then when the file is empty we put vi.num_audio_samples==0 but without Error.
When a mp2/mp3 don't have valid frames (Samplecount = 0) we send a ThrowError like when don't found ac3 or dts frames.
Midzuki
21st June 2009, 23:25
Just a "bug report" (sort of): NicMPG123Source() returns an Avisynth error message ("access violation" or something) when trying to open tagged MP3s that contain *images* (the well-known "cover arts"). :( OTOH, BassAudio ignores the ID-tags very well. :)
tebasuna51
22nd June 2009, 00:49
Just a "bug report" (sort of): NicMPG123Source() returns an Avisynth error message ("access violation" or something) when trying to open tagged MP3s that contain *images*
Can you upload a sample, please?
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.