View Full Version : Input video, output audio?
Jmmsbnd007
8th September 2005, 04:32
This sounds like a real noob question (well, I guess it is...)... I need some way to script (with avisynth, or any other program) a sequence that opens a video file and saves the audio as a seperate .WAV file (better yet, encode them to MP3, but I can do that with LAME I suppose). I have a couple hundred little clips that I recorded merely for the audio, and doing this by hand would be ridiculous. Please help, thank you.
Guest
8th September 2005, 04:48
What kind of "video file" are you talking about?
Jmmsbnd007
8th September 2005, 05:25
Just a standard .avi compressed with a lossless codec with stereo uncompressed WAV sound.
mg262
8th September 2005, 09:46
If you wanted to do it with AVISynth, you would create a batch file that took a file name and
1. Created a one line AVISynth script file, consisting only of AVIsource
2. Called something like this on the script file just created: http://webjory.tripod.com/avisynth/avs2wav.htm
You could then use the for command in the interpreter to invoke that batch file once for each file that you have. (See http://www.microsoft.com/resources/documentation/windows/xp/all/proddocs/en-us/ntcmds_shelloverview.mspx )
For the batch file and AVISynth are rather redundant in this case... if you can find a command-line-supporting program that takes one AVI and extracts the audio from it, you can call it directly using the for command. (Unfortunately, I don't know of something like this.)
Edit: http://agrgic.tripod.com/avi2wav/
sh0dan
8th September 2005, 10:03
Have a look here:
http://66.249.93.104/search?q=cache:OKTg6c8RlrkJ:www.avisynth.org/BatchScripting+site:avisynth.org+avisynth+batch&hl=da&client=firefox-a
(avisynth.org is down, so you are getting a google cache)
For the AVS Script field, use:
AviSource("%filename.avi")
For the Batch File, use something like:
Avs2Wav "%filename.avs" "%filename.wav"
For the Dir Listing, use something like this:
file1
file2
file3
....insert all your files
- with NO extensions.
Press Generate, and you'll be able to download a zip file containing all your AVS files, and a batch file.
Avs2WAV here: http://www.blainehelmick.com/AVS2DVD/
mg262
8th September 2005, 10:34
If you're going with sh0dan's method, you might find it useful to open up the command prompt, go in to the directory with all your files and type
dir *.avi /b > directory.txt
(alternatively from the start menu select run and then type
dir c:\mydirectory\mysubdirectory\*.avi /b > c:\mydirectory\mysubdirectory\directory.txt
changing the directory as appropriate)
Now you can open up the file directory.txt in any text editor and it will have a list of all your video files. You can then use the search and replace to remove the extensions.
Firesurfer
8th September 2005, 11:09
I'm sorry to break this conversation on AviSynth, but isn't the right tool for Jmmsbnd007 something like BesweetGUI in batchmode? It handles avi conveniently and produces high quality mp3s. This would then be the wrong forum of course.
Besweet Homepage (http://dspguru.doom9.net/)
Download Besweet, BesweetGUI and the VobInput plugin for avi support.
Use wizard mode in GUI and enable batch-mode. Drag all your files to the GUI-window, make your settings and go.
for more info you should read the Audio Encoding (http://forum.doom9.org/forumdisplay.php?f=11) forum, especially the BeSweet-FAQ.
Jmmsbnd007
8th September 2005, 20:31
AVI2WAV worked out for me... thanks guys.
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.