Author Topic: How to change the default (!) parameters for Lame (MP3) audio?  (Read 108 times)

pstein

  • Jr. Member
  • **
  • Posts: 72
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

Jan Gruuthuse

  • Hero Member
  • *****
  • Posts: 5952
Re: How to change the default (!) parameters for Lame (MP3) audio?
« Reply #1 on: June 10, 2018, 03:38:50 PM »
Avidemux: Edit: Save current settings as default.
Should probably do it
« Last Edit: June 10, 2018, 04:25:05 PM by Jan Gruuthuse »

eumagga0x2a

  • Hero Member
  • *****
  • Posts: 1953
Re: How to change the default (!) parameters for Lame (MP3) audio?
« Reply #2 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

Code: [Select]
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.

pstein

  • Jr. Member
  • **
  • Posts: 72
Re: How to change the default (!) parameters for Lame (MP3) audio?
« Reply #3 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"?

eumagga0x2a

  • Hero Member
  • *****
  • Posts: 1953
Re: How to change the default (!) parameters for Lame (MP3) audio?
« Reply #4 on: June 11, 2018, 05:10:31 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.

Quote
Then 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...

Quote
Is 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, my bad).
« Last Edit: June 11, 2018, 05:12:18 AM by eumagga0x2a »