Log in

View Full Version : problems with audio processing


gamez
20th January 2006, 13:34
Hello,

I am (probably) slightly misusing AVISYNTH for audio processing. I do so cause I have some trouble with BeSweet and AC3's, but that's another story.

For example, the following script
DirectShowSource("file1.mp3")
correctly plays in media player. And when fed into QuEnc, it produces a perfectly clean AC3 audio file.

Even more, the script
DirectShowSource("file1.mp3")++DirectShowSource("file2.mp3")
allows me to concatenate two mp3's into one AC3.

Now comes my problem. I need to work with parts of audio files. To do so, I think I need to use TRIM, but TRIM expects a video track. I manage to do the expected operation with a script like

AudioDub(BlankClip(length=9999,fps=25),DirectShowSource("file1.mp3")).Trim(f1,t1)++/
AudioDub(BlankClip(length=9999,fps=25),DirectShowSource("file2.mp3")).Trim(f2,t2)
ConvertToYV12

which plays the expected parts correctly in media player.
But now there is a (dummy) video track that so far I was not able to remove. QuEnc now also behaves differently and creates an mpg instead of ac3, which is logical.

As shown in the first two examples, AVISYNTH is able to produce output that has no video but only audio. But is there a way to explicitely remove (suppress) video a posteriori?

Is there another way to TRIM clips w/o video track in AVISYNTH?

Do you have a recommandation on how to produce an ac3 from parts of audio files?


Any help is greately appreciated, thank you.


g.

IanB
20th January 2006, 14:43
@gamez,

Ahem, yes, we have a KillAudio() function but alas we don't have a matching KillVideo() function.

Absence of video is affirmed by Width==0, abusing Crop or Resize may find a loophole to force this, but I expect the range testing code will prevent this.

If you don't mind an intermediate wave file you could use VirtualDub's save Wav feature to strip out the audio track.

Also to increase resolution of your trims increase the FPS of your BlankClips, 1000 FPS will give millisecond resolution.

Ebobtron
20th January 2006, 23:24
gamez,

if your using QuEnc, as of ver 0.61 you may select MPEG-2 Mux Profile no video.

Now if you have video or not only the audio is output or even handled for that matter, is is very quick. try it, but..... if I remember AviSynth 2.56 handles audio only clips, but trim does not work, and QuEnc accepts them.

On QuEnc, if you don't pay attention the audio file will have a mpg or m2v extention but it does work.

gamez
21st January 2006, 21:58
@Ebotron

THANKS!!!
The QuEnc switch "-mpeg2mux novideo" does the trick - thank you so much!!!

gamez.