News:

--

Main Menu

avidemux2 command line

Started by figo, July 25, 2012, 02:53:50 PM

Previous topic - Next topic

figo

Hi! I really need quick help.

I need to convert .mpg files to .mp4. Trough GUI everything works fine, but trough cmd it starts processes and then crashes with message: A program have stopped working.

Here is cmd's I used:

avidemux2_cli --load "viens.mpg" --save "divi.mp4" --output-format mp4 --quit

I tried also with and without "_cli" and "--force-alt-h264" and output to .AVI as in wiki page, but nothing of it works...

I first time face up with command line interface, so any help would be appreciated :)

Jan Gruuthuse

some parameters might be missing? you can test drive with using the gui instead of the _cli
other option is saving the job and use job to set parameters as you would in GUI.
Make all the settings in GUI as you are used to. Save from main menu with save as myjob.py
When job is saved, you need to edit and omit these bold parts, make sure to leave var app = new Avidemux();
Quote//AD  <- Needed to identify//
//--automatically built--
//--Project: /home/jan/Videos/test.py

var app = new Avidemux();

//** Video **
// 01 videos source
app.load("/media/1110/home/jan/Videos/test.mp4");
//01 segments
app.clearSegments();
app.addSegment(0,0,2704);
app.markerA=0;
app.markerB=2703;


//** Postproc **
app.video.setPostProc(0,0,0);

app.video.fps1000 = 49972;

//** Filters **

//** Video Codec conf **
app.video.codec("Copy", "CQ=0", "0 ");

//** Audio **
app.audio.reset();
app.audio.codec("copy",0,0,"");
app.audio.normalizeMode=0;
app.audio.normalizeValue=0;
app.audio.delay=0;
app.audio.mixer="NONE";
app.setContainer("AVI");
setSuccess(1);
//app.Exit();

//End of script

this can then be called from:
avidemux2_cli --force-alt-h264 --load "viens.mpg" --run myjob.py --save "divi.mp4"

This is a sample and will have other content in your saved project.

figo

Hi Jan!

I tried as you suggested, but it doesn't work. I tried everything I could, different file names, settings, .py file settings, avidemux settings etc.

With those settings it works excellent trough

Maybe just command line interface is not working as expected?

I am just stuck,  tomorrow I must submit my program to biggest TV in a country, but I am stuck with such a simple task. Great! I even updated codecs on my pc, but nothing works by CMD

figo

Hey again! Seems it like been working.

Tried some other combinations and success.

Thanks for code above! You saved my job (for what I am not gettin paid...)!

Jan Gruuthuse

Glad you sorted this out, hope things workout for you with the TV company.