How to make a 3d movie with ffmpeg

From MultimediaWiki
Jump to: navigation, 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


MORE INFO: http://stackoverflow.com/questions/9293265/ffmpeg-2-videos-transcoded-and-side-by-side-in-1-frame http://stackoverflow.com/questions/7581665/multiple-video-sources-combined-into-one


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.

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

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

references

http://www.google.co.nz/support/forum/p/youtube/thread?tid=57eeb22e76416a8b&hl=en
http://www.mtbs3d.com/phpbb/viewtopic.php?f=27&t=4521
http://electron.mit.edu/~gsteele/ffmpeg/