February 25, 2021, 04:43:37 PM

News:

--


Video Insert and marker Split GUI scripts

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

Previous topic - Next topic

butterw

January 22, 2021, 09:29:54 PM Last Edit: January 26, 2021, 09:35:56 PM by 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