mirror of
https://github.com/vondas-network/videobeaux.git
synced 2025-12-16 12:50:02 +01:00
21 lines
617 B
Python
21 lines
617 B
Python
from utils.ffmpeg_operations import run_ffmpeg_command
|
|
|
|
def stack_2x(input_file1, input_file2, output_file):
|
|
command = [
|
|
"ffmpeg",
|
|
"-y",
|
|
"-i", input_file1,
|
|
"-i", input_file2,
|
|
"-filter_complex", "[0:v][1:v]vstack=inputs=2[v]; [0:a][1:a]amerge=inputs=2[a]",
|
|
"-map", "[v]",
|
|
"-map", "[a]",
|
|
"-c:v", "libx264",
|
|
"-crf", "23",
|
|
"-preset", "fast",
|
|
"-c:a", "aac",
|
|
"-b:a", "128k",
|
|
"-ac", "2",
|
|
output_file
|
|
]
|
|
run_ffmpeg_command(command)
|
|
print(f"Video processed with stack_2x and file is {output_file}") |