IPB

Welcome Guest ( Log In | Register )

WAV-->AAC with Quicktime (WIN), convert 500 files with quicktime
spirit303
post Jun 30 2003, 01:26
Post #1





Group: Members
Posts: 8
Joined: 30-June 03
Member No.: 7468



i need help

how do i convert my 500 WAV files into AAC (mp4) with the best quality encoder apple quick time 6.3 for !windows! ?
i don' wanna open each file and export it. it will keep me goin for years !!!

please tell me how to do it

thank u guys
Go to the top of the page
+Quote Post
 
Start new topic
Replies
FrDakota
post Jul 3 2003, 13:51
Post #2





Group: Members
Posts: 128
Joined: 14-June 03
Member No.: 7174



Ok I post it.

Things to know. I made a direct reference to a folder "C:\Test" in the script. That's where I put the wav files.

If an mp4 encoding misses, the script must be stopped (killing wscript in the task manager, or closing the script windows for cscript), the mp4 files must be deleted before relaunching the encoding (not checked for mp4 presence).

I created an empty.mov file in the QuickTime folder (file-new then save), and load it to avoid QT to load web ad.

I used paths with only one "\", but VBScrit would preferer "\\" at some occasions. I'll have to do it later, store the paths to files both ways. One for internal file handling of VBScript (like for mp5) and one addressed to file inserts in QuickTime, because of course QuickTime won't accept paths with "\\".

For foreign accents, maybe I'll have to send the chars 1 by 1, or maybe I use the bad command.

I'm very new to VBScript. So don't flame me biggrin.gif I only tested it with 4 files successive encoding.

Copy the text below and save it in a new text file. Then rename to something like this "encode.vbs"

PS : I forgot to tell that the mp4 encoding will be done with the last settings used in QuickTime.

Also, do NOT do anything when using the script and quit any application that could steal QuickTime's focus. QuickTime is and must stay the frontmost application.

CODE
'Batch QuickTime by frdakota@hotmail.com

Function ShowFolderList(folderspec)
  Dim fso, f, f1, fc, s
  Set fso = CreateObject("Scripting.FileSystemObject")
  Set f = fso.GetFolder(folderspec)
  Set fc = f.Files
  fileCount = 0
  For Each f1 In fc
     s = s & f1.name
     s = s &  chr(13)
     files(fileCount) = Path & "\" & f1.name
     fileCount = fileCount + 1
  Next
  ShowFolderList = s
End Function


Function WavList(Count)
  Dim i, w
  w = 0
  For i = 0 To Count -1
     If LCase(Right(files(i), 3)) = "wav" Then
       Wav(w) = files(i)
       w = w + 1
     End If
  Next
  WavList = w
End Function

Function CallQuickTime(Path)
  Dim fso, mp5
  Set fso = CreateObject("Scripting.FileSystemObject")
  WScript.Sleep 5000
  WshShell.SendKeys "%FO"
  WScript.Sleep 1000
  WshShell.SendKeys "%D"
  WshShell.SendKeys Path
  WScript.Sleep 1000
  WshShell.SendKeys "{ENTER}"
  WScript.Sleep 1000
  WshShell.SendKeys "%FE"
  WScript.Sleep 1000
  WshShell.SendKeys "%E"
 

  mp5 = Left(Path, Len(Path)-3) & "mp5"

  WScript.Sleep 9000

  While fso.FileExists(mp5)
  Wend
 
'The Enter was added in case QuickTime says .wav file already exists, to clear the error.
'I launches playing if all goes well.
  WshShell.SendKeys "{ENTER}"
 
End Function

Dim files(255), fileCount, List, Wav(255), wavCount, Path, ReturnCode

Path = "C:\Test"
List = ShowFolderList( Path )

wavCount = WavList(fileCount)

If wavCount > 0 Then
  Set WshShell = WScript.CreateObject("WScript.Shell")

' One \ so I use ~1
  WshShell.Run("C:\Progra~1\QuickTime\empty.mov")

' Could be coded "C:\\Program Files\\QuickTime\\empty.mov"
  ReturnCode = WshShell.Run("C:\Progra~1\QuickTime\empty.mov", 1, True)
  WScript.Sleep 5000
  WshShell.AppActivate ("empty.mov")
  WScript.Sleep 2000
 
  For i = 0 To wavCount -1
    CallQuickTime(wav(i))
  Next
 
 
Else
  Wscript.Echo("No wav files found.")
End If

Wscript.Quit


This post has been edited by FrDakota: Jul 3 2003, 18:06
Go to the top of the page
+Quote Post

