Timeline for stack two videos with different widths
Current License: CC BY-SA 4.0
7 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Jun 22, 2018 at 18:07 | comment | added | Gyan |
You can skip the audio filters and just do -map 0:a
|
|
Jun 22, 2018 at 18:02 | comment | added | pts2 | In case it helps anyone in the future, I also wanted to add the audio from the top video (video1.mp4) and put it in the combined output.mp4 (the bottom video video2.mp4 has no audio). This code worked to do all of this: ffmpeg -i video1.mp4 -i video2.mp4 -filter_complex '[1][0]scale2ref=iw:ow/mdar[2nd][ref];[ref][2nd]vstack[vid];anullsrc[silent];[0:a][silent]amerge=inputs=2[a]' -map [vid] -map [a] -c:v libx264 -crf 23 -preset veryfast output.mp4 | |
Jun 22, 2018 at 17:54 | vote | accept | pts2 | ||
Jun 22, 2018 at 17:51 | comment | added | Gyan | Use edited cmd with a recent version of ffmpeg | |
Jun 22, 2018 at 17:51 | history | edited | Gyan | CC BY-SA 4.0 |
preserve main video's aspect ratio
|
Jun 22, 2018 at 17:46 | comment | added | pts2 | That indeed doesn't throw the error (thanks!), but the output has scaled the bottom video so that the height is stretched to match the top video. I'd like the bottom video to be the same aspect ratio it started with. Is there a simple modification to get that to work? | |
Jun 22, 2018 at 17:36 | history | answered | Gyan | CC BY-SA 4.0 |