I have two videos, both the same resolution (with one being 2 seconds shorter than the other.
I want to merge them in one video that will show them side by side.
Like this:
![Image](https://dl.dropboxusercontent.com/u/14586156/stuff/0_PC_Prog_Dev_support/ImageMagick/Merge2videos/video.png)
![Image](https://dl.dropboxusercontent.com/u/14586156/stuff/0_PC_Prog_Dev_support/ImageMagick/Merge2videos/video.png)
![Image](https://dl.dropboxusercontent.com/u/14586156/stuff/0_PC_Prog_Dev_support/ImageMagick/Merge2videos/video.png)
![Image](https://dl.dropboxusercontent.com/u/14586156/stuff/0_PC_Prog_Dev_support/ImageMagick/Merge2videos/video.png)
Thanks in advance for a reply.
Code: Select all
convert frame_A_000034.png frame_B_000034.png out_000034.png
Code: Select all
#!/bin/bash
#
# reduce the video to frames - change the names/format if required
# resist the temptation to add leading zeros to the filenumber
#
ffmpeg -i a.avi -f image2 a%d.png
ffmpeg -i b.avi -f image2 b%d.png
#
# join pairs of frames together
# ***set the ending frame in the next line otherwise***
# ********this will close with an error********
for n in $(seq 1 1 500)
do
echo "frame_$n" # this line only to show something is happening
convert "a$n".png "b$n".png +append "c$n".png
done
#
# join all the new frames back together
# change the frame rate -r bitrate -b and outfile name/format as required
#
ffmpeg -r 25 -b 2000 -i c%d.png combined.avi
#
# clean up
rm *.png
Code: Select all
convert frame_A_000034.png frame_B_000034.png +append out_000034.png
Code: Select all
for n in $(seq 1 1 500)
do
echo "frame_$n" # this line only to show something is happening
convert "a$n".png "b$n".png +append "c$n".png
Code: Select all
for n in $(seq 1 1 500)
Code: Select all
for /L %%i in (1,1,500) do convert a%%i.png b%%i.png +append c%%i.png
Code: Select all
for /L %%i in (483,1,500) do convert -size 640x480 xc:Black b%%i.png