Quote from: eumagga0x2a on May 01, 2024, 04:31:07 PMAn enhancement to Avidemux to allow user to rotate video preview is possible
Quote from: eumagga0x2a on May 01, 2024, 04:31:07 PMPlease make sure that "Post-Processing" is disabled in Avidemux
Quote from: eumagga0x2a on May 01, 2024, 04:31:07 PMlease also consider using a lossless codec (Ut Video or (FF)HuffYUV) for intermediate steps.
Quote from: tropolite on May 03, 2024, 09:23:30 AMWhat's possibly affected the playback is my update to a 27" 2560x1440 screen.
#PY <- Needed to identify #
adm = Avidemux()
gui = Gui()
# -------- extension recherchée --------
ext = "mkv"
# ----------------
sep = "\\"
def processVideo(vidin, outdir):
if not adm.loadVideo(vidin):
return 0
# -------- Audio Config AC3 stéréo +3 db--------
adm.audioClearTracks()
if adm.audioTotalTracksCount() <= 0:
return 0
adm.audioAddTrack(0)
adm.audioCodec(0, "LavAC3", "bitrate=640")
adm.audioSetResample(0, 48000)
adm.audioSetDrc2(0, 0, 1, 0.001, 0.2, 1, 2, -12)
adm.audioSetEq(0, 0, 0, 0, 0, 880, 5000)
adm.audioSetChannelGains(0, 0, 0, 0, 0, 0, 0, 0, 0, 0)
adm.audioSetChannelDelays(0, 0, 0, 0, 0, 0, 0, 0, 0, 0)
adm.audioSetChannelRemap(0, 0, 0, 1, 2, 3, 4, 5, 6, 7, 8)
adm.audioSetShift(0, 0, 0)
# -------- Video Config --------
# -------- COPY --------
adm.videoCodec("Copy")
# -------- --------
adm.setContainer("MKV", "forceAspectRatio=False", "displayWidth=1280", "displayAspectRatio=2", "addColourInfo=False", "colMatrixCoeff=2", "colRange=0", "colTransfer=2", "colPrimaries=2")
return adm.save(outdir + sep + basename(vidin))
# -------- Choix du dossier source --------
inputFolder = gui.dirSelect("Select source folder")
if inputFolder is None:
gui.displayError("Error", "No source folder selected")
return 0
# -------- read content --------
vidlist = get_folder_content(inputFolder, ext)
if vidlist is None:
gui.displayError("Error", "No " + ext + " files found in \"" + inputFolder + "\"")
return 0
# -------- Choix de la destination --------
outputFolder = gui.dirSelect("Select output folder")
if outputFolder is None:
gui.displayError("Error", "No output folder selected")
return 0
if(inputFolder == outputFolder):
gui.displayError("Error","Output folder cannot be the same as the input one")
return 0
success = 0
for video in vidlist:
success += processVideo(video, outputFolder)
if not success:
gui.displayInfo("Warning", "No video files processed")
elif success == 1:
gui.displayInfo("Finished", "One video out of " + str(len(vidlist)) + " processed")
else:
gui.displayInfo("Finished", str(success) + " videos out of " + str(len(vidlist)) + " processed")
return success
Quote from: sneffel on May 01, 2024, 10:20:22 AMI want original.mp4 to be deleted at the end of the process.
Quote from: sneffel on May 01, 2024, 10:20:22 AMI want a checkbox in the Select File to Save window that would be called "Export the whole video" as opposed to only the time selection. I rarely want to export the selection, it's often just a mistake and I forgot to press Ctrl + Top arrow at the end.
adm = Avidemux()
ed = Editor()
gui = Gui()
if not adm.isFileOpen():
return 0
adm.markerA = 0
adm.markerB = ed.getVideoDuration()
ext = adm.getOutputExtension()
if ext is None:
return 0
outname = gui.fileWriteSelectEx("Select output file", ext)
if outname is None:
return 0
return adm.save(outname)