Avidemux Forum

Avidemux => Windows => Topic started by: TCmullet on January 06, 2024, 04:21:25 PM

Title: Dealing with mixed resolutions in one file
Post by: TCmullet on January 06, 2024, 04:21:25 PM
I sometimes acquire a video file whose main content is of one resolution, for example, 1280 x 720 @ 59.94 fps.   This being captured from a live or semi-live stream, it has commercials embedded throughout it.  Many times those commercials are of a DIFFERENT resolution.  A simple pass-through within Avidemux (1.8.1, the latest official release) causes it to bomb.  Could a way be implemented for me to SPECIFY what resolution (spatial and temporal) is the desired one and have Avidemux SKIP all input GOPs that are not of that spec??  This would be SUPER helpful.  The main goal is to removed all content that is not of the main program's spec to make it all "the same".  A nice side effect would be to remove most of the commercials without me having to manually edit them.
Title: Re: Dealing with mixed resolutions in one file
Post by: eumagga0x2a on January 06, 2024, 10:16:30 PM
Usually not only video resolution but also the properties or even the number of audio tracks changes and this happens not necessarily at one and the same point in the stream. In total, this constitutes the most efficient way to sabotage editing of MPEG-TS streams.

Avidemux logs (on Windows: writes to %localappdata%\avidemux\admlog.txt file) the offsets of all resolution changes in MPEG-TS streams during initial indexing. It should not be too difficult to write a tool (probably just a shell script) to split such a MPEG-TS file at given offsets into fragments that a user could append (either all odd or all even ones) in Avidemux. Incorporating similar functionality internally looks far more challenging to me.