Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion. Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules. |
18th May 2011, 15:16 | #1 | Link |
Registered User
Join Date: Oct 2008
Posts: 6
|
Invoke AviDemux via command line and script
Hi
I'm writing a UPnP/DLNA server in java, And I need AviDemux to do some ON THE FLY Transcoding. Now I can export the script from AviDemux GUI, and invoked via avidemux2_cli. But I don't know how to pass arguments to the script. For example: I need to change the input file name, segment rang, scale, etc I think I may not need the script, only pure command line will do the job. Still, I don't know how. Thanks |
18th May 2011, 20:41 | #2 | Link |
Software Developer
Join Date: Jun 2005
Location: Last House on Slunk Street
Posts: 13,248
|
You can even combine the script and the command-line
For example make a script that only sets up the encoders and filters and everything, bout does NOT load the source. Them from the CLI load the specific source file, apply the script for all the rest and save the result... See also: http://www.avidemux.org/admWiki/doku...and_line_usage
__________________
Go to https://standforukraine.com/ to find legitimate Ukrainian Charities 🇺🇦✊ |
19th May 2011, 08:47 | #3 | Link |
Registered User
Join Date: Oct 2008
Posts: 6
|
Thanks for the reply
From what I can see, the command line arguments is very limited. Say I have a script, and I want change the max video bitrate based on files. I don't know how to pass/set this value from command line, can I? Regards |
19th May 2011, 08:58 | #4 | Link |
Software Developer
Join Date: Jun 2005
Location: Last House on Slunk Street
Posts: 13,248
|
Set the encoder and the encoder params (like target bitrate) via script. Invoke that script via CLI, after loading the video and before saving the video.
(You can setup the encoder in the GUI as desired, save the project as JS file and copy out the required script lines from the JS file)
__________________
Go to https://standforukraine.com/ to find legitimate Ukrainian Charities 🇺🇦✊ |
19th May 2011, 10:16 | #5 | Link |
Registered User
Join Date: Oct 2008
Posts: 6
|
I'm trying to invoke avidemux in Java, not manually
So I need kind of avidemux script template, each time I call something like "avidemux2_cli --force-alt-h264 --load input.mkv --run MY_SCRIPT --save output.mp4 --quit", I need specific different videobitrate, scale, ratio etc with the same script. I‘also wondered where can I find the full api reference of avidemux script. It seems the wiki doesn't list all of them. For eg, the field of app.audio.targetTrackInfo Thanks |
19th May 2011, 10:49 | #6 | Link | |
Software Developer
Join Date: Jun 2005
Location: Last House on Slunk Street
Posts: 13,248
|
Quote:
Like: echo REQUIRED_PARAMETERS > temp.js avidemux2_cli --force-alt-h264 --load input.mkv --run temp.js --save output.mp4 --quit (Depending what OpSys and Shell you use, the syntax might be a bit different) For parameters missing in the Wiki, you'll have to scan the source code, I guess
__________________
Go to https://standforukraine.com/ to find legitimate Ukrainian Charities 🇺🇦✊ Last edited by LoRd_MuldeR; 19th May 2011 at 10:55. |
|
Thread Tools | Search this Thread |
Display Modes | |
|
|