in augly/video/augmenters/ffmpeg/stack.py [0:0]
def get_command(self, video_path: str, output_path: str) -> List[str]:
"""
Stacks two videos together
@param video_path: the path to the video to be augmented
@param output_path: the path in which the resulting video will be stored.
If not passed in, the original video file will be overwritten
@returns: a list of strings containing the CLI FFMPEG command for
the augmentation
"""
video_info = get_video_info(video_path)
return [
*self.input_fmt(video_path),
"-i",
self.second_video_path,
"-filter_complex",
f"[1:v]scale={video_info['width']}:{video_info['height']}[1v];"
+ f"[0:v][1v]{self.orientation}=inputs=2[v]",
"-map",
"[v]",
"-map",
f"{int(self.use_second_audio)}:a",
"-vsync",
"2",
*self.output_fmt(output_path),
]