How to make a 3d movie with ffmpeg

From MultimediaWiki
Jump to navigation Jump to search

how to combine two seperate videos into one left-right 3d video

just want to play two files side by side

ffplay -i inputleft.avi -vf "movie=inputright.avi [in1]; [in]pad=iw*2:ih:iw:0[in0]; [in0][in1] overlay=0:0 [out]"

combine seperate videos into one, side by side

ffmpeg -i inputleft.avi -vf "movie=inputright.avi [in1]; [in]pad=iw*2:ih:iw:0[in0]; [in0][in1] overlay=0:0 [out]" sidebyside.avi


old instructions

1. Convert both movies to png still images

1. ffmpeg -i test01-left.avi frames-left/%09d.png
2. ffmpeg -i test01-rigth.avi frames-right/%09d.png

2. Bash script for putting still images side by side, using imagemagick's montage command. script assumes 320x240 resolution.

 while [ $a -lt 2416 ]  
    b=`printf "%09d" $a` 
    montage frames-left/$b.png  frames-right/$b.png -geometry 320x240+0+0 frames-done/$b.jpg 
    let a++

3a. Convert images to png avi losslessly (file will be as large as your image files)

1. ffmpeg -i %03d.png -an -vcodec copy outputfile.avi

3b. Convert images to mpeg4 avi

1. ffmpeg -i %03d.png -vtag XVID -an -vcodec mpeg4 outputfile.avi