Proposals that can accelerate avidemux use! (for next version...)

Started by garfield314, October 12, 2020, 11:24:21 AM

Previous topic - Next topic

garfield314

I would like to propose some enhancements to avidemux's GUI, that will make its use faster & easier.

- It would be useful to have 2 buttons in toolbar for "Run project" & "Save project" commands. browsing through the menus is not handy!
- It can be a nice feature addition, the ability to set multiple split-markers on the timeline & (after placing all of them at the desired spots) to create multiple project (.py) files with the between the markers parts. eg when I have a video of total 5:00 minutes duration, I would set the markers eg at 2:21 and 4:06, and when I would press the (to-be-added) button split project, the program would create 3 .py files (each one with durations 00:00-02:21, 02:21-04:06 and 04:06-05:00). This way the user could split a large project into smaller ones and process them independently, without adding more space to disk. After he would finish processing all of the parts, he can add them in the batch list and get the final (edited) video (through the "merge into 1 file" command).

butterw

Splitting a large file into multiple projects for easier editing can currently be be done manually without too much difficulty.

Set Markers A and B then save to a project script.
You can edit the project script to open the desired part (the times are in micro-seconds), ex:
adm.addSegment(0, 0, 30067000)
adm.markerA = 8399999
adm.markerB = 16733332

The three split projects would be:
_0A.py:
A = 8399999
adm.addSegment(0, 0, A)

_1AB.py:
A = 8399999
B = 16733332
end0 = 30067000
adm.addSegment(0, A, B-A)

_2B.py:
B = 16733332
end0 = 30067000
adm.addSegment(0, B, end0-B)

After editing, recombining projects would also necessitate editing the scripts. You must change the addSegment lines to reference the segment index P of  each part:
adm.addSegment(P, x, xx)


It may be simpler to use an Avidemux script to split in multiple files rather than use projects (using markers A, B and current position, 2 to 4 output files would be possible). The script would auto-save the parts by prefix 1, 2, 3 4_filename.mp4
After processing the parts, it should be possible to simply be recombine them using Append, if the split points were on keyframes. 

Edit3: I've written a script to split on markers (available in Tinypy Tips thread) and done a simple test to determine whether saving and recombining file segments is viable or whether the project splitting approach would be preferable.

Splitting on Keyframes (Copy mode) then recombining seems to add a couple frames (whether this is performed manually or with a script), which increases duration.
30s file cut in 4: original 900 frames / recombined 903 frames, increasing duration by 0.3s
The issue was caused by Avidemux including the keyframe of marker B in the save, which causes a duplicate frame when recombining.