Quote:
I'd like to mix the video streams from two webcams
|
Vertical stack
Code:
ffplay -f lavfi -i "movie=file1.mp4,crop=800:600:0:0[v0];movie=file2.mp4,scale=800:-1,crop=800:600:0:0[v1];[v0][v1]vstack"
Horizontal stack
Code:
ffplay -f lavfi -i "movie=file1.mp4,crop=800:600:0:0[h0];movie=file2.mp4,scale=800:-1,crop=800:600:0:0[h1];[h0][h1]hstack"
And I am going to do a little test to see if that works ok. I'll use a video that I happen to have here.
Code:
ffmpeg -ss 00:03:00 -t 00:03:30 -i MyVid.mp4 -c:a copy -c:v copy test1.mp4
ffmpeg -ss 00:06:00 -t 00:06:30 -i MyVid.mp4 -c:a copy -c:v copy test2.mp4
Play both videos, in the same window.
Code:
ffplay -f lavfi -i "movie=test1.mp4,crop=1920:1080:0:0[v0];movie=test2.mp4,scale=1920:-1,crop=1920:1080:0:0[v1];[v0][v1]vstack"
ffplay -f lavfi -i "movie=test1.mp4,crop=1920:1080:0:0[h0];movie=test2.mp4,scale=1920:-1,crop=1920:1080:0:0[h1];[h0][h1]hstack"
Screenshots of videos playing.
Code:
curl -F'file=@shot1.jpg' https://0x0.st
https://0x0.st/-VuN.jpg
curl -F'file=@shot2.jpg' https://0x0.st
https://0x0.st/-Vuq.jpg
https://0x0.st/-VuN.jpg
https://0x0.st/-Vuq.jpg