Help with command line usage: x264+abr?

Started by Coincident, August 05, 2020, 01:35:29 PM

Previous topic - Next topic

Coincident

Hello.

I need to convert a large amount of videos into MP4 format, using the AVC (x264) codec, with an Encoding Mode of "Average Bitrate (Two Pass)", and with an abr of 6000.
This can easily be done with the graphical interface, but I need to automate the process to make things faster, so I decided to use the command line.

I've read the documentation about command line usage here: https://www.avidemux.org/admWiki/doku.php?id=using:command_line_usage

However, I don't see any option to use the Two Pass ABR encoding mode.
Quote--video-conf
cq=q | cbr=br | 2pass=xx
Select the encoding mode: constant quality (cq=quality), constant bitrate (br=bitrate) or 2 pass mode, in that case, give the final size in megabytes.
The "2pass" option is actually for "Video Size (Two Pass)", which is not what I want.

And even with --video-codec x264, the graphical interface opens up with "Video Output = Copy", so it looks like it didn't work.

This is the command-line that I'm running at the moment:
avidemux.exe --load temp.flv --save-raw-audio --video-codec x264 --video-conf 2pass=6000 --output-format MP4 --save video6k.mp4
"--video-conf 2pass=6000" is obviously wrong, but I don't know how else to use it

Any ideas?

Thank you in advance.

eumagga0x2a

You need to save the encoder configuration to a project script file, then load it as argument of the --run command line option:

avidemux.exe --load temp.flv --run encoderConfig.py --output-format MP4 --save video6k.mp4 --quit

Load a video, configure the x264 encoder plugin as you wish, then File --> Project Script --> Save as project. Then edit the .py file to keep just the commands

adm = Avidemux()

and

adm.videoCodec("x264", ...
, ...
, ...
, etc, ...)


The name of the file doesn't matter, just the path to the file must be valid.

Coincident

Thank you very much!
I managed to get it working just fine.