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 15th February 2004, 12:12   #1  |  Link
kassandro
Registered User
 
Join Date: May 2003
Location: Germany
Posts: 502
Wanted: avs2wav

Avisynth's audio capabilities have improved quite a lot during the last year. Nevertheless, they become more and more useless, because from within VirtualDubMod Avisynth audio can only be processed with an acm codec and the time for acm codec - as far as video processing is concerned - is almost over. If one wants to use vbr or vorbis sound, it is simply better to use a standalone audio encoder and then mux the processed audio with VirtualDubMod or a standalone muxer with the video. That's one reason why VirtualDubMod has switched from an audio menu tailored for acm to much more flexible stream menu. To maintain the usefulness of its audio part should do such a switch as well. A console application is needed, which takes the audio from an avisynth script and generates an ordinary wave file (or pumps it to stdout), which then can be processed further by nearly all audio encoders. Such an application should be easy to do for those folks which are responsible for Avisynth audio and should be packaged with Avisynth. It is very desirable to have such an app, because then one could harness all of Avisynth editing copabilities without worrying about a/v sync.
kassandro is offline   Reply With Quote
Old 15th February 2004, 12:43   #2  |  Link
Richard Berg
developer wannabe
 
Richard Berg's Avatar
 
Join Date: Nov 2001
Location: Brooklyn, NY
Posts: 1,211
Is the source of avs2avi available? That's the most logical starting place. (Unfortunately all the links in the searched threads are dead, and it's not on Doom9's download page.)

Last edited by Richard Berg; 15th February 2004 at 12:53.
Richard Berg is offline   Reply With Quote
Old 15th February 2004, 13:56   #3  |  Link
sh0dan
Retired AviSynth Dev ;)
 
sh0dan's Avatar
 
Join Date: Nov 2001
Location: Dark Side of the Moon
Posts: 3,480
Vdub(Mod) allows you to save the sound as WAV-files - or are you thinking of something else?
__________________
Regards, sh0dan // VoxPod
sh0dan is offline   Reply With Quote
Old 15th February 2004, 14:09   #4  |  Link
Kurtnoise
Swallowed in the Sea
 
Kurtnoise's Avatar
 
Join Date: Oct 2002
Location: Aix-en-Provence, France
Posts: 5,186
Quote:
Originally posted by Richard Berg
Is the source of avs2avi available? That's the most logical starting place. (Unfortunately all the links in the searched threads are dead, and it's not on Doom9's download page.)
I found a link for AVS2avi with the sources : http://daveel.leffe.dnsalias.com/avs2avi-131a.zip . It works fine for me.
Kurtnoise is offline   Reply With Quote
Old 15th February 2004, 14:19   #5  |  Link
kassandro
Registered User
 
Join Date: May 2003
Location: Germany
Posts: 502
Quote:
Originally posted by sh0dan
Vdub(Mod) allows you to save the sound as WAV-files - or are you thinking of something else?
I knew about this possibility and that's the way I have done it a few times, when it was absolutely necessary. But that is not comfortable at all. I would like to have batch processing. For instance, avs2wav should pipe the audio of the avs-script directly into lame, oggenc or whatever encoder, which can read from stdin, avoiding unnecessary hard disk io.
kassandro is offline   Reply With Quote
Old 16th February 2004, 04:10   #6  |  Link
mkanel
Registered User
 
Join Date: Mar 2002
Posts: 109
Goldwave is an audio editor which will open AVS scripts and save to a variety of formats. http://www.goldwave.com/ You can download a trial version.
mkanel is offline   Reply With Quote
Old 28th February 2004, 09:29   #7  |  Link
LB
Registered User
 
Join Date: Feb 2002
Posts: 285
Quote:
Originally posted by kassandro
I knew about this possibility and that's the way I have done it a few times, when it was absolutely necessary. But that is not comfortable at all. I would like to have batch processing.
Batch is easy, with the #1 macro utility in existance - AUTOIT

CODE for your AVS->WAV

