I have two videos that are different widths. I want to stack one on top of the other, retaining their respective aspect ratios. The top video is 1920x1080, and the bottom video is 3240x1080. I've tried:
ffmpeg -i video1.mp4 -i video2.mp4 -filter_complex '[1][0]scale2ref[2nd][ref];[ref][2nd]vstack' -map [vid] -c:v libx264 -crf 23 -preset veryfast output.mp4
But I get: "Output with label 'vid' does not exist in any defined filter graph, or was already used elsewhere." Not sure what I'm doing wrong here...