Posts in this topic
- spirit303   WAV-->AAC with Quicktime (WIN)   Jun 30 2003, 01:26
- - rjamorim   You'll have to wait. At the time, there's ...   Jun 30 2003, 01:44
- - FrDakota   I have quite successfully done a VBScript that con...   Jul 3 2003, 12:19
- - richard123   It would be easier to comment on your script if yo...   Jul 3 2003, 13:17
- - FrDakota   Ok I post it. Things to know. I made a direct ref...   Jul 3 2003, 13:51
- - richard123   Perhaps we are using different versions of QT. I...   Jul 3 2003, 15:22
- - Tomb   >how do i convert my 500 WAV files into AAC (mp...   Jul 3 2003, 15:35
- - FrDakota   It strange to send an ESC to QT it should clear a ...   Jul 3 2003, 15:43
- - richard123   I send an escape because sometimes the Edit menu g...   Jul 3 2003, 16:00
- - FrDakota   My problem is that I couldn't find a reference...   Jul 3 2003, 16:33
- - richard123   You appear to be right about AppActivate. I'm...   Jul 3 2003, 18:02
- - FrDakota   I saw you cleaned the unused variables They wer...   Jul 3 2003, 18:34
- - richard123   A number of web sites recommend set fso = nothing....   Jul 3 2003, 19:23
- - FrDakota   QUOTE (richard123 @ Jul 3 2003, 06:22 AM)Perh...   Jul 4 2003, 08:00
- - SentientPC   Great work FrDakota and richard123...looking forwa...   Jul 4 2003, 08:45
- - richard123   Another point I noticed - QT won't open a file...   Jul 4 2003, 09:22
- - SentientPC   QUOTE (richard123 @ Jul 4 2003, 03:22 AM)I...   Jul 4 2003, 09:42
- - FrDakota   (w00t) I finaly found how the infamous ".wav...   Jul 4 2003, 15:57
- - richard123   I had added a delay to the loop CODEWhile fso.Fil...   Jul 4 2003, 16:38
- - c123   Hi When I tried to get this to work, I got a ...   Jul 4 2003, 21:45
- - FrDakota   Well for the script to work QuickTime Pro must be ...   Jul 5 2003, 01:01
- - spoon   I should have something to release either today or...   Jul 5 2003, 09:34
- - c123   QUOTE (FrDakota @ Jul 5 2003, 12:01 AM)Well f...   Jul 5 2003, 10:47
- - c123   Just tried to encode four wav files, and ED:...   Jul 5 2003, 11:03
- - c123   Keep on getting the "file exists already...   Jul 5 2003, 12:00
- - FrDakota   QUOTE (c123 @ Jul 5 2003, 03:00 AM)p.s. on my...   Jul 5 2003, 12:56
- - c123   I doubled the times in the vbs file, and now I can...   Jul 5 2003, 19:18
- - FrDakota   QUOTE (c123 @ Jul 5 2003, 10:18 AM)Only probl...   Jul 5 2003, 21:18
- - FrDakota   To simplify things, here his the full corrected sc...   Jul 6 2003, 07:39
- - jsnx   Thanks for sharing the script. Works good. There...   Jul 6 2003, 16:16
- - SentientPC   Error: see below.   Jul 8 2003, 03:26
- - SentientPC   QUOTE (FrDakota @ Jul 6 2003, 01:39 AM)To sim...   Jul 8 2003, 03:33
- - FrDakota   QUOTE (SentientPC @ Jul 7 2003, 06:33 PM)I ha...   Jul 8 2003, 07:34
- - perplx   Im working on my own front end that uses winapi in...   Jul 8 2003, 19:30
- - spoon   SendMessages? I found the menu handling to be quit...   Jul 8 2003, 23:20
- - perplx   I had to do that too, I wanted add bit rate ect to...   Jul 9 2003, 01:03
- - zeer   this script version works for me with EAC (if you ...   Jul 9 2003, 15:28
- - rpop   I haven't tried using this script, but I'v...   Jul 10 2003, 23:36
- - Nic   As soon as QuickTime 6 came out, I grabbed the SDK...   Jul 11 2003, 00:05
- - perplx   A question for spoon or anyone else that knows. Wh...   Jul 11 2003, 06:33
- - zeer   It seems to get Quicktime api/sdk to work the APP ...   Jul 13 2003, 11:08
- - FrDakota   QUOTE (zeer @ Jul 9 2003, 06:28 AM)CODE While...   Jul 14 2003, 09:42
- - Nic   @zeer: Ahh, I guess that maybe the case. Its a sha...   Jul 14 2003, 09:47
- - spoon   QUOTE (perplx @ Jul 11 2003, 05:33 AM)A quest...   Jul 14 2003, 11:11
- - zeer   2 FrDakota: Nobody is perfect. Actually, the prob...   Jul 14 2003, 14:07
- - zaphod   I've made a tiny Python script which "abu...   Jul 27 2003, 16:12


Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



RSS Lo-Fi Version Time is now: 21st December 2014 - 01:29