Code:
SetEnv, DEL, C:\\FILES\\Delete.exe
SetEnv, VIRT, C:\\FILES\\VirtualDub_Audio\\VirtualDub.exe
SetEnv, BESWEET, C:\\FILES\\BESWEET\\BeSweet.exe
SetEnv, GAIN, C:\\FILES\\Mp3Gain.exe
SetEnv, ALIVE, C:\\FILES\\AliveMedia\\Mp3WavConverter.exe

; --------------------------- USER CONFIG HERE ---------------------------------
SetEnv, DIVXLOCATION, C:\\ShowNameGoesHere\\Divx\\
SetEnv, EPI, C:\\FILES\\Episode.txt
SetEnv, EpStart, Ep01
SetEnv, EpEnd, 20

; ------------------------------ BEGIN LOOP ---------------------------------
RIP:

; ------------------------------ WAV RIP ------------------------------
Run, %VIRT%
WinWaitActive, Virt
Sleep, 1000
Send, {ENTER}
Send, {ALT}{DOWN}{ENTER}
WinWaitActive, Open
Send, %DIVXLOCATION%%EpStart%.avs
Send, {ENTER}
Sleep, 1000
Send, {ENTER}
Send, {ALT}{DOWN}s
WinWaitActive, Save
Send, %DIVXLOCATION%%EpStart%.mp3
Send, {ENTER}
SetTitleMatchMode, 2
WinWaitActive, Status
Send, {TAB}{SPACE}{TAB}{SPACE}
WinWaitClose, Status 
SetTitleMatchMode, 1
WinClose, VirtualDub

; ------------------------------ MP3 Gain ------------------------------
RunWait, %GAIN% /r /k %DIVXLOCATION%%EpStart%.mp3

; ------------------------------ AliveMP3toWAV ----------------------------
RunWait, %ALIVE% %DIVXLOCATION%%EpStart%.mp3 /wav

; ------------------------------ LAME ----------------------------
RunWait, %BESWEET% -core( -input "%DIVXLOCATION%%EpStart%.WAV" -output "%DIVXLOCATION%%EpStart%.AC3" ) -ac3enc( -b 384 )

; -------------------------------- DELETING --------------------------------
RunWait, %DEL%  %DIVXLOCATION%%EpStart%.mp3
RunWait, %DEL%  %DIVXLOCATION%%EpStart%.WAV

; -------------------------------- LOOP -------------------------------------
StringRight, NUMBER, EpStart, 2
IfEqual, TOTAL, %NUMBER%, Goto, Bye
EnvAdd, NUMBER, 1
FileReadLine, EPY, %EPI%, %NUMBER%
StringRight, EPNUM, EPY, 2
SetEnv, EpStart, Ep%EPNUM%
Goto, RIP

; -------------------------------- END --------------------------------------
Bye:
Exit
I whipped this up pretty quick. It should work. Just make sure to have a seperate file called Episode.txt in the proper directory, with:
01
02
03
04
etc

I don't know what exactly you wanted to do so I used just about every step. This current script should rip a MP3 out of a divx file, MP3 gain it so that any other MP3's ripped from that divx file are of equal loudness; then the script does a mp3->wav conversion. I NEVER use lame for this because I always get a crackle when going from 44khz to 48khz in lame, so I figure that's a bug, so use Alive2MP3. It's shareware, but it works A+. Then I tossed in a AC3 conversion, and finally it deletes the files you don't need. Like I said, dunno why you'd need this entire script because the best thing would be to just rip the audio from your DVD directly to AC3, but I wanted to goto the extreme in this script so you have a lot to work with, and can simply delete what you don't want. But yeah, this is your batch processing script.

And, don't let the "episode" connatation fool you. I simply put it like that so you can batch it easy. I guess I could have written another external txt file to hold the different directory names with individual audio components, but that's a hassle. Just use episode connetation and you should be fine.
__________________
1. CPUs:2x2.4_LV @ 3.6 (16x229) 1.5v MB:DH800 HS:E3W-NPTXS-04 CRT:FP2141SB HDs:8x147gbU320 1x36gbU320 2x250gbIDE GPU:X800XT DVDRW:PX-712A PSU:2xAntec 550w CASE:PC-78
2. CPUs:1x2.4A @ 3.0 MB:SFF SB61G2BV3 CRT:KVM(see above) HDs:2x120gb IDE GPU:Ti4600 DVDRW:A107
3. Notebook:T40p

