How to make a 3d movie with ffmpeg: Difference between revisions
Jump to navigation
Jump to search
(reformat) |
No edit summary |
||
Line 1: | Line 1: | ||
= how to combine two seperate videos into one left-right 3d video = | = how to combine two seperate videos into one left-right 3d video = | ||
1. Convert both movies to png still images | 1. Convert both movies to png still images | ||
:1. ffmpeg -r 20 -i test01-left.avi -r 20 -s 640x480 frames- | :1. ffmpeg -r 20 -i test01-left.avi -r 20 -s 640x480 frames-left/%09d.png | ||
:2. ffmpeg -r 20 -i test01-rigth.avi -r 20 -s 640x480 frames- | :2. ffmpeg -r 20 -i test01-rigth.avi -r 20 -s 640x480 frames-right/%09d.png | ||
2. Bash script for putting still images side by side, using imagemagick's montage command | 2. Bash script for putting still images side by side, using imagemagick's montage command. script assumes 320x240 resolution. | ||
<pre> | <pre> | ||
a=1 | a=1 | ||
Line 9: | Line 9: | ||
do | do | ||
b=`printf "%09d" $a` | b=`printf "%09d" $a` | ||
montage frames- | montage frames-left/$b.png frames-right/$b.png -geometry 320x240+0+0 frames-done/$b.jpg | ||
let a++ | let a++ | ||
done | done |
Revision as of 04:13, 22 October 2010
how to combine two seperate videos into one left-right 3d video
1. Convert both movies to png still images
- 1. ffmpeg -r 20 -i test01-left.avi -r 20 -s 640x480 frames-left/%09d.png
- 2. ffmpeg -r 20 -i test01-rigth.avi -r 20 -s 640x480 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
3. Convert images to avi
- 1. ffmpeg -i %03d.png -an -vcodec copy -f avi outputfile.avi