View Full Version : Batch Demux and Remux
quacka
18th June 2008, 15:59
Hi,
I need to swap the audio channel on a bunch of DIVX Karaoke files which i ripped from VCD Karaoke.
There are about 300 of them so doing things manually could be a long time.
I read that Gold wave can do batch Audio Channel Inversion, What application(s) I could use to batch demux the Videos then batch remux them back once I finish processing the audio?
Cheers
setarip_old
18th June 2008, 17:09
I've already provided you with the answers to this in your earlier thread at:
http://forum.doom9.org/showthread.php?p=1149027#post1149027
quacka
19th June 2008, 12:43
Sorry didn't realise i thought there is a quicker tool with DIVX rather then XVID
Anyway is there anyway to rip them all at once rather then using VDUB and export the wav file one at a time?
GodofaGap
19th June 2008, 16:09
VirtualDub can do this with advanced audio filtering. Just create a input > stereo split > stereo merge > output graph (of course put the left channel from split into the right of the merge). You can do batch processing via the joblist. This does require you to decompress the audio so you might have to set a compression as well.
PhillipWyllie
19th June 2008, 19:01
Here's my VBScript that I use for demuxing:
exeName = "Vdub.exe"
exePath = "C:\Program Files\VDub\Vdub1.6.16\"
command = exePath & exeName
'--------intro-----------------------------------------
answer = msgbox("This will write a VirtualDub script to demux the selected video and run it" & chr(13) & "Continue?",4,"Avi Demux")
if answer = 7 Then
wscript.quit
end if
if wscript.arguments.count = 0 Then
answer = msgbox ("You must supply some video(s)!",16,"Avi Demux")
wscript.quit
End If
'------------------------------------------------------
'-------------locating VDub---------------------------
Set objFile = CreateObject("Scripting.FileSystemObject")
If not objFile.FileExists(command) Then
Set objDialog = CreateObject("UserAccounts.CommonDialog")
objDialog.FileName = exeName
objDialog.Filter = "Executable files|" & exeName
objDialog.FilterIndex = 1
objDialog.InitialDir = exePath
intResult = objDialog.ShowOpen
If intResult = 0 Then
Wscript.Quit
Else
command = objDialog.FileName
End If
End If
'----------------------------------------------------
'----------getting demux directory--------------------
Set objShell = CreateObject("Shell.Application")
Set objFolder = objShell.BrowseForFolder(0, "Demux to where?", 0)
If IsValue(objFolder) Then
Else
wscript.quit
End If
Set objFolderItem = objFolder.Self
destdir = objFolderItem.Path
destdir = (destdir & "\")
strWrite = (destdir & "aviDemux.vcf")
destdir = replace(destdir, "\", "/")
'-------------------------------------------------------
'------------building the script-------------------
Set objFSO = CreateObject("Scripting.FileSystemObject")
Set objWriteFile = objFSO.CreateTextFile(strWrite)
for each vid in wscript.arguments
vid = replace(vid, "\", "/")
vid = replace(vid, ".avi", "")
fileName = GetFileName(vid)
objWriteFile.WriteLine "VirtualDub.audio.SetSource(1);"
objWriteFile.WriteLine "VirtualDub.Open(" & """" & vid & ".avi" & """" &",0,0);"
objWriteFile.WriteLine "VirtualDub.audio.SetMode(0);"
objWriteFile.WriteLine "VirtualDub.SaveWAV(" & """" & destdir & fileName & ".wav" & """" & ");"
objWriteFile.WriteLine "VirtualDub.audio.SetSource(0);"
objWriteFile.WriteLine "VirtualDub.video.SetMode(0);"
objWriteFile.WriteLine "VirtualDub.SaveAVI(" & """" & destdir & fileName & ".avi" & """" & ");"
objWriteFile.WriteLine "VirtualDub.Close();"
objWriteFile.WriteLine chr(13)
Next
objWriteFile.close
'--------------------------------------------------
'---------------run the script------------------------
answer = msgbox("I'm going to run the script now..." & chr(13) & "Continue?",4,"Avi Demux")
if answer = 7 Then
wscript.quit
end if
Set objShell = WScript.CreateObject("WScript.Shell")
objShell.Run ("""" & command & """" & " /s " & """" & strWrite & """")
'-----------------------------------------------------
wscript.quit
Function IsValue(obj)
Dim tmp
On Error Resume Next
tmp = " " & obj
If Err <> 0 Then
IsValue = False
Else
IsValue = True
End If
On Error GoTo 0
End Function
Function GetFileName(Path)
tempPath = split(Path, "/")
If Len(tempPath(uBound(tempPath))) > 0 Then
GetFileName = tempPath(uBound(tempPath))
Else
Exit Function
End If
End Function
Description: This will create a vdub script for you that demuxes your avis for you and then run the vdub script. Use with VirtualDub and not Virtualdubmod. Also note that the audio will have a wav header.
Usage: Drag and drop your video onto the vbscript and select a directory to demux to. Make sure all the files are avis, if any are not then the vdub script will quit.
GodofaGap
19th June 2008, 19:12
It's not required to do demuxing for this task.
quacka
20th June 2008, 01:27
Thanks all for your help. I managed to add the filters in and now upto selecting the compression for output. It doesn't seem to list 128kbit 44100mhz, anyway I can add this?
Ranguvar
20th June 2008, 03:09
Get the LAME ACM codec, and compress with that.
quacka
23rd June 2008, 18:04
Thanks All.
I used this script which can load any .VCF file and apply it to whole folder of Files
http://www.ericphelps.com/scripting/samples/VirtualDub/index.html
vBulletin® v3.8.4, Copyright ©2000-2009, Jelsoft Enterprises Ltd.