This is an old revision of the document!
ext="mpg" inputFolder="/tmp/ts" #
Small function that converts the file given as parameter, just remuxing it. A file video.in will be converted to video.in.convert.ps
def convert(filein):
fileout=filein+".converted.ps"
print(filein+"=>"+fileout)
if(0 == adm.loadVideo(filein)):
ui.displayError("oops","cannot load "+filein)
raise
adm.save(fileout)
print("Done")
#
# Main
#
ui=Gui()
adm=Avidemux()
adm.audioReset()
adm.audioCodec("copy",28152032)
adm.videoCodec("Copy")
adm.setContainer("ffPS","muxingType=3","acceptNonCompliant=False","muxRatekBits=30000",
"videoRatekBits=25000"," bufferSizekBytes=500")
#
Get the content of the input folder That folder could have been selected using gui.dirSelect() in a graphical mode
list=get_folder_content(inputFolder,ext)
if(list is None):
raise
for i in list:
convert(i)
print("Done")