News:

--

Main Menu

set it to mp3

Started by nekomaru22, September 26, 2020, 02:03:24 AM

Previous topic - Next topic

nekomaru22

I want to set it to mp3.
After save current settings as default
The next time you start it, the Output Format will be mp4.
Audio Output remains Copy.
You cannot view this attachment.You cannot view this attachment.

eumagga0x2a

Avidemux indeed doesn't save audio output configuration because this configuration is created per audio track and it is not guaranteed that a file has one (trying to add an audio track which is not there = crash).

With a future Avidemux nightly, you could save

adm = Avidemux()
gui = Gui()

if adm.audioTotalTracksCount():
    adm.audioClearTracks()
    adm.audioAddTrack(0)
    adm.audioCodec(0, "Lame", "bitrate=192", "preset=0", "quality=2", "disableBitReservoir=False")
    return
gui.displayInfo("Warning", "No audio tracks to add")

as e.g. "MP3.py" in the "custom" subfolder of the Avidemux profile directory (%appdata%\avidemux\custom) and use it from the "Custom" menu. Alternatively, you could append

if adm.audioTotalTracksCount():
    adm.audioClearTracks()
    adm.audioAddTrack(0)
    adm.audioCodec(0, "Lame", "bitrate=192", "preset=0", "quality=2", "disableBitReservoir=False")
    return

to "defaultSettings.py" file in %appdata%\avidemux\ folder. If you want a differnt bitrate, please adjust the code accordingly.

Don't try this with a build compiled before today (Sep. 26) – it won't have audioTotalTracksCount() method I've just added to the interface. Without this check, Avidemux would crash if a video doesn't have an audio track.