View Full Version : Wanted: avs2wav
kassandro
15th February 2004, 12:12
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.
Richard Berg
15th February 2004, 12:43
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.)
sh0dan
15th February 2004, 13:56
Vdub(Mod) allows you to save the sound as WAV-files - or are you thinking of something else?
Kurtnoise
15th February 2004, 14:09
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. ;)
kassandro
15th February 2004, 14:19
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.
mkanel
16th February 2004, 04:10
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.
LB
28th February 2004, 09:29
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
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.
bb
29th February 2004, 10:41
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
stickboy
29th February 2004, 12:08
bb:
I too asked something similar awhile back (http://forum.doom9.org/showthread.php?s=&threadid=56147).
mkanel
29th February 2004, 13:32
@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.
bb
29th February 2004, 13:50
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
Kurosu
29th February 2004, 20:46
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.
timecop
1st March 2004, 05:42
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.
Richard Berg
1st March 2004, 06:45
Please be careful whom you criticize, especially if you're not offering something better.
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
kassandro
1st March 2004, 10:07
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.
timecop
1st March 2004, 10:48
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
1st March 2004, 10:50
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.
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
jcsston
9th March 2004, 02:12
I posted once to the Audio forum about adding avs input to BeSweet, but it was moved to this thread (http://forum.doom9.org/showthread.php?s=&threadid=40699) :confused:
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 (http://www.mycgiserver.com/~jcsston/avs2wav-v1.0.zip). :D
kassandro
9th March 2004, 10:20
Your avs2wav is almost what I wanted. I only miss the ability to pump output to stdout in order to pipe it into an encoder without an intermediate wav file. avs2wav should have the following syntax
avs2wav [-n] input.avs [output.wav | -]
Thus, with
avs2wav input.avs - | oggenc -o output.ogg -
avs-audio is directly converted into an ogg vorbis file without an intermediate wav file.
Originally posted by timecop
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.
It's funny how you call it a horrible solution yet you provide no reason why. It is a great solution. Learn to macro what you want, then you aren't stuck when you need to batch something. Maybe it's horrible because it's beyond your comprehension :eek:
NeOff
10th June 2004, 03:30
could someone host this program, I'd like a copy of it if possible. and the link given doesnt seem to work anymore.
Thank you in advance.
E-Male
14th June 2004, 19:39
i second that
jcsston
14th June 2004, 20:44
Originally posted by NeOff
could someone host this program, I'd like a copy of it if possible. and the link given doesnt seem to work anymore.
Thank you in advance.
http://webjory.tripod.com/avisynth/avs2wav.htm
@kassandro: I tried adding stdout support but couldn't get it to work correctly, oggenc would freeze or refuse the input.
E-Male
15th June 2004, 02:10
thx
any chance you'll release the source?
kassandro
16th June 2004, 10:54
Originally posted by jcsston
http://webjory.tripod.com/avisynth/avs2wav.htm
@kassandro: I tried adding stdout support but couldn't get it to work correctly, oggenc would freeze or refuse the input.
That must be problem on your side, because to convert an mp2 file to vorbis I use
C:\programme\audio\lame --mp2input --decode input.mpa - | C:\programme\audio\oggenc -q 2 -o output.ogg -
Thus oggenc accepts wave input from lame.
jcsston
16th June 2004, 17:03
Yes the problem is in my code, oggenc works fine with other programs.
I was saying that it (and lame does too) doesn't work with avs2wav for reasons I'm not sure of.
kassandro
20th June 2004, 13:39
when you copy your wave data to stdout, it may be treated as text output and consequently is messed up by unix/dos conversion. For a discussion of this problem look here (http://www.cs.toronto.edu/~cosmin/TA/prog/sysconf/). I agree with E-male: it would be nice if could also release the source code.
jcsston
25th July 2004, 08:00
I finally got around to upping the source code somewhere. :D
It's a bit of a mess, which is why I didn't initially release the source code it was a quick 1-2 hour hack I put together. As I don't think I'll get around to cleaning it... ;)
SourceForge CVS (http://cvs.sourceforge.net/viewcvs.py/jorydownloader/avs2ogg/)
E-Male
25th July 2004, 09:50
thx
but the link doesn't work :(
kassandro
25th July 2004, 11:13
The link worked for me. But instead of avs2wav I am getting files avs2ogg, but probably that is only a different name.
E-Male
25th July 2004, 11:53
working now
maybe sourceforge was overloaded or something
Wilbert
25th July 2004, 18:06
Has anyone compiled it?
kassandro
25th July 2004, 18:37
Originally posted by Wilbert
Has anyone compiled it?
Yes I did! I couldn't use the project files and the rather obvious definition of the macro SAFE_DELETE_ARRAY was missing. The files generated.cpp and generated.h are superfluous.
If instead of an output wave file "-" is specified on the avs2wav command line, then stdout is taken for output. Unfortunately, encoders did not accept this kind of output, because stdout was not in binary mode (see the discussion above). Now I changed the source to do just this and now oggenc, lame etc. accept the output of avs2wav. Thus monstrous wave files can be avoided. Modified source code and binary can be downloaded from here (http://home.pages.at/kassandro/avs2wav.rar).
BITS
27th July 2004, 02:53
you compiled under .net? if so, do you know off the top of your head if vc6 will compile it(would try but dont have vc6 myself).
jcsston
27th July 2004, 03:17
Originally posted by BITS
you compiled under .net? if so, do you know off the top of your head if vc6 will compile it(would try but dont have vc6 myself).
Yes it should compile with VC6. I used that for the .exe I released. :)
jcsston
27th July 2004, 03:18
Originally posted by BITS
you compiled under .net? if so, do you know off the top of your head if vc6 will compile it(would try but dont have vc6 myself).
Yes it should compile with VC6. I used that for the .exe I released. :)
kassandro: Thanks! I'll commit the changes to CVS :cool:
BITS
27th July 2004, 03:20
nice work friend. my last and only ? about this, do you know of a way at all to do a db boost? usually i do a 2db in oagmachine or whatever. i cannot find that option in oggenc. i found normalize though.
anyways, your avs2avi works great. much appreciation 2 you both.
btw im hyped :-), i too was hoping to get stdout for this.
jcsston
27th July 2004, 05:20
I've added a Gain option, not really a dB adjust as I'm not sure how that works.
avs2wav v1.1 bin (http://prdownloads.sourceforge.net/jorydownloader/avs2wav-v1.1.zip?download)
avs2wav v1.1 src (http://prdownloads.sourceforge.net/jorydownloader/avs2wav-v1.1-src.zip?download)
E-Male
27th July 2004, 11:38
2 questions/suggestions:
1. can support for the besweet.dll be added to this
so it could work like azidts, but taking avs files as input
2. is it possible to use this with 6 channel audio
so when i recut a movie in avisynth i can use the script to recut the 6 channel audio aswell for aac encoding
BITS
27th July 2004, 21:44
the sourceforge mirror(s) dont seem to have the file avail.
nevermind...i finally got it after trying a few times.
thanks for that switch (-g), that should meet all my needs :-).
thanks ALOT!!
BITS
27th July 2004, 22:04
hmm...looks like this new build with the -g, stdout has been lost. the same line im using for this one and your last one...your last one works, this dont.
avs2wav.exe avsfile.avs -g 1.50 - | ....
not working in this build (b3)
avs2wav.exe avsfile.avs - | ...
works in your b2 though.
btw, in besweet i dont even see a option for stdin...does it exist?
E-Male
28th July 2004, 06:25
AFAIK besweet only reads from files
to fead it diretcly you have to use the dll
niiyan
12th August 2004, 17:21
I tried avs2wav-v1.1, but it didn't work.
I used like this:
avs2wav hoge.avs
But I could not play WAV files output by avs2wav. And those WAV files are very small (only a few KB).
The message displayed on the Command Prompt window was like this:
avs2wav v1.1 by Jory Stone <jcsston@toughguy.net>, stdout patch by kassandro
Input: hoge.avs
Output: hoge.avs.wav
Scanning for Audio Stream...
Found Audio Stream
Writing WAV Headers...
Gaining with a factor of 1.0000 ...
Took 0.00 seconds for the writing pass
Avs2wav v1.0 and kassandro's version work well.
matrix
26th September 2004, 17:24
I hope you guys don't mind me reviving this thread.
I try to encode from avs to mp2, but I can't seem to be able to do it without first creating the wav file.
Can it be done anyway?
What I tryed so far is this:
C:\Trial>avs2wav.exe menu.avs - | tooLame -s 48 -d n -c -o -e -b 224 - clip.mp2
--------------------------------------------
Input File : 'stdin' 48.0 kHz
Output File: 'clip.mp2'
224 kbps MPEG-1 Layer II j-stereo Psy model 1
[De-emph:Off Copyright:Yes Original:Yes CRC:On]
[Padding:Normal Byte-swap:Off Chanswap:Off DAB:Off]
--------------------------------------------
avs2wav v1.0 by Jory Stone <jcsston@toughguy.net>
Input: menu.avs
Output: -
Scanning for Audio Stream...
Insufficient PCM input for one frame - fillout with zeros
Hit end of audio data
Avg slots/frame = 672.000; b/smp = 4.67; bitrate = 224.000 kbps
Done
I get an empty mp2 file.
But it seems to me that toolame is kiking in before avs2wav.
If I put toolame on a different line, avs2wav is crashing. I get all kinds of strange characters in the command prompt,
and an annoyng sound. The only way to stop it is to restart the computer.
So how do I make avs2wav to output to stdout?
I tryed all versions I could find, but no luck.
I probbably do something stupid, but what?
I'd really appreciate any help on this.
Regards.
E-Male
26th September 2004, 18:39
these characters andteh beeping are the wave-data
add "> name.wav" to the line to send it to a file
matrix
26th September 2004, 21:25
Thanks for answering E-Male, but can you be a little more specific?
Add that where?
And won't that create a wav file on the computer?
If it does, then I allready can do it just by specifing the names in both avi2wav and toolame.
What I try to do is avoiding the wav creation.
Thank you again, and I hope for some good news.
Regards
matrix
kassandro
27th September 2004, 18:06
I frequently use avs2wav in a similar way as you but with oggenc instead of toolame. Probably you use a too old version of avs2wav. Use version 1.1 or the version for which you can find a link in a previous posting of mine.
matrix
28th September 2004, 00:11
Thank you guys for taking the time to look into this.
I used both versions, and I get the same results.
But anyway, is the command all right?
avs2wav.exe menu.avs - | tooLame -s 48 -d n -c -o -e -b 224 - clip.mp2
The error I'm getting with both versions is the same as in my first post
avs2wav v1.1 by Jory Stone <jcsston@toughguy.net>, stdout patch by kassandro
Input: menu.avs
Output: -
Scanning for Audio Stream...
Insufficient PCM input for one frame - fillout with zeros
Hit end of audio data
If I use like this:
avs2wav.exe menu.avs -g1.5 -
tooLame -s 48 -d n -c -o -e -b 224 - clip.mp2
I get that high pitch beeping sound, and I have to restart the computer.
At first I thought it was a good sign, but it won't stop whatever I do.
Edit.
It must be toolame. I just tryed lame, encoding to mp3, and it worked.
Are there any other mp2 encoders that can take the file from stdout?
Can besweet do it?
kassandro
28th September 2004, 07:58
Before we blame toolame, you should try first
lame --mp2input --decode my.mp3 | tooLame -s 48 -d n -c -o -e -b 224 - clip.mp2
If that doesn't work either, then it is a toolame problem.
In version 1.1 jcsston has added some other feature, which may cause problems (there is at least one report). Have you tried my version of avs2wav as well (the link can be found in this thread).
matrix
28th September 2004, 22:11
I'm sorry to bother you, but I don't get the command you posted. I just copy/paste your syntax, and I get an error from lame I belive, "cannot find my.mp3".
I tryed different ways, but can't get it to work. If I just take the name "my.mp3" ,I get something like:
Error reading headers in mp3 input file -.
Hit end of audio data
Avg slots/frame = -1.#IO; b/smp = -1.#J; bitrate = -1.#IO kbps
This is from avs2wav I guess.
I really appreciate your help, and I don't mean to be a pest, but I still need some help.
Regards.
kassandro
29th September 2004, 23:12
Originally posted by matrix
I'm sorry to bother you, but I don't get the command you posted. I just copy/paste your syntax, and I get an error from lame I belive, "cannot find my.mp3".
I tryed different ways, but can't get it to work. If I just take the name "my.mp3" ,I get something like:
Error reading headers in mp3 input file -.
Hit end of audio data
Avg slots/frame = -1.#IO; b/smp = -1.#J; bitrate = -1.#IO kbps
This is from avs2wav I guess.
I really appreciate your help, and I don't mean to be a pest, but I still need some help.
Regards.
"my.mp3" was only an arbitrary name for an mp3 file you have at hand. I simply wanted to test whether a wave file generated by lame causes the same problems as a wave file generated by avs2wav, when it is piped into toolame.
By the way, if you use something like
avs2wav.exe menu.avs -g1.5 -
tooLame -s 48 -d n -c -o -e -b 224 - clip.mp2
then the output of avs2wav is simply send to the DOS terminal, which is very messy and your pc may be blocked because it cannot cope with this enormous garbage flood.
matrix
30th September 2004, 00:07
"my.mp3" was only an arbitrary name for an mp3 file you have at hand
Yes I thought so.
I tryed many ways, but just doesn't work.
for ex.
lame --mp2input --decode one.mp3 - | tooLame -s 48 -d n -c -o -e -b 224 - one.mp2
is outputting an empty file. For some reason, it doesn't like it from stdin.
If instead, I save it to a file, and open that in toolame, it works.
Input File : 'one.wav' 44.1 kHz
Output File: 'one.mp2'
224 kbps MPEG-1 Layer II j-stereo Psy model 1
[De-emph:Off Copyright:Yes Original:Yes CRC:On]
[Padding:Normal Byte-swap:Off Chanswap:Off DAB:Off]
--------------------------------------------
Insufficient PCM input for one frame - fillout with zeros
Hit end of audio data
Avg slots/frame = 731.429; b/smp = 5.08; bitrate = 224.000 kbps
As you can see, it still gives me that insufficient pcm crap, but it creates the file.
Sorry, you mentioned it couple times, and I forgot to answer.
Yes, I did try your version. But it acts the same way.
I want to thank you again for your support.
And don't worry about it
Regards.
oldchicken
3rd January 2005, 16:22
Im getting similar results as matrix.
@
kassandro
Could you post the syntax your using to output your avs2wav into oggenc, for some reason the pipe seems to be transposed. Oggenc keeps loading up first im using
avs2wav source.avs - | oggenc -b 350 -o audio.ogg
Im sure its something simple, please advice :)
btw im using xp with the latest patches could it be the culprit?
State of Mind
4th January 2005, 07:21
I'd like to use this application once you guys get all the quirks sorted out. I have 111 GBs of HD space and quite a bit of time on my hands, so I've never really desired to have an audio sampleserver (I wouldn't call it a frameserver as there aren't any "frames" in audio) and and I've never had a problem with having a large WAV file being written to my HD. However, it would be more convenient to have an audio sampleserver. Anyway, so a certain code would have to be placed in an AviSynth script in order to specify "serving" to an external audio encoder, wouldn't it? I have always used BeSweet to encode my DVD audio as AC3. I don't like processing audio and video at the same time because the lack of audio allows the media encoder to concentrate entirely on the video; something to do with bitrate control? Am I out on left field on this one? It's moreso what I am used to doing ever since I started making DVDs from my homemade MiniDV sources.
Anyway, so what are the current capabilities of this application? I've download AVS2WAV and the .exe is not even 10 KBs, which is cool. What can I do with it?
kassandro
5th January 2005, 18:02
Originally posted by oldchicken
Could you post the syntax your using to output your avs2wav into oggenc, for some reason the pipe seems to be transposed. Oggenc keeps loading up first im using
avs2wav source.avs - | oggenc -b 350 -o audio.ogg
Im sure its something simple, please advice :)
btw im using xp with the latest patches could it be the culprit?
First make sure that you have the right version of avs2wav. I personally use the one, for which I have posted a link earlier in this thread (it should still be valid). I then use the following batch file (in fact I associate it with AVS-scripts, such that I can launch it with a right click):
set _input_=%1
set _output_=%_input_:.avs=.ogg%
C:\programme\eac\avs2wav %_input_% - | C:\programme\eac\oggenc -Q -m 8 -M 160 -q 2 --resample 44100 -o %_output_% -
C:\programme\eac\ogginfo %_output_%
pause
This script converts any AVS script into an ogg vorbis file, where the ending ".avs" is replaced by ".ogg". Here is a typical example of such a script:
video = mpeg2source("input.d2v")
audio=MPASource("input.mpa", normalize=false)
AudioDub(video, audio)
trim(0,10000)
avs2wav is not fast and you have to be patient, whence I only use it if it is really necessary.
Originally posted by State of Mind
Anyway, so what are the current capabilities of this application? I've download AVS2WAV and the .exe is not even 10 KBs, which is cool. What can I do with it?
The main task of avs2wav is to extract the audio of an AVS script and convert it into a .wav file. Alternatively the output of av2wav can be piped into an encoder to avoid big .wav files. There are some additional features described in this thread.
oldchicken
5th January 2005, 20:58
Ok i tried using that bat file that your using and it doesnt seem to read the avs files for input, in fact avs2wav crashes in the process. Just curious what OS are you using?
oldchicken
5th January 2005, 21:05
Here is what i managed to get from the console
C:\Documents and Settings\frisky>set _input_=
C:\Documents and Settings\frisky>set _output_=.avs=.ogg
C:\Documents and Settings\frisky>C:\mj1\avs2wav - | C:\mj1\oggenc -Q -m 8 -M
160 -q 2 --resample 44100 -o .avs=.ogg -
ERROR: Input file "(stdin)" is not a supported format
C:\Documents and Settings\frisky>C:\mj1\ogginfo .avs=.ogg
Error opening input file ".avs=.ogg": No such file or directory
C:\Documents and Settings\frisky>pause
Press any key to continue . . .
kassandro
6th January 2005, 00:15
Originally posted by oldchicken
Here is what i managed to get from the console
C:\Documents and Settings\frisky>set _input_=
C:\Documents and Settings\frisky>set _output_=.avs=.ogg
C:\Documents and Settings\frisky>C:\mj1\avs2wav - | C:\mj1\oggenc -Q -m 8 -M
160 -q 2 --resample 44100 -o .avs=.ogg -
ERROR: Input file "(stdin)" is not a supported format
C:\Documents and Settings\frisky>C:\mj1\ogginfo .avs=.ogg
Error opening input file ".avs=.ogg": No such file or directory
C:\Documents and Settings\frisky>pause
Press any key to continue . . .
Something must have gone here. All the "%", which are use to denote variables in batch files, are lost, which then results in nonsense.
Let's call my script avs2ogg (that's actually the name I use for it). If you run "avs2ogg my.avs", then the first two lines should look as follows:
C:\Documents and Settings\frisky>set _input_=my.avs
C:\Documents and Settings\frisky>set _output_=my.ogg
What system do you have? I have XP with service pack 1.
oldchicken
6th January 2005, 01:56
kassandro
I have managed to get it working from the command line with ogg2wav source.avs, unfortunately i get this wonderful message
Frame Buffer was too small for AVIStreamRead.
Then it resorts to creating a nice juicy wav for me, which brings great misery and tears of sadness (drama ack drama) at the end of the day i end up with a big wav and no ogg file what to do?
Also I have however been unable to get it to work via a right click when i try that then i get no action at all and those are the results i posted previously
By the way i am using xp with pack 2
kassandro
6th January 2005, 16:51
Originally posted by oldchicken
kassandro
I have managed to get it working from the command line with ogg2wav source.avs, unfortunately i get this wonderful message
Frame Buffer was too small for AVIStreamRead.
Then it resorts to creating a nice juicy wav for me, which brings great misery and tears of sadness (drama ack drama) at the end of the day i end up with a big wav and no ogg file what to do?
Also I have however been unable to get it to work via a right click when i try that then i get no action at all and those are the results i posted previously
By the way i am using xp with pack 2
You probably have a too old version of avs2wav. The version I use can be downloaded from here (http://home.pages.at/kassandro/avs2wav.rar).
oldchicken
7th January 2005, 00:39
Yes sir you are correct looks like i was using an old version. I downloaded so many versions i guess i ended up confusing myself. Thanks for the assist, i finally got it working now :)
Only thing is i cant figure out how you pulled off the nifty trick of being able to do it with a right click. I have it setup in xp as an option to open avs files with the bat but i get no love. Any suggestions there?
Thanks again for your help! :D
raymod2
4th January 2006, 06:10
You probably have a too old version of avs2wav. The version I use can be downloaded from here (http://home.pages.at/kassandro/avs2wav.rar).
@kassandro: I just noticed a problem with avs2wav. When I use the following command I get a pop at the end of the clip:
avs2wav filter.avs - | faac -o audio.mp4 -
But if I use a 2-step process with an intermediate WAV file I do not get the pop:
avs2wav filter.avs audio.wav
faac -o audio.mp4 audio.wav
Is it possible some extraneous data is getting passed through standard input that doesn't belong in the output file?
tebasuna51
5th January 2007, 12:40
avs2wav don't work for me.
I test avs2wav.rar, from kassandro's post, who say me:
"Don't found MSVCP70.dll"
After search and put MSVCP70.dll I get:
avs2wav v1.0 by Jory Stone <jcsston@toughguy.net>
Input: d:\Programa\Audio\0\Audio.avs
Output: -
Scanning for Audio Stream...
Found Audio Stream
Using stdout for WAV Output
Writing WAV Headers...
Scanning...
And I am still waiting the end.
Using Ctrl-C to stop the program I have a file with the correct DataLength expected but without data.
I found avs2wav-v1.1.zip, this version say me:
avs2wav v1.1 by Jory Stone <jcsston@toughguy.net>, stdout patch by kassandro
Input: d:\Programa\Audio\0\Audio.avs
Output: -
Scanning for Audio Stream...
Found Audio Stream
Using stdout for WAV Output
Writing WAV Headers...
Gaining with a factor of 1.0000 ...
Took 0.00 seconds for the writing pass
And end, but the output file is always empty: a wav header with 0 data and DataLength = 0.
Bepipe works without problems for me.
MatMaul
5th January 2007, 13:39
same problem than tebasuna51 for me
vlada
5th January 2007, 13:50
I downloaded AVS2WAV from http://home.pages.at/kassandro/avs2wav.rar and then I downloaded msvcr70.dll and MSVCP70.DLL libraries. And I created AC3 without any problems using following command
avs2wav.exe "input.avs" - | aften.exe -b 224 -s 1 -m 1 -w 45 -dnorm 27 - "output.ac3"
Pookie
5th January 2007, 13:52
Look for sh0dan's new SoundOut plugin - a cool replacement for the hit and miss avs2wav.exe and the .net reliant Bepipe.exe
http://forum.doom9.org/showthread.php?t=120025
tebasuna51
5th January 2007, 14:16
I downloaded AVS2WAV from http://home.pages.at/kassandro/avs2wav.rar and then I downloaded msvcr70.dll and MSVCP70.DLL libraries. And I created AC3 without any problems using following command
avs2wav.exe "input.avs" - | aften.exe -b 224 -s 1 -m 1 -w 45 -dnorm 27 - "output.ac3"
Downloaded also msvcr70.dll and using kassandro/avs2wav.rar (v1.0) the process never end, using v1.1 empty output.
@Pookie, I also wait the sh0dan's new SoundOut plugin.
LoRd_MuldeR
21st May 2011, 11:12
Sorry for digging out an old thread, but I recently made a stripped-down and clean-up version of avs2wav (http://home.pages.at/kassandro/avs2wav.rar), which can be found here:
http://code.google.com/p/mulder/source/browse/trunk/Utils/avs2wav#avs2wav%2Favs2wav
It now also supports Unicode filenames. Well, at least in theory. For some reason AVIFileOpenW() will succeed with Unicode file names (even if the file does not exist), but will then fail to find any streams (even if the file does exist). At least this was my experience on Windows 7. Nonetheless Unicode names for the output Wave are no problem...
BTW: I also had a look at the "native" Avisynth API, which I would prefer over the VFW interface, but it seems there is no Unicode support at all. Or does it handle UTF-8 strings? :confused:
[UPDATES]
2011-05-22: Now using GetShortPathName() internally, which should solve the problem with Unicode file names most of the time.
2011-05-24: Now the application throws a warning, if the Wave file could not be finalized correctly or if the final size exceeds the 4 GB limit.
Gavino
21st May 2011, 13:50
I also had a look at the "native" Avisynth API, which I would prefer over the VFW interface, but it seems there is no Unicode support at all. Or does it handle UTF-8 strings? :confused:
See the thread (ongoing over the last 5 years, and still not fully resolved)
Foreign Language characters in filenames (http://forum.doom9.org/showthread.php?t=110467)
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.