I'm using Avidemux 2.7.0 Final (under Ubuntu 17.10 and openSUSE Leap 42.3).
This version doesn't seem to recognise the parameters --audio-codec and --nogui. Is this a know problem?
And is there a up-to-date list of the codec names for --video-codec and --audio-codec? Even "--help" seems to list some codecs that aren't supported by Avidemux 2.7?
btw: I've tried the AppImage and the versions from the Packageman, GetDeb and PPA repositories. All these versions had/have the same behaviours.
--nogui is normally for the Graphic User Interface, when you use avidemux3_qt5 instead of avidemux3_cli in the script. Testing or you find some stuff not working from cli. Let us know what is not working. Devs could have a look at it, and perhaps have a solution for it.
With the GUI make your wanted settings, and save the projectscript: Avidemux Menu: Files: Project Script: Save As Project: 'MyProject.py'
You can get Clues from that script 'MyProject.py' what to use in command line parameter
adm.audioCodec(0, "Opus");
If you are on 64-bit you could try this latest build: dev branch: avidemux Cli/Qt5 2.7.0 64-bit deb on ubuntu HWE 16.04.3 LTS (http://avidemux.org/smif/index.php/topic,17915.0.html)
Hi Jan, thanks for your quick answer!
Quote from: Jan Gruuthuse on September 21, 2017, 01:40:55 PM
--nogui is normally for the Graphic User Interface, when you use avidemux3_qt5
That's the case: "avidemux3_qt5 --nogui ..." won't disable the GUI. Or in other words: I see the GUI even if I use "--nogui".
"--audio-codec" doesn't work at all. For example ...
avidemux3_cli --video-codec Xvid --audio-codec MP3 --load test.mp4 --save out.avi --quit
... won't encode the audio stream in MP3, but leaves it in AC3. I get the following error message:
audio-codec-->1
[32m [audioCodecSetByName] 15:17:51-322 Setting MP3 audio codec for track 0
[m[33m [audioCodecSetByName] 15:17:51-322 Cannot set codec for track 0
I get this error message every time, regardless which codec I use (and it doesn't matter if it's avidemux3_cli or avidemux3_qt5).
Quote from: Jan Gruuthuse on September 21, 2017, 01:40:55 PM
You can get Clues from that script 'MyProject.py' what to use in command line parameter ...
Ah, cool, thanks!
Quote from: Jan Gruuthuse on September 21, 2017, 01:40:55 PM
If you are on 64-bit you could try this latest build: dev branch: avidemux Cli/Qt5 2.7.0 64-bit deb on ubuntu HWE 16.04.3 LTS
Unfortunately I have to stick with the "official" versions. :)
This is not exactly intuitive, but --audio-codec expects not the strings the help suggests but the internal codec name, e.g. Lame (case insensitive) for "MP3 (lame)". I've pushed a patch (https://github.com/mean00/avidemux2/commit/3cbe0fe45a3544ac14bde2d7ecd482112c5d1d9e) to allow also menu names for --audio-codec so that
avidemux3_qt5 --load /path/to/video --audio-codec "MP3 (lame)"
should work in future builds.
To set an audio codec on command line, a video must be already loaded, i.e. the --load option with the path to a video must precede --audio-codec
--nogui just prevents some dialogs from opening. If you don't want GUI at all, use avidemux3_cli.
Can you check if saving mp3 audio is still correct?
Audio saved with MP3 (lame)
MKV:
ID : 2
Format : MPEG Audio
Format version : Version 1
Format profile : Layer 3
Codec ID : A_MPEG/L3
Codec ID/Hint : MP3
Duration : 37s 940ms
Bit rate mode : Constant
Bit rate : 128 Kbps
Channel(s) : 2 channels
Sampling rate : 48.0 KHz
Compression mode : Lossy
Delay relative to video : -60ms
Stream size : 593 KiB (1%)
Default : Yes
Forced : No
DURATION : 00:00:37.896000000
MP4:
ID : 2
Format : MPEG Audio
Format version : Version 1
Format profile : Layer 3
Codec ID : 6B
Duration : 37s 896ms
Bit rate mode : Constant
Bit rate : 128 Kbps
Channel(s) : 2 channels
Sampling rate : 48.0 KHz
Compression mode : Lossy
Stream size : 592 KiB (1%)
Language : unk
Default : Yes
Alternate group : 1
Encoded date : UTC 1904-01-01 00:00:00
Tagged date : UTC 1904-01-01 00:00:00
MP4V2:
ID : 2
Format : MPEG Audio
Format version : Version 1
Format profile : Layer 3
Codec ID : 69
Duration : 37s 872ms
Bit rate mode : Constant
Bit rate : 128 Kbps
Channel(s) : 2 channels
Sampling rate : 48.0 KHz
Compression mode : Lossy
Stream size : 592 KiB (1%)
Title : Stereo
Encoded date : UTC 2017-09-22 04:44:58
Tagged date : UTC 2017-09-22 04:45:00
MPEG-TS:
ID : 257 (0x101)
Menu ID : 1 (0x1)
Format : MPEG Audio
Format version : Version 1
Format profile : Layer 3
Codec ID : 3
Duration : 37s 896ms
Bit rate mode : Constant
Bit rate : 128 Kbps
Channel(s) : 2 channels
Sampling rate : 48.0 KHz
Compression mode : Lossy
Delay relative to video : -60ms
Stream size : 592 KiB (1%)
Sorry, I don't understand your point.
These tracks are all still MP3? Only .mkv has mp3 mentioned?
"MP3" = MPEG 1 layer 3 and is mentioned in all cases.
OK, got confused, good to know it's ok.
Quote from: eumagga0x2a on September 21, 2017, 08:17:34 PM
... --audio-codec expects not the strings the help suggests but the internal codec name, ...
Ha! Great, thanks, it's working now. :) Is this valid for --video-codec and --output-format too? Do they require the internal codec/muxer name?
Quote from: eumagga0x2a on September 21, 2017, 08:17:34 PMTo set an audio codec on command line, a video must be already loaded, i.e. the --load option with the path to a video must precede --audio-codec
After reading the Wiki I thought that too. So at least the examples on this page are wrong?
http://www.avidemux.org/admWiki/doku.php?id=tutorial:batch_processing
Quote from: eumagga0x2a on September 21, 2017, 08:17:34 PM
--nogui just prevents some dialogs from opening. If you don't want GUI at all, use avidemux3_cli.
Ah, thanks!
Quote from: tischuer on September 22, 2017, 10:05:09 PM
Is this valid for --video-codec and --output-format too? Do they require the internal codec/muxer name?
Yes, they do (because only these names are guaranteed to be unique), though in case of video codec and container they mostly match what a user would expect.
QuoteQuote from: eumagga0x2a on September 21, 2017, 08:17:34 PMTo set an audio codec on command line, a video must be already loaded, i.e. the --load option with the path to a video must precede --audio-codec
After reading the Wiki I thought that too. So at least the examples on this page are wrong?
http://www.avidemux.org/admWiki/doku.php?id=tutorial:batch_processing (http://www.avidemux.org/admWiki/doku.php?id=tutorial:batch_processing)
Every time you see "Avidemux 2.5" in an example, just ignore the tutorial. It is almost sure the example is outdated then.