Log in

View Full Version : Audio clean-up filters


alexh110
20th October 2008, 16:55
I'm looking for a filter that will attempt to remove mild to moderate audio crackle from a DVD.
The origin of the problem is a slightly mis-tracked hi-fi VHS tape that has been dubbed onto the DVD.

I would ideally like to filter it in real-time as I'm watching it, so a filter that works with SM Player or Media Player Classic would be ideal.

The tracks are also a bit hissy, so a filter to reduce hiss would be useful too.

mikeytown2
20th October 2008, 19:37
SOX (http://sox.sourceforge.net/) has Noise elimination using frequency profiling.
There is an AniSynth plugin (http://forum.doom9.org/showthread.php?t=104792) for SOX.
Load the avs file into MPC and it should playback real time.

other audio filters
http://avisynth.org/mediawiki/External_filters#Audio_Filters

alexh110
21st October 2008, 23:15
Thanks very much, I'll give that a try.

alexh110
22nd October 2008, 13:37
Just another quick question.
I don't really want to rip the DVD to avi, so how can I set the DVD itself as the source file for SOX in the AVS script?

alexh110
22nd October 2008, 14:31
I've now managed to read the DVD directly into the AVS using DirectShowSource; however it won't write a noise profile file for some reason. (Comes out with an access violation error.)

alexh110
22nd October 2008, 16:50
Have now tried it with an avi rip of the DVD; but the same error comes up.
My script is as follows:

AviSource("E:\noise.AVI")
LoadPlugin("soxfilter.dll")
SoxFilter("noiseprof e:\proffile")
convertAudioTo16Bit()


(Where e: is a local hard-drive, and noise.avi is an edited clip from the avi featuring only background noise.)

Once the clip has played through (via WMP or MPC), the following error message is superimposed on the picture:

"CAviStreamSynth System Exception - Access Violation at 0X0, reading from 0X0"

mikeytown2
22nd October 2008, 19:01
I recommend using DGMPGDec for your VOB's
http://neuron2.net/dgmpgdec/dgmpgdec.html

Once the clip has played through (via WMP or MPC), the following error message is superimposed on the picture:

"CAviStreamSynth System Exception - Access Violation at 0X0, reading from 0X0"

Shoot, I think this might have to do with the bug that plagues just about every audio filter. AudioGraph and MinMaxAudio both give the same error.
http://forum.doom9.org/showthread.php?p=1205503#post1205503
The workaround in that thread isn't a viable option. One way you might be able to get around this is to make 3 scripts, one for audio, one for video, and the merged one. Use Avisynth virtual file system and mount the audio and the video, then combine then in the merged one.
http://forum.doom9.org/showthread.php?t=133313

alexh110
22nd October 2008, 19:53
I tried extracting the audio from noise.avi to make noise.wav, then used the following script:

WavSource("E:\noise.wav")
LoadPlugin("soxfilter.dll")
# SoxFilter("vol 2.0")
SoxFilter("noiseprof e:\proffile")
convertAudioTo16Bit()

This time there were no errors; but it didn't produce any file called proffile. So not much use.

Then tried the command line version of Sox, which did produce a file called proffile.
However the noisered function in the AviSynth version of Sox couldn't understand the format of proffile!

Is this because there is no cross-compatibility between sox.exe and soxfilter.dll? If so that's pretty poor!

I didn't really understand your workaround. Could you explain it in more detail?

Why is everything so difficult in AviSynth? I just want something simple that works, without all this hassle!

mikeytown2
22nd October 2008, 20:21
eh screw it...

Use Audacity to process the audio. Use AviSynth to bring the audio back into the video. Play with MPC.
http://audacity.sourceforge.net/

alexh110
23rd October 2008, 14:32
I think that noiseprof and noisered must be broken in the soxfilter.dll. They work well in the command line version, so I might as well use that.

What would be the easiest way to Demux my vob files, then Mux the processed audio track back into a new vob file?

mikeytown2
24th October 2008, 02:33
http://www.videohelp.com/tools/ImagoMPEG-Muxer