Avidemux Forum

Avidemux => Main version 2.6 => Topic started by: TheTooleMan on May 16, 2022, 10:49:15 PM

Title: TinyPy Documentation for Avidemux
Post by: TheTooleMan on May 16, 2022, 10:49:15 PM
I am writing some project scripts to encode several DVD rips and need some information to simplify my code.

Where can I find documentation of methods and properties of Avidemux? In particular, how can I learn the meaning of the three parameters for the AddSegment function? What are the three values that I see in the AddSegment call when I save a project and open the .py file? Also, is there a way to close one input file before opening another? I seem to run out of memory after processing several encoding steps.

Thanks!
Title: Re: TinyPy Documentation for Avidemux
Post by: eumagga0x2a on May 16, 2022, 11:42:59 PM
Quote from: TheTooleMan on May 16, 2022, 10:49:15 PMWhere can I find documentation of methods and properties of Avidemux?

There is no reliable documentation other than the source, unfortunately.

Quote from: TheTooleMan on May 16, 2022, 10:49:15 PMIn particular, how can I learn the meaning of the three parameters for the AddSegment function?

You start here (https://github.com/mean00/avidemux2/blob/master/avidemux_plugins/ADM_scriptEngines/tinyPy/src/binding/adm.admPyClass), then look into the implementation of the function here (https://github.com/mean00/avidemux2/blob/master/avidemux_plugins/ADM_scriptEngines/tinyPy/src/adm_gen.cpp), then into the declaration here (https://github.com/mean00/avidemux2/blob/master/avidemux/common/ADM_editor/include/IEditor.h), where in case of addSegment(int,double,double) the naming of the variables is clear enough: the first one is the number identifying the source video (0 for the first video loaded, 1 for the first appended one and so on), the second is the start time of the segment in microseconds from the zero point of this source video, the last one is the duration of the segment.

Quote from: TheTooleMan on May 16, 2022, 10:49:15 PMAlso, is there a way to close one input file before opening another?

No, but opening another will automatically close the currently loaded one.

Quote from: TheTooleMan on May 16, 2022, 10:49:15 PMI seem to run out of memory after processing several encoding steps.

Does it happen with the latest 2.8.1 nightly? If so, please provide steps to reproduce.
Title: Re: TinyPy Documentation for Avidemux
Post by: TheTooleMan on May 19, 2022, 10:15:04 PM
Thank you for the pointers. I will try the nightly build and see if the crash occurs, then post back.
Title: Re: TinyPy Documentation for Avidemux
Post by: TheTooleMan on June 25, 2022, 05:42:46 PM
Following up, the out-of-memory errors have disappeared. I can only attribute this to the addition of a "#" at the end of the script.  :o
Title: Re: TinyPy Documentation for Avidemux
Post by: butterw on June 27, 2022, 09:43:04 PM
there is a tinyPy function list in this thread:
https://avidemux.org/smif/index.php?msg=90763