Hello everyone,

I'm stuck on one long video where the crop settings keep changing from scene to scene, leaving black bars on the right or left.
I could fix it manually by splitting the video using the trim().crop() function, but this video is too long.

Code:
v1 =Trim(0, 1378).RoboCrop(Samples = 10, Laced=False, Show=true)#.LanczosResize(720,480)
v2 =Trim(1379, 1440).RoboCrop(Samples = 10, Laced=False, Show=true)#.LanczosResize(720,480)
v3 =Trim(1441, 1544).RoboCrop(Samples = 10, Laced=False, Show=true)#.LanczosResize(720,480)
v4 =Trim(1545, 1653).RoboCrop(Samples = 10, Laced=False, Show=true)#.LanczosResize(720,480)
v5 =Trim(1654, ...
....
....
v280 =Trim(14735, 14827).RoboCrop(Samples = 10, Laced=False, Show=true)#.LanczosResize(720,480)

v1 ++ v2 ++ v3 ++ v4 ++ v5 ++ ...v280
so I'm looking for a script that could detect scene changes and create a new avs file that will looks similar to the code above

thank you