Avidemux Forum

Avidemux => Windows => Topic started by: pstein on June 10, 2018, 03:35:29 PM

Title: How to change the default (!) parameters for Lame (MP3) audio?
Post by: pstein on June 10, 2018, 03:35:29 PM
Assume I want to re-encode the audio part of a loaded video.
I set in the audio drop down "MP3 (lame)" and then afterwards in "Configure"

ABR, Bitrate=160

It works.
However when I exit and restart later Avidemux again then
- Audio Output is reset to "Copy"
- MP3 (lame) parameters are reset to CBR, bitrate=128

How can I tell Avidemus to always automatically select by default my preferred Audio Output codec and parameters described at the top?

Peter
Title: Re: How to change the default (!) parameters for Lame (MP3) audio?
Post by: Jan Gruuthuse on June 10, 2018, 03:38:50 PM
Avidemux: Edit: Save current settings as default.
Should probably do it
Title: Re: How to change the default (!) parameters for Lame (MP3) audio?
Post by: eumagga0x2a on June 10, 2018, 03:56:41 PM
No, saving current settings as default doesn't save audio codec. The reason is that we configure audio codec per track, and if we don't have a track yet (e.g. we just launched Avidemux and no video is loaded), we crash. As a workaround you could add

if(adm.audioTracksCount()):
    adm.audioCodec(0, "Lame", "bitrate=160", "preset=1", "quality=2", "disableBitReservoir=False");


to defaultSettings.py and reload the default config upon loading a video.
Title: Re: How to change the default (!) parameters for Lame (MP3) audio?
Post by: pstein on June 11, 2018, 03:45:59 AM
Ok, thank you.

At first I searched for the file "defaultSettings.py". It was NOT existing (on my portable Avidemux)
After a while I found out that I have to save at least once the current settings as default to create such a file.

Then I added the suggested lines and after manual (!) loading them the audio settings are set.

However having manually to (re)load these default settings for every new video is uncomfortable and unnecessary

Is there no function "automatically load defaultSettings.py at Avidemux startup"?
Title: Re: How to change the default (!) parameters for Lame (MP3) audio?
Post by: eumagga0x2a on June 11, 2018, 05:10:31 AM
Quote from: pstein on June 11, 2018, 03:45:59 AM
After a while I found out that I have to save at least once the current settings as default to create such a file.

...or just create it right away with a text editor of your liking.

QuoteThen I added the suggested lines and after manual (!) loading them the audio settings are set.

Manual loading = Ctrl+R, not exactly a big deal, but...

QuoteIs there no function "automatically load defaultSettings.py at Avidemux startup"?

They are loaded automatically on Avidemux startup as no video is loaded yet. The suggested addition to defaultSettings.py checks that there is an active audio track first (otherwise Avidemux would crash).

To reload default settings automatically on video load check "Revert to default output settings on video load" in the "User Interface" tab of Avidemux preferences. You will have to wait for a next nightly for this to work right (we were reverting to copy for audio after loading default settings, we should do it as precaution before that, should be fixed by [GUI] Load default settings only after a new video is loaded, not before, do not discard audio encoder configuration provided by the default settings file (https://github.com/mean00/avidemux2/commit/fac01440de9c48a4cbfad3dbcb72cb948b86fcc0), my bad).