I tried the "Batch Processing Script 2". But the script doens't work at all. The problem ist the "adm" part. Without the "adm" part it works but that is not the idea of a batch.
The Error
Quote
TinyPy:Exception
Exception :error: tokenize
12: adm = Avidemux()
^
BackTrack:
File:py2bc.py, line 51
File:py2bc.py, line 9
File:tokenize.py, line 42
File:tokenize.py, line 13
Quote#
# Load all the files in c:\tmp with .mp4 extension.
# That's it.
#
ext="mp4"
inputFolder="C:/Folder/"
#
def convert(filein):
if(0 == adm.loadVideo(filein)):
ui.displayError("oops","cannot load "+filein)
raise
adm = Avidemux()
print("Done")
#
# Main
#
ui=Gui()
adm=Avidemux()
#
list=get_folder_content(inputFolder,ext)
if(list is None):
raise
for i in list:
convert(i)
print("Done")
I found a Solution for me with Windows 10 and avidemux 2.7.0
Batch File
Quoteset avidemux="C:\Program Files\Avidemux 2.7 - 64 bits\avidemux.exe"
for %%f in (*.m4v) do %avidemux% --load "%%f" --run "C:\Folder\Copy.py" --save "%%~nf.mp4" --quit
tinypy File
Quoteadm = Avidemux()
adm.videoCodec("Copy")
adm.audioClearTracks()
adm.setSourceTrackLanguage(0,"unknown")
adm.audioAddTrack(0)
adm.audioCodec(0, "LavAAC", "bitrate=64");
adm.audioSetDrc(0, 0)
adm.audioSetShift(0, 0,0)
adm.setContainer("MP4", "muxerType=0", "useAlternateMp3Tag=True")
Works for me on Windows 7 with the latest Windows nightly (should work also with 2.7.0 and below) without the batch using the tinypy script posted in http://avidemux.org/smif/index.php/topic,18101.msg82660.html#msg82660 (http://avidemux.org/smif/index.php/topic,18101.msg82660.html#msg82660) and the path adjusted for the particular Windows environment. Slash instead of backslash must be used as path separator.