Need to create a batch file to trim black screen from end of mp4

Started by datarecovery.com, January 07, 2023, 05:38:14 PM

Previous topic - Next topic

datarecovery.com

Hello there,
I am fairly new to automating avimux using a batch file. I am tasked with trimming variable-length black from the end of mp4 videos. This happens when I digitize a video and forget to set the timer properly. The batch would have to instruct avimux to detect a black screen of more than 5 minutes. If that happens, then the video should be trimmed leaving 3 seconds of black. I'm not sure where to start or even if this is possible using Avimux. Any suggestions would be appreciated!

eumagga0x2a

This is not possible with Avidemux without at least adding a method to seek to black frames to the tinyPy scripting interface. While the latter is trivial (please see the patch You cannot view this attachment.), further modifications would be needed to make it work in an acceptable manner. The current implementation of ADM_Composer::seekBlackFrame(int count) would open a popup with a progress indicator on each GUI_PrevBlackFrame() or GUI_NextBlackFrame() call.

Implementing the whole logic low-level in gui_blackframes.cpp (a global function added there must be declared in gtkgui.h header file) in a custom Avidemux build might be a much better approach.