Last edited by LB; 28th February 2004 at 09:33.
LB is offline   Reply With Quote
Old 29th February 2004, 10:41   #8  |  Link
bb
Moderator
 
bb's Avatar
 
Join Date: Oct 2001
Location: Germany
Posts: 2,665
I'd prefer an "audio frameserver", i.e. a tool which makes an AviSynth script pretend to be WAV file, like an AVS file is read as a "fake" AVI file.

So let's say we have an audio exporting AviSynth script, you create a copy of the script with a, let's say "AWS" extension (for "Audio Wave Synth"), and if an application opens the file, the audio frameserver kicks in, reads the audio part of the script and delivers it to the calling application in WAV format.

I've asked that before, but no response unfortunately...

bb
bb is offline   Reply With Quote
Old 29th February 2004, 12:08   #9  |  Link
stickboy
AviSynth Enthusiast
 
Join Date: Jul 2002
Location: California, U.S.
Posts: 1,268
bb:
I too asked something similar awhile back.
stickboy is offline   Reply With Quote
Old 29th February 2004, 13:32   #10  |  Link
mkanel
Registered User
 
Join Date: Mar 2002
Posts: 109
@bb

I hope we eventually see an audio frameserver. In the meantime have you tried opening an avs script with any of your audio tools? I skip an intermediate file by opening my AVS scripts with Goldwave and then filter and normalize before saving. I expect some other audio tools can do this too.

Mike.
mkanel is offline   Reply With Quote
Old 29th February 2004, 13:50   #11  |  Link
bb
Moderator
 
bb's Avatar
 
Join Date: Oct 2001
Location: Germany
Posts: 2,665
mkanel,

no, usually I save the audio via VirtualDub's "Save WAV" command, then I process the audio with BeSweet. Saving the audio alone takes about 15 to 30 minutes, depending on the size of my capture. If it's longer than about two hours, I need to split the audio, because some tools seem to have trouble with large WAV files.

With a WAV frameserver I could immediately hand over the audio from the captured source to BeSweet, which would save me a lot of time (and hdd space, too).

bb
bb is offline   Reply With Quote
Old 29th February 2004, 20:46   #12  |  Link
Kurosu
Registered User
 
Join Date: Sep 2002
Location: France
Posts: 426
I've modified a bit makeAVIS to make it output either uncompressed or AVIS-format (ie with ffVfW as a kind of frameserver) Wave file. Considering it relies a lot on the installed version of the ffvfw codec, I don't plan making it available as a compiled resource. Instead, I've submitted to Milan the new source file. Once it is commited (if ever) and a new build of ffVfW is available, I guess the requests in this thread will be filled.
Kurosu is offline   Reply With Quote
Old 1st March 2004, 05:42   #13  |  Link
timecop
Senior Hater
 
Join Date: Aug 2002
Location: japan
Posts: 118
LB:

(referring to your huge macro post)
That is a horrible solution. That is so wrong on so many levels I don't know where to start complaining about it.
Is this how all these one-click tools that distribute old copies of virtualdub etc work, by just sending them click/key commands to move around menus?

shudder.

I agree, wav frameserver would be kind of nice. actually even better would be something like avs but for audio, so that you can load this "script" into a professional audio encoding application (because not everyone uses besweet and its crappy selection of poor quality encoders).

Oh well, just trying to stay on topic.
timecop is offline   Reply With Quote
Old 1st March 2004, 06:45   #14  |  Link
Richard Berg
developer wannabe
 
Richard Berg's Avatar
 
Join Date: Nov 2001
Location: Brooklyn, NY
Posts: 1,211
Please be careful whom you criticize, especially if you're not offering something better.
Richard Berg is offline   Reply With Quote
Old 1st March 2004, 09:42   #15  |  Link
bb
Moderator
 
