News:

--

Main Menu

Separators

Started by TheTooleMan, February 06, 2025, 05:25:34 PM

Previous topic - Next topic

TheTooleMan

A script that once worked is not working now. A possible reason is the recent "upgrade" from Windows 10 to 11.

The script is written to loop through a folder, perform a conversion on video files with a certain extension, then save the files to a different folder. The error occurs when the script constructs a file name for sending to the processing routine.

The file name constructed by the script looks like this:

D:/Videos/Input_folder\input_file.mkv

Obviously, tinypy will not accept the inconsistent slashes.

While the "\" is used by Windows in File Explorer and other processes, Avidemux wants to see "/". The GUI functions I call to build the file names use different formatting, apparently.

There must be a way to clear up this inconsistency and specify the preferred formatting. Please enlighten me. Thanks.

eumagga0x2a

Please enlighten me with details (the script which was used, the Avidemux build you were using which should be the latest official known good one which is currently r241212 or a self-compiled build off the latest git master).

TheTooleMan

I am running Avidemux 2.8.1 (220330_6ae3e4b86ab-fflibs 4.4.1)

Let's see if I can attach the .py file...

You cannot view this attachment.

TheTooleMan

By the way, I am seeing the mismatched slashes when I display the variable i in the loop here:

for i in list:
    total += 1
    ui.displayInfo("This is i", i)
    counter += Converter(i, outputFolder)

eumagga0x2a

Please verify first that the problem persists with the Avidemux 2.8.2 nightly build I mentioned above. 2.8.1 release is outright ancient.

Can't inspect the script yet (need a browser which allows disabling HTTP2).

eumagga0x2a

When trying the 2.8.2 nightly, you might need (unsure) to define the variable sep as "\\" instead of "/" as Avidemux now more consistently uses backslashes on Windows.

TheTooleMan

Quote from: eumagga0x2a on February 06, 2025, 08:54:50 PMWhen trying the 2.8.2 nightly, you might need (unsure) to define the variable sep as "\\" instead of "/" as Avidemux now more consistently uses backslashes on Windows.
I tried a few variations on the value of sep such as "\\", "/", "//", etc. And I installed a later release (not 2.8.2) but saw the same results. I will try 2.8.2 nightly and report back.

eumagga0x2a

There hasn't been any release since 2.8.1 yet, just developer builds (which are most of the time less buggy than the release, but not always).

TheTooleMan

Used the nightly build, but still having the same problem as before.

eumagga0x2a

Okay, I'll try to look into it over the weekend.