GUI custom plugins: SaveFull, browse Segments, Video Insert, marker Split, etc

Started by butterw, January 22, 2021, 09:29:54 PM

Previous topic - Next topic

butterw

https://github.com/butterw/bShaders/blob/master/test_LimitedRange/bInsert.py
v0.1: minor corrections

# tested in Avidemux 2.7.7dev Win10 x64 (in GUI run with File>Project Script or add to Custom menu)
#
# Insert a video file into your video before the current position (saves a few clicks, easier for new/occasional users)
# If you have edited your file, save it and reload it before proceeding ! A built-in function would likely be preferable in project mode.

# for no re-encoding mode:
# - Insertion point must be on a Keyframe !
# - encoding parameters must match ! 

eumagga0x2a

if not nSegm: msg_str="No video loaded !"
else:
msg_str="Multiple Segments detected !\n"
msg_str="Please Save and Reload Your File"
gui.displayError("bInsert", msg_str)

This was probably meant to be

if not nSegm: msg_str="No video loaded !"
else:
msg_str="Multiple Segments detected !\n"
msg_str = msg_str + "Please Save and Reload Your File"
gui.displayError("bInsert", msg_str)

ff01 = ed.getNextKFramePts()
Due to this change, this needs to be

ff01 = ed.getNextKFramePts(-1)
with current builds (next keyframe pts relative to current).

butterw


butterw

# Save Full Feature
Quote from: butterw on February 17, 2021, 02:12:10 PM
Quote from: Who on January 02, 2021, 09:21:49 PMInstead of a single save button, please consider having one that saves the entire video and a second one that only saves the selected portion (the part between the A and B markers).  Too often I have edited a video and saved it only to discover that only a partial video was saved because I forgot to remove the A/B markers.

It's easy to add a Save Full command with a TinyPy script (which can be added to the Custom or Auto Menu).

Are there any plans to implement this feature directly as a GUI command ? If not I will provide a save_full.py script for inclusion in the Auto Menu.
- As far as I can see there is no advantage to this being written as a script.
- It also isn't currently possible to associate hotkeys to scripts.


eumagga0x2a

Honestly, I don't feel this feature would be a gain. It matters for me that a GUI behaves consistently and does not startle the user while providing the necessary minimum of feedback and controls. It should not try to automate everything or guess every wish. It should just provide a reasonable way to accomplish usual tasks.

On my GUI-related todo or rather wishlist:

1. Decouple GUI event handling from video rendering, necessary to fix GUI becoming unresponsive when video fps matches display refresh rate. This should also allow to interact with some menus and dialogs like video properties dialog during playback.

2. Allow to paste time in dd:dd:dd.ddd format or as an integer value from clipboard into time chooser when possible and into time display. Desirably, this should be possible also in on-the-fly filter preview too. It looks like this feature was started and abandoned.

3. Rework custom shortcuts configuration backend.

4. Persistent widgets' state across sessions?

5. A custom action button in toolbar maybe?

6. Better accessibility of the interface, especially of the main window.

I have no idea whether I'll succeed even in a single one of these tasks.

butterw

Quote from: eumagga0x2a on March 05, 2021, 08:00:54 PMHonestly, I don't feel this feature would be a gain. It matters for me that a GUI behaves consistently and does not startle the user while providing the necessary minimum of feedback and controls. It should not try to automate everything or guess every wish. It should just provide a reasonable way to accomplish usual tasks.

OK. I'll post my SaveFull.py script in this thread and users who want to try it out can install it to their Custom menu in the GUI.

 

butterw

#6
# SaveFull.py plugin for Avidemux>=2.7.7:

# Save the full video not just the selection without resetting markers
# also displays some extra info in the title of the save dialog (duration in minutes, nbSegments / nbVideos, number of audio tracks.)

- I would have added the Copy (or Codec) mode, but there is no way of getting this info in TinyPy currently.


available here:
https://github.com/butterw/bShaders/tree/master/test_LimitedRange/Avidemux/Settings/Custom

butterw

#7
# bSegments.py plugin for Avidemux>=2.7.7:
List video Segments (from 2 to MaxSegments) and jump to the start of the next (or selected) segment by clicking OK.
Next segment is determined based on the current position.
Segments are created by all edit or append operations. As such they are the basic bloc of video editing and provide an essential overview of the structure of a  video project.

In the following example 2 videos files have been appended creating 2 segments:

titlebar: the number of segments /v the number of video files
[current segment] current position || information about the segments start time and duration. 

available here:
https://github.com/butterw/bShaders/tree/master/test_LimitedRange/Avidemux/Settings/Custom