User Tools

Site Tools


This is an old revision of the document!

Avidemux Class

Assuming you created an instance with adm=Avidemux()

Loading and saving file


Load the video given as parameter


Append the video given as parameter


Save the video with given name

adm.saveAudio(int track,'fileName')

Save track 'track' as 'fileName'. If an audio codec has been selected for that track, it will used when saving.


Add fileName to the audioTrack pool. It will take the next number. That track is in the pool of available tracks, not in the active track. Use audioAddTrack() to add it.

Getting Video info about loaded file(s)


Return the width of loaded videos


Return the height of loaded videos


Return average frame par second multiplied by 1000 So a 25 fps video will return 25000


Return the video codec as a string, for example 'DX50'

Getting Audio info about loaded file(s)


Return the number of active tracks. That include tracks from the video and added external tracks.

adm.audioEncoding(int track)

Return the audio encoding, as an integer for track track. Common value are 85 for MP3 and 0x2000 for AC3.

adm.audioFrequency(int track)

Return the sampling rate of track track. For example 48000 for a 48 Khz track

adm.audioChannels(int track)

Return the sampling rate of track track. For example 48000 for a 48 Khz track



Purge previously loaded editing

adm.markerA and adm.markerB Set/get the marker position. They are in microseconds

Video Codec

adm.setVideoCodec(codecName, params)

Select codec codecName and set params as params. For example

adm.videoCodec("ffMpeg4", "params=2PASSBITRATE=500", "lavcSettings=:version=2:")

Params are a list of key/value pairs. The params will be checked and must be complete, i.e. include ALL parameters.

adm.changeVideoParam:videoCodecChangeParam(codecName, params)

Change only one or several parameters for codecName. For example, you set all parameters using setVideoCodec
and afterward only change bitrate


Here is the typical beginning of an avidemux tinyPy project

 adm = Avidemux()
 adm.addSegment(0, 0, 33400000)
 adm.markerA = 0
 adm.markerB = 33400000
tinypy/avidemux.1366997374.txt.gz · Last modified: 2013/04/26 19:29 by fx