Avidemux Forum

Avidemux => Windows => Topic started by: AviFan on August 17, 2023, 11:16:39 PM

Title: New feature.
Post by: AviFan on August 17, 2023, 11:16:39 PM
Hello!

Please, add this simple features:

Please make .log file with time, when you join more files.

Example:
Video 1 - 00:00:00.000 Starts
Video 2 - 00:05:00.300
Video 3 - 00:10:00.500
Video 4 - 00:00:00 etc...
Video 5 - 00:00:00
Video 6 - 00:00:00

When you opened many files for joint - simply add right click
on the time line and "save timestamps as .log"...

And inside will be:
Video 1 - 00:00:00.000 Starts
Video 2 - 00:05:00.300
Video 3 - 00:10:00.500
etc...

Or check the picture:
(https://i.ibb.co/n01F01q/Untitled.png)
Title: Re: New feature.
Post by: eumagga0x2a on August 18, 2023, 04:38:27 PM
This (just without exporting as a text file, but generating text to copy and paste) should be possible more or less with existing tinyPy scripting capabilities.

Please clarify the use case / the purpose of the exercise, I don't see any.
Title: Re: New feature.
Post by: eumagga0x2a on August 18, 2023, 04:41:11 PM
(I'll post a script later, looks quite straightforward for me)
Title: Re: New feature.
Post by: eumagga0x2a on August 18, 2023, 11:07:31 PM
ed = Editor()
gui = Gui()

def timeToString(time):
    time += 499
    time /= 1000
    time = int(time)
    ms = time % 1000
    time = int(time / 1000)
    ss = time % 60
    time = int(time / 60)
    mm = time % 60
    hh = int(time / 60)
    plaintext = ""
    if hh < 10:
        plaintext += "0"
    plaintext += str(hh) + ":"
    if mm < 10:
        plaintext += "0"
    plaintext += str(mm) + ":"
    if ss < 10:
        plaintext += "0"
    plaintext += str(ss) + "."
    if ms < 100:
        plaintext += "0"
    if ms < 10:
        plaintext += "0"
    plaintext += str(ms)
    return plaintext

numberOfSegments = ed.nbSegments()
if not numberOfSegments:
    return 0

msg = ""
i = 0
linearTime = 0
while i < numberOfSegments:
    msg += "Segment " + str(i + 1)
    msg += " video " + str(ed.getRefIdxForSegment(i) + 1)
    msg += " start linear: " + timeToString(linearTime)
    linearTime += ed.getDurationForSegment(i)
    msg += " offset in ref: " + timeToString(ed.getTimeOffsetForSegment(i)) + "\n"
    i += 1

gui.displayInfo("Segment layout", msg)
return numberOfSegments

Save it as a text file with ".py" as extension instead of ".txt" and put it into the "custom" subfolder of the Avidemux profile directory (%appdata%\avidemux) for easy access. The only unpleasant side effect is that Avidemux always rewinds to the start of the video upon execution of a script. This is done for safety.

I do see benefits in making it easier to snapshot the current state of editing (not the "log" thing however).
Title: Re: New feature.
Post by: AviFan on August 19, 2023, 01:16:00 AM
Thank you, working.
But please add "copy", because I can't copy this information!

(https://i.ibb.co/KbH2Nww/Untitled12.png)

I use this option, when I make the best moments of me - in some games.
But I will use for everything when I join videos. This option will be
helpful for many youtubers and not only to them...

PS: All screenshots will be auto deleted after 3 months.
Title: Re: New feature.
Post by: eumagga0x2a on August 19, 2023, 06:15:38 AM
Quote from: AviFan on August 19, 2023, 01:16:00 AMBut please add "copy", because I can't copy this information!

Hmm, I cannot check at the moment – on macOS, the text in a QMessageBox::information, the type of dialog used by Avidemux for such popups, can be selected with the mouse, then copied to clipboard from the context menu of the selection (not by Command+C keyboard shortcut). If you add

print(msg + "\n")
on a new line after

gui.displayInfo("Segment layout", msg)
but before the line with

return numberOfSegments
you should be able to copy everything from the end of the Avidemux log file (the real one) %localappdata%\avidemux\admlog.txt which, on Windows, you can open in the default text editor via "Help" --> "Advanced" menu in Avidemux. If this works, you could simply delete the line with the gui.displayInfo() command responsible for the popup alltogether (in this case you don't need "gui = Gui()" either, of course) if you can do without visual feedback when running the script.
Title: Re: New feature.
Post by: AviFan on August 19, 2023, 10:20:59 AM
My best moments are from 1-3 long, and I have many - 30-40 and more...
But the program only detect 14, all other are missing...
From my screenshot you see the limit:
Quote"Segment 14 video 14 start linear: 00:20:24.065 offset in ref: 00:0"

And when I copy the information is not in order like from the screen.
Segment 1 video 1 start linear: 00:00:00.000
Segment 2 video 2 start linear: 00:00:00.000
Segment 3 video 3 start linear: 00:00:00.000
etc...

When I copy they looks like this:
Quote---------------------------
Info
---------------------------
<big><b>Segment layout</b></big><br><br>Segment 1 video 1 start linear: 00:00:00.000 offset in ref: 00:00:00.000<br>Segment 2 video 2 start linear: 00:01:49.983 offset in ref: 00:00:00.000<br>Segment 3 video 3 start linear: 00:02:53.983 offset in ref: 00:00:00.000<br>Segment 4 video 4 start linear: 00:03:48.983 offset in ref: 00:00:00.000<br>Segment 5 video 5 start linear: 00:05:04.983 offset in ref: 00:00:00.000<br>Segment 6 video 6 start linear: 00:06:24.033 offset in ref: 00:00:00.000<br>Segment 7 video 7 start linear: 00:07:48.033 offset in ref: 00:00:00.000<br>Segment 8 video 8 start linear: 00:09:12.033 offset in ref: 00:00:00.000<br>Segment 9 video 9 start linear: 00:11:16.049 offset in ref: 00:00:00.000<br>Segment 10 video 10 start linear: 00:13:13.049 offset in ref: 00:00:00.000<br>Segment 11 video 11 start linear: 00:15:13.049 offset in ref: 00:00:00.000<br>Segment 12 video 12 start linear: 00:17:13.049 offset in ref: 00:00:00.000<br>Segment 13 video 13 start linear: 00:18:45.065 offset in ref: 00:00:00.000<br>Segment 14 video 14 start linear: 00:20:24.065 offset in ref: 00:0
---------------------------
OK 
---------------------------

Not in order...
Title: Re: New feature.
Post by: eumagga0x2a on August 19, 2023, 10:40:11 AM
The maximum length of a message in a popup in Avidemux is limited to 1024 characters (https://github.com/mean00/avidemux2/blob/fb71273738ebec62afed3928586037a8ed9145c2/avidemux_core/ADM_coreUI/src/DIA_coreToolkit.cpp#L23), formatting tags included.

If copy of text selection in the Windows version of QMessageBox includes formatting tags, this means that you should just use admlog.txt and use the popup (if at all) only to notify yourself that segment layout has been dumped to admlog.txt:

print(msg)
gui.displayInfo("Segment layout", "Human-readable list of segments has been written to Avidemux log file")
return numberOfSegments

Use

print(msg + "\n")
if you want an extra line break after the list of segments, else the simpler version above is sufficient.
Title: Re: New feature.
Post by: AviFan on August 19, 2023, 01:50:14 PM
Possible to change this long and not needed information:

Segment 1 video 1 start linear: 00:00:00.000 offset in ref: 00:00:00.000
To this:
Just...

Video 1 - 00:00:00.000
Video 2 - 00:00:00.000
Video 3 - 00:00:00.000

When remove this parts
"Segment 1 video 1 start linear:"
"offset in ref: 00:00:00.000".

The message in the popup will looks better,
and that will increase the number of characters,
and will fit more videos. And the admlog.txt will be used only
when working with many short clips. For long clips around 10-20,
the popup message will be excellent!

 8)
Title: Re: New feature.
Post by: AviFan on August 19, 2023, 04:42:55 PM
This time I add 18 long files 10-30 mins and the program
cut them to the 14 and inside the admlog.txt

[Script] Tinypy INFO - Segment 1 video 1 start linear: 00:00:00.000 offset in ref: 00:00:00.000
Segment 2 video 2 start linear: 00:13:36.246 offset in ref: 00:00:00.000
Segment 3 video 3 start linear: 00:20:54.227 offset in ref: 00:00:00.000
Segment 4 video 4 start linear: 00:45:08.704 offset in ref: 00:00:00.000
Segment 5 video 5 start linear: 01:02:28.166 offset in ref: 00:00:00.000
Segment 6 video 6 start linear: 01:22:46.861 offset in ref: 00:00:00.000
Segment 7 video 7 start linear: 01:48:36.371 offset in ref: 00:00:00.000
Segment 8 video 8 start linear: 02:13:09.065 offset in ref: 00:00:00.000
Segment 9 video 9 start linear: 02:24:10.962 offset in ref: 00:00:00.000
Segment 10 video 10 start linear: 02:44:01.191 offset in ref: 00:00:00.000
Segment 11 video 11 start linear: 03:07:49.969 offset in ref: 00:00:00.000
Segment 12 video 12 start linear: 03:31:01.946 offset in ref: 00:00:00.000
Segment 13 video 13 start linear: 03:52:06.957 offset in ref: 00:00:00.000
Segment 14 video 14 start linear: 04:06:28.336 offset in ref: 00:
[Script] Tinypy INFO -

Please make possible when you click on "Append", the "shift"
to work. Now is not possible to select all the files in one time.
You need to click 20 times if you need to open 20 files!
And please make, the files to be added in the same order
like the folder. To add from the first to to last. Not from
the last to the first.
Title: Re: New feature.
Post by: sark on August 19, 2023, 05:28:34 PM
Quote from: AviFan on August 19, 2023, 04:42:55 PMPlease make possible when you click on "Append", the "shift"
to work. Now is not possible to select all the files in one time.
You need to click 20 times if you need to open 20 files!
And please make, the files to be added in the same order
like the folder. To add from the first to to last. Not from
the last to the first.

To import multiple files, open the directory they reside in, select all files, place your cursor on the first file, and drag them onto the Avidemux window.

Files must be in the correct order in the directory, and you must drag over with the cursor on the first file. If you drag from the third file, that will be the file that appears first in Avidemux, followed by four, then five, and so on.

Title: Re: New feature.
Post by: AviFan on August 19, 2023, 05:44:33 PM
Quote from: sark on August 19, 2023, 05:28:34 PM
Quote from: AviFan on August 19, 2023, 04:42:55 PMPlease make possible when you click on "Append", the "shift"
to work. Now is not possible to select all the files in one time.
You need to click 20 times if you need to open 20 files!
And please make, the files to be added in the same order
like the folder. To add from the first to to last. Not from
the last to the first.

To import multiple files, open the directory they reside in, select all files, place your cursor on the first file, and drag them onto the Avidemux window.

Files must be in the correct order in the directory, and you must drag over with the cursor on the first file. If you drag from the third file, that will be the file that appears first in Avidemux, followed by four, then five, and so on.



Thanks, this trick works!
You just save me 1 million clicks until the end of this year!

 ;D

(https://i.ibb.co/9ycBjk3/Untitled3.png)
Title: Re: New feature.
Post by: eumagga0x2a on August 19, 2023, 06:05:12 PM
Quote from: AviFan on August 19, 2023, 04:42:55 PMThis time I add 18 long files 10-30 mins and the program cut them to the 14 and inside the admlog.txt

I bet you hasn't made the changes to the script I told you to do.

(Else I will look into length limit of print() output, sure).
Title: Re: New feature.
Post by: AviFan on August 19, 2023, 07:30:24 PM
I change 10 times my settings, but with no results.
Same limit of 14 videos in the .txt file.

ed = Editor()
gui = Gui()

def timeToString(time):
    time += 499
    time /= 1000
    time = int(time)
    ms = time % 1000
    time = int(time / 1000)
    ss = time % 60
    time = int(time / 60)
    mm = time % 60
    hh = int(time / 60)
    plaintext = ""
    if hh < 10:
        plaintext += "0"
    plaintext += str(hh) + ":"
    if mm < 10:
        plaintext += "0"
    plaintext += str(mm) + ":"
    if ss < 10:
        plaintext += "0"
    plaintext += str(ss) + "."
    if ms < 100:
        plaintext += "0"
    if ms < 10:
        plaintext += "0"
    plaintext += str(ms)
    return plaintext

numberOfSegments = ed.nbSegments()
if not numberOfSegments:
    return 0

msg = ""
i = 0
linearTime = 0
while i < numberOfSegments:
    msg += "Segment " + str(i + 1)
    msg += " video " + str(ed.getRefIdxForSegment(i) + 1)
    msg += " start linear: " + timeToString(linearTime)
    linearTime += ed.getDurationForSegment(i)
    msg += " offset in ref: " + timeToString(ed.getTimeOffsetForSegment(i)) + "\n"
    i += 1

gui.displayInfo("Segment layout", msg)
print(msg + "\n")
gui.displayInfo("Segment layout", "Human-readable list of segments has been written to Avidemux log file")
gui.displayInfo("Segment layout", msg)
return numberOfSegments
Title: Re: New feature.
Post by: eumagga0x2a on August 19, 2023, 07:49:01 PM
Please try the latest available 2.8.2 nightly first. I'll check the maximum length of print() output when able.
Title: Re: New feature.
Post by: eumagga0x2a on August 19, 2023, 08:13:49 PM
By the way, the easiest workaround if print() (or the length of a string) is limited to 1024 characters would be issuing one print() call for each segment, i. e. inside the while-loop. Of course, this implies that you don't try to display segment layout in a pop-up.
Title: Re: New feature.
Post by: AviFan on August 19, 2023, 08:33:00 PM
ATTENTION to all Avidemux users,
never, I repeat NEVER ignore this message!

Codec or codec settings across a cut point do not match.
Playback of the video saved in copy mode may stop at this point.
Do you want to continue anyway?

All my recording are AVC, from soon I start to record in HEVC!

I add 9 AVC files with one HEVC file, and now my video not working.
But only not working this part with the HEVC codec. All others works.

So sad. :) This was my lesson!

If try to convert AVC <---> HEVC need to wait 10-20 mins.
This never gonna happen. :)
Title: Re: New feature.
Post by: sark on August 19, 2023, 10:18:05 PM
This is a nice little script. I don't know python, but it wasn't too difficult to amend as follows:

Segment layout

Clip1 00:00:00.000
Clip2 00:00:05.160
Clip3 00:00:10.320

Couldn't figure out how to pad with a zero, as below. What should I be looking at.

Clip01
Clip02
Clip03

My adjusted code:

msg = ""
i = 0
linearTime = 0
while i < numberOfSegments:
    msg += "Clip" + str(i + 1)
    msg += " " + timeToString(linearTime)
    linearTime += ed.getDurationForSegment(i)
    msg += " " + "\n"
    i += 1
Title: Re: New feature.
Post by: eumagga0x2a on August 19, 2023, 10:26:37 PM
AviFan, please stick with the subject. It is obvious that warnings displayed during editing are not for fun.

Yes, we are limited to 1024 characters in print() from tinyPy to Avidemux log. Please use

ed = Editor()
gui = Gui()

def timeToString(time):
    time += 499
    time /= 1000
    time = int(time)
    ms = time % 1000
    time = int(time / 1000)
    ss = time % 60
    time = int(time / 60)
    mm = time % 60
    hh = int(time / 60)
    plaintext = ""
    if hh < 10:
        plaintext += "0"
    plaintext += str(hh) + ":"
    if mm < 10:
        plaintext += "0"
    plaintext += str(mm) + ":"
    if ss < 10:
        plaintext += "0"
    plaintext += str(ss) + "."
    if ms < 100:
        plaintext += "0"
    if ms < 10:
        plaintext += "0"
    plaintext += str(ms)
    return plaintext

numberOfSegments = ed.nbSegments()
if not numberOfSegments:
    return 0

i = 0
linearTime = 0
while i < numberOfSegments:
    msg = "Seg " + str(i + 1)
    msg += " video " + str(ed.getRefIdxForSegment(i) + 1)
    msg += " start: " + timeToString(linearTime)
    linearTime += ed.getDurationForSegment(i)
    msg += " offset: " + timeToString(ed.getTimeOffsetForSegment(i))
    print(msg)
    i += 1

gui.displayInfo("Segment layout", "Human-readable list of segments has been written to Avidemux log")
return numberOfSegments

as workaround.

Indeed, text in alert dialogs we show on Windows cannot be selected, will consider adding copy-to-clipboard functionality which might be universally useful.
Title: Re: New feature.
Post by: AviFan on August 20, 2023, 12:35:00 PM
sark:

I have nothing to say - except a big thank you.
Works exactly as I wanted!

eumagga0x2a:

Sorry, but my warning is not for fun - it is real.
After 1 year and more, now I understand I lost small part of some videos.
Because, when I make video with Avidemux - I delete my original source,
and keep only the joined file. I just ignore this message because when
I play my video and it worked, but I didn't know that there will be a
problem when I mix two different codecs - those some parts of the video
are without picture - only audio.

Your last script again have problems, but sark works fine!

[Script] Tinypy INFO - Seg 1 video 1 start: 00:00:00.000 offset: 00:00:00.000
[Script] Tinypy INFO -

[Script] Tinypy INFO - Seg 2 video 2 start: 00:01:12.000 offset: 00:00:00.000
[Script] Tinypy INFO -

[Script] Tinypy INFO - Seg 3 video 3 start: 00:02:47.983 offset: 00:00:00.000
[Script] Tinypy INFO -

[Script] Tinypy INFO - Seg 4 video 4 start: 00:04:51.983 offset: 00:00:00.000
[Script] Tinypy INFO -

[Script] Tinypy INFO - Seg 5 video 5 start: 00:06:24.983 offset: 00:00:00.000
[Script] Tinypy INFO -

[Script] Tinypy INFO - Seg 6 video 6 start: 00:07:28.983 offset: 00:00:00.000
[Script] Tinypy INFO -

[Script] Tinypy INFO - Seg 7 video 7 start: 00:09:15.983 offset: 00:00:00.000
[Script] Tinypy INFO -

[Script] Tinypy INFO - Seg 8 video 8 start: 00:11:24.982 offset: 00:00:00.000
[Script] Tinypy INFO -

[Script] Tinypy INFO - Seg 9 video 9 start: 00:13:00.982 offset: 00:00:00.000
[Script] Tinypy INFO -

[Script] Tinypy INFO - Seg 10 video 10 start: 00:14:37.982 offset: 00:00:00.000
[Script] Tinypy INFO -

[Script] Tinypy INFO - Seg 11 video 11 start: 00:15:24.982 offset: 00:00:00.000
[Script] Tinypy INFO -

[Script] Tinypy INFO - Seg 12 video 12 start: 00:16:47.982 offset: 00:00:00.000
[Script] Tinypy INFO -

[Script] Tinypy INFO - Seg 13 video 13 start: 00:17:42.982 offset: 00:00:00.000
[Script] Tinypy INFO -

[Script] Tinypy INFO - Seg 14 video 14 start: 00:19:14.982 offset: 00:00:00.000
[Script] Tinypy INFO -

[Script] Tinypy INFO - Seg 15 video 15 start: 00:20:50.982 offset: 00:00:00.000
[Script] Tinypy INFO -

[Script] Tinypy INFO - Seg 16 video 16 start: 00:23:01.981 offset: 00:00:00.000
[Script] Tinypy INFO -

[Script] Tinypy INFO - Seg 17 video 17 start: 00:24:15.981 offset: 00:00:00.000
[Script] Tinypy INFO -

[Script] Tinypy INFO - Seg 18 video 18 start: 00:25:35.031 offset: 00:00:00.000
[Script] Tinypy INFO -

[Script] Tinypy INFO - Seg 19 video 19 start: 00:27:19.031 offset: 00:00:00.000
[Script] Tinypy INFO -

[Script] Tinypy INFO - Seg 20 video 20 start: 00:29:07.031 offset: 00:00:00.000
[Script] Tinypy INFO -

sark looks better:
[Script] Tinypy INFO - Clip1 00:00:00.000
Clip2 00:01:12.000
Clip3 00:02:47.983
Clip4 00:04:51.983
Clip5 00:06:24.983
Clip6 00:07:28.983
Clip7 00:09:15.983
Clip8 00:11:24.982
Clip9 00:13:00.982
Clip10 00:14:37.982
Clip11 00:15:24.982
Clip12 00:16:47.982
Clip13 00:17:42.982
Clip14 00:19:14.982
Clip15 00:20:50.982
Clip16 00:23:01.981
Clip17 00:24:15.981
Clip18 00:25:35.031
Clip19 00:27:19.031
Clip20 00:29:07.031

But huge thanks to both of you for your help!
I never believed that my problem was solved
with just one script and not a whole new version
of the program!
Title: Re: New feature.
Post by: sark on August 20, 2023, 01:09:38 PM
@AviFan

Good to see you have it working for your needs. However, I should point out, none of the script was mine. It was all eumagga0x2a's work. Beyond my capabilities. I just removed what I didn't need.

@eumagga0x2a

Just to clarify a couple of points as I'm on Windows. I can right click the pop up to Select All, then either use the same context menu to Copy, or use the Ctrl+C keys. Also, my play cursor remains in the same position when running the script. It will happily continue from this position when I hit the Play button. Have not tested with other scripts though.

Thanks for your efforts.
Title: Re: New feature.
Post by: eumagga0x2a on August 20, 2023, 03:55:27 PM
Quote from: AviFan on August 20, 2023, 12:35:00 PMSorry, but my warning is not for fun - it is real.

AviFan, we seem to read and write two very different English languages as you got me all wrong, but nevermind.

Segment layouts where all segments reference different videos and always start at zero in reference time are special case not applicable to everyone (or rather, such layouts are probably a rare exception), thus I didn't deem it acceptable to drop offset info.

Emitting empty lines (i.e. containing only the prefix) from print() calls in scripts should be fixed now, bothered me all the time.

sark, thank you for your observation regarding selectability of text in info dialogs on Windows, I'll recheck it later. I expected it to work like on macOS and Linux where I can select text in dialogs with the mouse just fine, thus temporary blindness when being very tired ;D

Quote from: sark on August 20, 2023, 01:09:38 PMAlso, my play cursor remains in the same position when running the script. It will happily continue from this position when I hit the Play button.

This is the case when running scripts via the scripting shell, but not when executing them from a file.
Title: Re: New feature.
Post by: sark on August 20, 2023, 05:12:17 PM
Quote from: eumagga0x2a on August 20, 2023, 03:55:27 PM
Quote from: sark on August 20, 2023, 01:09:38 PMAlso, my play cursor remains in the same position when running the script. It will happily continue from this position when I hit the Play button.

This is the case when running scripts via the scripting shell, but not when executing them from a file.

Just to clarify. I can add the .py file to the Custom folder and run from the Custom menu without the play cursor moving. Same situation if I input the script directly into the scripting shell (under Tools menu).
I only mention this because you suggested return to start was a safety feature... Is my system going to burst into 🔥🔥🔥flames🔥🔥🔥 ;D
Title: Re: New feature.
Post by: AviFan on August 20, 2023, 05:27:50 PM
eumagga0x2a,

Yes, you are right, it is not your guilt, my english is bad!
Someday (I hope...) to be perfect like your's!

(https://www.en.kolobok.us/smiles/artists/laie/Laie_25.gif)

sark,
Maybe I'm wrong, but I have a feeling you'll find this script useful too.

Just today is a great and very happy day for me!
(https://www.en.kolobok.us/smiles/artists/phil/phil_04.gif)
(https://www.en.kolobok.us/smiles/artists/cherna/Cherna-cannon.gif)

eumagga0x2a, sark
(https://www.en.kolobok.us/smiles/icq/drinks.gif)
Title: Re: New feature.
Post by: eumagga0x2a on August 20, 2023, 09:13:17 PM
Quote from: sark on August 20, 2023, 05:12:17 PMJust to clarify. I can add the .py file to the Custom folder and run from the Custom menu without the play cursor moving.

You are right, it is just the recent scripts menu which routes the call through a common routine responsible for running scripts passed to the application on command line. This routine rewinds after executing a script.

Menu actions in the list of custom scripts and in "File" --> "Project Script" --> "Run Project", implemented inside the Qt GUI, indeed don't rewind, probably hoping that the user is mindful.

Quote from: sark on August 20, 2023, 05:12:17 PMI only mention this because you suggested return to start was a safety feature... Is my system going to burst into 🔥🔥🔥flames🔥🔥🔥 ;D

Probably not the system, but it is trivially easy to crash Avidemux as scripting in Avidemux is very powerful and invalidating the current state is always possible. Now we can even close video via script, which might defeat even rewinding ;D
Title: Re: New feature.
Post by: sark on August 20, 2023, 10:01:04 PM
Quote from: AviFan on August 20, 2023, 05:27:50 PMsark,
Maybe I'm wrong, but I have a feeling you'll find this script useful too.

Just today is a great and very happy day for me!

Not wrong at all, very useful... And when you reach my age, every day is a great day.  ;)
Title: Re: New feature.
Post by: eumagga0x2a on August 22, 2023, 09:43:20 PM
Quote from: sark on August 20, 2023, 01:09:38 PMI can right click the pop up to Select All

Could you please provide information about Avidemux build type (MinGW or VC++) and version as well as about Windows version? This definitely doesn't work with Qt 5.15.x on Windows 11.

Regarding the script, please remove the line

    time += 499
to avoid mismatch with time display in Avidemux which always rounds time down, not to the nearest millisecond.
Title: Re: New feature.
Post by: sark on August 22, 2023, 10:26:33 PM
About.jpg


Info.jpg 


Select All.jpg

Downloaded latest portable (zip) nightly from:
https://www.avidemux.org/nightly/win64/
Avidemux_230710_win64qt5_154.zip

I'm running Windows 7 Pro SP1. 64 bit.

Also, I need to right click on the text (or very close) in the pop up.

Sark
Title: Re: New feature.
Post by: szlldm on August 23, 2023, 11:31:04 PM
Instead of
gui.displayInfo("Segment layout", msg)you can try (in case of the latest nightly build)
dialog = DialogFactory("Segment layout")
t = DFText("Text:")
t.value = msg
dialog.addControl(t)
dialog.show()
The text will be hard to read, but easy to copy (CTRL+A then CTRL+C)
Title: Re: New feature.
Post by: sark on August 24, 2023, 05:03:11 PM
Quote from: szlldm on August 23, 2023, 11:31:04 PMInstead of
gui.displayInfo("Segment layout", msg)you can try (in case of the latest nightly build)
dialog = DialogFactory("Segment layout")
t = DFText("Text:")
t.value = msg
dialog.addControl(t)
dialog.show()
The text will be hard to read, but easy to copy (CTRL+A then CTRL+C)

Works perfectly for my workflow.

The Ctrl+A key was not a big deal for me personally. Easy enough to right click the text.... However, resolving the 1024 character limit is very useful. Was you aware the above solved that issue?

One minor request if possible. I tried different adaptions of zfill and rjust, but could not figure out how to apply them to pad the first 9 values. No big deal, but list would match my files precisely if padded.

Thanks all

Sark
Title: Re: New feature.
Post by: eumagga0x2a on August 24, 2023, 05:31:05 PM
Still didn't have time to check selectability of text in QMessageBox with official nightlies, will do, albeit the lack of this feature on supported Windows versions with builds generated using a current MXE is clear.

Quote from: sark on August 24, 2023, 05:03:11 PMHowever, resolving the 1024 character limit is very useful.

Seems to be a limitation of tinyPy. This doesn't matter when dumping text to Avidemux log file because this can be done in small batches.


Title: Re: New feature.
Post by: sark on August 24, 2023, 10:18:58 PM
Quote from: eumagga0x2a on August 24, 2023, 05:31:05 PM
Quote from: sark on August 24, 2023, 05:03:11 PMHowever, resolving the 1024 character limit is very useful.

Seems to be a limitation of tinyPy. This doesn't matter when dumping text to Avidemux log file because this can be done in small batches.

Not sure if you misunderstood my comment. or I've misunderstood your reply, but the adaption by szlldm resolves the character limit when copying from the pop up. Don't know if it was intended, or just a fortunate side effect, but I tested by pasting into Word and it counted over 2500 characters. Didn't try to determine the limit.
Title: Re: New feature.
Post by: eumagga0x2a on August 24, 2023, 11:19:35 PM
I mixed up assembling a tinyPy string by concatenation and printing a string to console (which can be redirected to a file). The latter is limited to 1023 characters (https://github.com/mean00/avidemux2/blob/6c075feb6acdfcc485cfa3cf7e8619a20acdf782/avidemux_plugins/ADM_scriptEngines/tinyPy/src/PythonEngine.cpp#L63), the former not.
Title: Re: New feature.
Post by: eumagga0x2a on August 25, 2023, 10:39:39 PM
Quote from: sark on August 22, 2023, 10:26:33 PMAvidemux_230710_win64qt5_154.zip

I'm running Windows 7 Pro SP1. 64 bit.

Also, I need to right click on the text (or very close) in the pop up.

Finally got to try that build on Windows 11, text in dialogs is not selectable there, unfortunately.
Title: Re: New feature.
Post by: sark on August 26, 2023, 08:31:29 AM
Quote from: eumagga0x2a on August 25, 2023, 10:39:39 PM
Quote from: sark on August 22, 2023, 10:26:33 PMAvidemux_230710_win64qt5_154.zip

I'm running Windows 7 Pro SP1. 64 bit.

Also, I need to right click on the text (or very close) in the pop up.

Finally got to try that build on Windows 11, text in dialogs is not selectable there, unfortunately.

Must be Win 7 only (and earlier perhaps).

Just curious. Is the szlldm modification working in Win 11?
Title: Re: New feature.
Post by: eumagga0x2a on August 27, 2023, 11:12:15 PM
Quote from: sark on August 26, 2023, 08:31:29 AMIs the szlldm modification working in Win 11?

Yes, sure, it works. Also QMessageBox::setTextInteractionFlags(Qt::TextSelectableByMouse) works, but seemingly only for text set by setText(const QString &text), not for setInformativeText(const QString &anothertext). Well, this is at least something.