News:

--

Main Menu

Saving and Loading Saved Profiles ?

Started by pulsarstar, June 19, 2021, 10:44:05 AM

Previous topic - Next topic

pulsarstar

Hi,
I am running Avidemux 2.7.9
on a windows 10 PC.
with a NVIDIA GeForce GTX 1080 Graphic Card.
CPU is a Intel Core i7-8700K.
I have customized All of my video Output settings
and the same for my audio settings.
I wish to save this profile with a given name to use at later date,
On other video titles/films
If I go on Edit I see >Save current settings as default
Or >Load saved settings. Which does nothing if I click on it, as expected as I have not saved anything.
So my question is how do I save my current settings?
I am NOT bothered about the video loaded in.
I just want all the profile setting so I can load them in.

butterw

File > Project Script > Save As Project.

You can open this .py file with a text editor.


 

pulsarstar

Thank you for the answer butterw.
I do use the .py files from menu option >custom.
I have a couple of very simple script files I run.

If I use the Project Scrip option it loads the film/video in with the settings.
What I was wanting is to load just the settings in that I new I wanted to use before
loading the video in.
I guess I am looking for something that is not there ?
Putting that aside,
 can you tell me how to use the menu option >Edit>Load Saved Settings?
on my Windows PC it does nothing if I click my mouse on it.
Also where is the save option? to do the saving to use in this option ?
Thanks.

butterw

You can edit the project script and remove the line that loads the video.

"Save Current Settings as default": will save Settings/defaultSettings.py but it doesn't save much.
ex:   
adm.videoCodec("Copy")
adm.setContainer("MP4"

It's loaded by default when you open Avidemux.


pulsarstar

Thank You butterw.
I had considered that,I thought I might bust the script
by doing that. Now I know I won't
I shall give it go.
Cheers

eumagga0x2a

You need to remove more than the line with the command to load the video. Instead, you need to replace the calls to clearSegments(), addSegment(), setters for markerA and markerB, e.g.

if not adm.loadVideo("/path/to/video"):
    raise("Cannot load /path/to/video")
adm.clearSegments()
adm.addSegment(0, 0, 5000000000)
adm.markerA = 0
adm.markerB = 5000000000

with a check that a video has been loaded:

ed = Editor()
if not ed.nbSegments():
    return

(i.e. if no video is loaded, processing of the project script will be silently aborted).

Please be painstakingly attentive to indentation in Python code, the number of spaces to the left of each code block must match: https://pythonexamples.org/python-indentation/

In doubt, ask.

eumagga0x2a

Quote from: pulsarstar on June 19, 2021, 01:43:23 PMon my Windows PC it does nothing if I click my mouse on it.

Is the expectation of some visual feedback for pretty much everything that strong? We might need a status bar...

butterw

Quote from: eumagga0x2a on June 19, 2021, 11:27:46 PM
Quote from: pulsarstar on June 19, 2021, 01:43:23 PMon my Windows PC it does nothing if I click my mouse on it.

Is the expectation of some visual feedback for pretty much everything that strong? We might need a status bar...
I currently have to turn off info level messages to avoid unecessary pop-ups. Info messages could be printed to a status bar.
and there is plenty of room available in the main toolbar for a status bar label...

pulsarstar

Thank you, eumagga0x2a for the code.
It was much appreciated.
Cheers