bb's Avatar
 
Join Date: Oct 2001
Location: Germany
Posts: 2,665
Quote:
Originally posted by timecop
[...](because not everyone uses besweet and its crappy selection of poor quality encoders)[...]
With a statement like that you disqualify yourself. Don't be surprised if our forum members start skipping your posts, and you don't get answers anymore.

bb
bb is offline   Reply With Quote
Old 1st March 2004, 10:07   #16  |  Link
kassandro
Registered User
 
Join Date: May 2003
Location: Germany
Posts: 502
If a video player or encoder loads a video, it needs the assistance of windows and therefore it cannot treat a video file as a simple binary file. This fact makes video frame servers possible. On the audio side, the situation is very different. The encoders I use, Lame and Oggenc, treat any input is a simple binary byte stream. They do not use any external codec. That makes these encoders very portable across different plattforms, but also these encoders will never use any audio frame server. For my part I would be quite satisfied with a simple console application which takes an avs script as input and pumps the the wave output to stdout. Then I would associate avs scripts with a very simple batch file like the following:
avs2wav %1 | oggenc -o output.ogg -
and I could convert any avs audio with a single right click app selection into an ogg vorbis file. This I would call comfortable and there is no intermediate disk io. The above script of LB tries to automate the vdub method, which we have to use right now.
However, I do not understand, how this script can rip an mp3 audio from an avs script. Obviously this script was made for ripping mp3 audio from a divx avi. Nevertheless I think that such a script solution is possible and of course one can incorporate any command line encoder into such a script. Hence it too can be used for a comfortable "right click" solution, but it is also quite inefficient and generates a lot of intermediate disk io and a system with heavy disk io is not really usable for anything else.
kassandro is offline   Reply With Quote
Old 1st March 2004, 10:48   #17  |  Link
timecop
Senior Hater
 
Join Date: Aug 2002
Location: japan
Posts: 118
Quote:
Originally posted by bb
With a statement like that you disqualify yourself. Don't be surprised if our forum members start skipping your posts, and you don't get answers anymore.

bb
to quote besweet faq,
"ac3enc.dll creates (almost) useless ac3 streams. don't use it to encode things you care for. it's there only for test purposes."
timecop is offline   Reply With Quote
Old 1st March 2004, 10:50   #18  |  Link
timecop
Senior Hater
 
Join Date: Aug 2002
Location: japan
Posts: 118
Quote:
Originally posted by kassandro
On the audio side, the situation is very different. The encoders I use, Lame and Oggenc, treat any input is a simple binary byte stream. They do not use any external codec.
Oh, right I totally did not consider this.
I was still thinking inside video/avs domain where audio inside avi would be handled by acm/directshow.

But you are right, all the commandline/etc encoders/audio processing software will simply read the file as binary, parsing wave header etc.
Sorry, bad idea on my part.
timecop is offline   Reply With Quote
Old 1st March 2004, 15:17   #19  |  Link
bb
Moderator
 
bb's Avatar
 
Join Date: Oct 2001
Location: Germany
Posts: 2,665
Quote:
Originally posted by timecop
to quote besweet faq,
"ac3enc.dll creates (almost) useless ac3 streams. don't use it to encode things you care for. it's there only for test purposes."
You put your statement in a very general form. The single exception of ac3enc doesn't mean that BeSweet targets "poor quality encoders" only, and this single exception doesn't give you the right of telling that BeSweet has a "crappy selection of poor-quality encoders".

There are excellent encoders to be used by BeSweet as well, e.g. Lame, Ogg Vorbis, tooLame.

bb
bb is offline   Reply With Quote
Old 9th March 2004, 02:12   #20  |  Link
jcsston
Matroska Dev
 
jcsston's Avatar
 
Join Date: Sep 2002
Location: Texas, USA
Posts: 230
I posted once to the Audio forum about adding avs input to BeSweet, but it was moved to this thread

So I have made a simple little util avs2wav, didn't think anyone would find it useful. But since finding this thread I uploaded a bin here.
__________________
The Matroska Effect
jcsston 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 07:14.


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