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 Usage

Reply
 
Thread Tools Search this Thread Display Modes
Old 30th June 2007, 13:12   #1  |  Link
tin3tin
Registered User
 
tin3tin's Avatar
 
Join Date: Mar 2005
Posts: 365
Audio analyse

I've added support for avisynth post effects to DVD slideshow GUI. And through avisynth support for Free Frame plugins.

Now I wonder is there a way to analyse the audio in avisynth-script in a way that the current frame can be manipulated through the values of the current volume/frequency ect.?
__________________
DVD slideshow GUI(Freeware).
tin3tin is offline   Reply With Quote
Old 1st July 2007, 09:50   #2  |  Link
tin3tin
Registered User
 
tin3tin's Avatar
 
Join Date: Mar 2005
Posts: 365
[Double post - sorry - please delete this post]
__________________
DVD slideshow GUI(Freeware).

Last edited by tin3tin; 1st July 2007 at 10:01.
tin3tin is offline   Reply With Quote
Old 1st July 2007, 09:51   #3  |  Link
tin3tin
Registered User
 
tin3tin's Avatar
 
Join Date: Mar 2005
Posts: 365
This is what I have come up with so far:

I guess that a combination of FrameEvaluate and a new Runtime Function could be the best way to value/volume ect. return values into ex. a Free Frame plugin. Unfortunately I don't know how to code this kind of stuff...

Alternatively another way could be to get sox to analyse a wav file and export to a .dat file. I have to figure out if it is possible to export a value pr. frame, matching the framerate and then use ConditionalReader to read the .dat file into a variable which can be used in ex. a the Free Frame plugin.

Any other idears or ways to get sound to manipulate images?
__________________
DVD slideshow GUI(Freeware).

Last edited by tin3tin; 1st July 2007 at 09:53.
tin3tin is offline   Reply With Quote
Old 2nd July 2007, 11:27   #4  |  Link
tin3tin
Registered User
 
tin3tin's Avatar
 
Join Date: Mar 2005
Posts: 365
Hmm I just came across the audiograph plugin. If I just knew a bit about this c stuff... I guess it wouldn't be that hard to make it return a max value of the waveform of the current frame instead of a clip...

Can anyone help me with this?
__________________
DVD slideshow GUI(Freeware).
tin3tin is offline   Reply With Quote
Old 2nd July 2007, 17:14   #5  |  Link
Wilbert
Moderator
 
Join Date: Nov 2001
Location: Netherlands
Posts: 6,309
Histogram(mode="audiolevels") returns the maximal value on a frame. So the math is already there. It doesn't look that hard to add this to conditional_functions.cpp, but i have no time for it coming two weeks.
Wilbert is offline   Reply With Quote
Old 7th July 2007, 14:54   #6  |  Link
Matrixbob
Registered User
 
Matrixbob's Avatar
 
Join Date: Apr 2007
Location: Italy
Posts: 35
Interesting link:
I need to realize 1 "cut audio"!
__________________
Aiuta la ricerca col tuo PC: >>Calcolo distribuito BOINC.Italy: unisciti anche tu<<
Pių largo č il sorriso, pių affilato č il coltello.
Matrixbob is offline   Reply With Quote
Old 10th July 2007, 14:13   #7  |  Link
Wilbert
Moderator
 
Join Date: Nov 2001
Location: Netherlands
Posts: 6,309
Quote:
Hmm I just came across the audiograph plugin. If I just knew a bit about this c stuff... I guess it wouldn't be that hard to make it return a max value of the waveform of the current frame instead of a clip...

Can anyone help me with this?
If you are still interested, try this avisynth.dll:

Syntax:
AudioMax(channel) # maximal volume in channel (framewise)
AudioMin(channel) # minimal volume in channel (framewise)
AudioRMS(channel) # root mean square volume in channel (framewise)
# channel = 0 means that the max/min/rms is taken over all samples in all channels (framewise)

Usage:
Code:
v = BlankClip(pixel_type="YV12")
a = Tone(type="Triangle", frequency=2, level=0.4)
w = AudioDub(v,a) #.Histogram(mode="audiolevels")
w = ScriptClip(w, "Subtitle(String(AudioMax(1)))")
#w = ScriptClip(w, "Subtitle(String(AudioRMS(0)))")
#w = ScriptClip(w, "Subtitle(String(AudioMin(1)))")
w = w #.ConvertToRGB32.AudioGraph(20)
return w
Note that the values are given in decibels (see also histogram docs for an explanation).
Wilbert is offline   Reply With Quote
Old 13th July 2007, 09:25   #8  |  Link
tin3tin
Registered User
 
tin3tin's Avatar
 
Join Date: Mar 2005
Posts: 365
Will these functions be added to the next avisynth version? :-)

Btw. does anyone else get these errors in MPC(or is it something with my set-up(ffshow - whatever)))?
__________________
DVD slideshow GUI(Freeware).
tin3tin is offline   Reply With Quote
Old 13th July 2007, 22:10   #9  |  Link
Wilbert
Moderator
 
Join Date: Nov 2001
Location: Netherlands
Posts: 6,309
Quote:
It's properly not avisynth which is causing the problem. It's Media Player Classic(even the latest builds). It' doesn't matter if I throw audiograph, histogram or your new functions at it, then it gives me the access violation error mentioned above.
I forgot to ask. Does this also happen with older versions of AviSynth, or only the latest official alpha?
Wilbert is offline   Reply With Quote
Old 15th July 2007, 13:35   #10  |  Link
tin3tin
Registered User
 
tin3tin's Avatar
 
Join Date: Mar 2005
Posts: 365
Yes it seems so. Histogram actually works, but normalize doesn't.

