Avidemux Forum

Avidemux => Stable branch (2.5) discussion => Topic started by: figo on July 25, 2012, 02:53:50 PM

Title: avidemux2 command line
Post by: figo on July 25, 2012, 02:53:50 PM
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 :)
Title: Re: avidemux2 command line
Post by: Jan Gruuthuse on July 25, 2012, 03:59:09 PM
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.
Title: Re: avidemux2 command line
Post by: figo on July 26, 2012, 05:37:37 PM
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
Title: Re: avidemux2 command line
Post by: figo on July 26, 2012, 05:43:36 PM
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...)!
Title: Re: avidemux2 command line
Post by: Jan Gruuthuse on July 27, 2012, 06:11:14 AM
Glad you sorted this out, hope things workout for you with the TV company.