I am using a Lambda function to run ffmpeg to rescale a video and then add subtitles from an .ass file.
I have tried a few variations, but am continuing to get an error:
[AVFilterGraph @ 0x721bec0] No output pad can be associated to link label '2'.
The code is below, with the error stemming from the line:
'[0]scale=iw/1.5:ih/1.5,setsar=1[v];[1][v]overlay=-100:320[vid][2]overlay[out]'
CODE
try:
subprocess.check_call([
'/opt/ffmpeg',
'-i', source_file,
'-i', padding_image_file,
'-i', subtitles_file, # Input caption file path
'-filter_complex',
'[0]scale=iw/1.5:ih/1.5,setsar=1[v];[1][v]overlay=-100:320[vid][2]overlay[out]',
'-c:a', 'copy', '-crf', '20', '-preset', 'fast', '-movflags', '+faststart',
'-y', output_file
])