News:

--

Main Menu

BAT won't work

Started by Neonen, July 12, 2013, 08:34:01 AM

Previous topic - Next topic

Neonen

Hello, im trying to convert multiple .mkv datas to .avi with fixed size.

I'm using this .bat:
set avidemux="C:\Program Files\Avidemux 2.6\avidemux.exe"
for %%f in (*.avi) do %avidemux% --load "%%f" --run "H:\test.js" --save "%%f.mp4"


And this is my project data:
#PY  <- Needed to identify #
#--automatically built--

adm = Avidemux()
adm.clearSegments()
adm.addSegment(0, 0, 3487443000)
adm.markerA = 0
adm.markerB = 3487443000
adm.videoCodec("xvid4", "params=2PASS=800", "profile=244", "rdMode=3", "motionEstimation=3", "cqmMode=0", "arMode=0", "maxBFrame=2", "maxKeyFrameInterval=200", "nbThreads=99", "rdOnBFrame=True", "hqAcPred=True", "optimizeChrome=True", "trellis=True")
adm.audioClearTracks()
adm.audioAddTrack(0)
adm.audioCodec(0, "Lame", "bitrate=160", "preset=0", "quality=2", "disableBitReservoir=False");
adm.audioSetDrc(0, 0)
adm.audioSetShift(0, 0,0)
adm.audioAddTrack(1)
adm.audioCodec(1, "copy");
adm.audioSetDrc(1, 0)
adm.audioSetShift(1, 0,0)
adm.setContainer("AVI", "odmlType=1")


If i start the .bat, avidemux starts to change the .mkv to .avi, but does not apply the size rule.
I allso tried the .bat from teh wiki:
set avidemux="set avidemux="C:\Program Files\Avidemux 2.6\avidemux.exe"
set videocodec=Xvid
set audiocodec=MP3
set size=2pass=800
for %%f in (*.mp4) do %avidemux% --video-codec %videocodec% --video-conf %size% --audio-codec %audiocodec% --force-alt-h264 --load "%%f" --save "%%f.avi" --quit

Same problem. :/

Jan Gruuthuse

use latest 2.6.4
Load video. Make your settings for video, filter resize & audio and output format.
From Main menu: File: Tinypy Project: Save As Project
Give sensible name so you recognize what it does. Edit the saved project.py
Now edit the saved tinypy project and remove references to loaded video:
adm.loadVideo("/media/0ToProcess/1TestCurrent/test2.ts")
adm.clearSegments()
adm.addSegment(0, 0, 7760000)
adm.markerA = 0
adm.markerB = 7760000

This will work for videos with the same total of audio tracks. If these differ in amount of audio tracks, you need to make another one for that amount of audio tracks (not audio channels)

this edit project.py (or whatever name you gave it, can now be called from the batch/command line.

Don't mix up things:
in bat you process avi to .mp4
in project you explicitly set output to .AVI

Neonen

Thanks, it works now!  :)