But I'm affraid it might be something in my set-up. Resently Directshowsource doesn't load mp3 anymore properly. FFshow doesn't fix it.

But is it only here these errors with MPC happen?
__________________
DVD slideshow GUI(Freeware).
tin3tin is offline   Reply With Quote
Old 15th July 2007, 18:06   #11  |  Link
tin3tin
Registered User
 
tin3tin's Avatar
 
Join Date: Mar 2005
Posts: 365
Here's some crazy stuff I did with your new functions, DVD slideshow GUI, freeframe.dll and the freeframeplugin: Petebloom.dll.

Audio effects in FLV player

Still haven't found the reason why MPC crashes, when using those sound functions...
__________________
DVD slideshow GUI(Freeware).
tin3tin is offline   Reply With Quote
Old 23rd August 2007, 20:45   #12  |  Link
Wilbert
Moderator
 
Join Date: Nov 2001
Location: Netherlands
Posts: 6,309
@tin3tin,

I created a plugin out of it:

http://www.geocities.com/wilbertdijk...xAudio_v01.zip

The reason that it will not be included in the core (for now) is stability, but IanB is able to explain that better.
Wilbert is offline   Reply With Quote
Old 13th March 2009, 10:40   #13  |  Link
buzzqw
HDConvertToX author
 
Join Date: Nov 2003
Location: Cesena,Italy
Posts: 6,552
check here http://www.64k.it/andres/dettaglio.php?sez=avisynth

BHH
__________________
HDConvertToX: your tool for BD backup
MultiX264: The quick gui for x264
AutoMen: The Mencoder GUI
AutoWebM: supporting WebM/VP8
buzzqw is offline   Reply With Quote
Old 13th March 2009, 14:26   #14  |  Link
tebasuna51
Moderator
 
tebasuna51's Avatar
 
Join Date: Feb 2005
Location: Spain
Posts: 5,400
Quote:
Originally Posted by buzzqw View Post
Warning with BassAudio_Pack in http://www.64k.it/andres/dettaglio.php?sez=avisynth is very outdated and buggy.

Is your site?
__________________
BeHappy, AviSynth audio transcoder, in Doom9 forums. NicAudio, BassAudio, audio decoders.
tebasuna51 is offline   Reply With Quote
Old 13th March 2009, 14:31   #15  |  Link
buzzqw
HDConvertToX author
 
Join Date: Nov 2003
Location: Cesena,Italy
Posts: 6,552
yes

feel free to link me a new pack, i will glady update my site

BHH
__________________
HDConvertToX: your tool for BD backup
MultiX264: The quick gui for x264
AutoMen: The Mencoder GUI
AutoWebM: supporting WebM/VP8
buzzqw is offline   Reply With Quote
Old 13th March 2009, 23:06   #16  |  Link
tebasuna51
Moderator
 
tebasuna51's Avatar
 
Join Date: Feb 2005
Location: Spain
Posts: 5,400
Quote:
Originally Posted by buzzqw View Post
feel free to link me a new pack, i will glady update my site
Here is the last version BassAudio2423.7z

Also some info about NicAudio with confuse names:
Code:
NicAudio_25_dll_20060314.zip Version 1.5  (Dimzon)    2006-03-14
NicAudio_alpha3.zip          Version 1.8? (Nic)       2006-09-01
NicAudio17.zip               Version 1.82 (Nic)       2007-08-13
NicAudio_20070821.zip        Version 1.83 (IanB)      2007-08-21
NicAudio_r201.7z             Version 2.01 (Tebasuna)  2008-04-09
NicAudio_r202.7z             Version 2.02 (Tebasuna)  2008-09-24
Edit: And RaWav.dll included in NicAudio since 2.00
__________________
BeHappy, AviSynth audio transcoder, in Doom9 forums. NicAudio, BassAudio, audio decoders.

Last edited by tebasuna51; 13th March 2009 at 23:11.
tebasuna51 is offline   Reply With Quote
Old 13th March 2009, 18:31   #17  |  Link
Wilbert
Moderator
 
Join Date: Nov 2001
Location: Netherlands
Posts: 6,309
Quote:
Wilbert, your site links to version 01(not working) and not the 02 from above(working).
Thanks! I corrected the link
Wilbert is offline   Reply With Quote
Old 14th March 2009, 10:32   #18  |  Link
buzzqw
HDConvertToX author
 
Join Date: Nov 2003
Location: Cesena,Italy
Posts: 6,552
thanks, added last pack and added version to file name

BHH
__________________
HDConvertToX: your tool for BD backup
MultiX264: The quick gui for x264
AutoMen: The Mencoder GUI
AutoWebM: supporting WebM/VP8
buzzqw is offline   Reply With Quote
Old 24th March 2012, 11:12   #19  |  Link
tin3tin
Registered User
 
tin3tin's Avatar
 
Join Date: Mar 2005
Posts: 365
It seems that the audio related bugs has been solved in Avisynth 2.6, so I've been playing around with Wilbert's minmaxaudio plugin. It works quite well, however once in a while the resulting value drops out of the 0 to -100 DB range and gives a value like -791 and that causes problems because I need values between 0 and 1. I've been using AudioRMS function. Is this a bug?
__________________
DVD slideshow GUI(Freeware).
tin3tin is offline   Reply With Quote
Old 24th March 2012, 14:50   #20  |  Link
Wilbert
Moderator
 
Join Date: Nov 2001
Location: Netherlands
Posts: 6,309
Quote:
It works quite well, however once in a while the resulting value drops out of the 0 to -100 DB range and gives a value like -791 and that causes problems because I need values between 0 and 1. I've been using AudioRMS function. Is this a bug?
Sounds a bug to me. You got a sample clip and script for me?
Wilbert 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 06:44.


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