Friday, May 13, 2011

Test project and Final Project

Since I didn't understand how to get the for loop to work, I tried the while loop, which I did understand, but it doesn't work either. Below is my code. I took a video and tried to dump the frames out while writing the frame numbers on it. I then tried to compile it back into a mov file, but I always get this error: could not get frame filename from pattern. Something was wrong with the formats. Perhaps one of the previous videos I put in a blog post could serve as my final. I worked hard on them and accomplished the effect I put on them using ffmpeg.

Here is my code:

66 cd Final\ Project/
67 ffmpeg -i BPnm.mp4 -ss 00:06:00 -t 00:06:30 finalprojectvideo.mov
68 ffmpeg -i BPnm.mp4 -vcodec copy -acodec copy -ss 00:06:00 -t 00:06:30 finalprojectvideo.mov
69 ffplay finalprojectvideo.mov
70 cd frames
71 ffmpeg -i BPnm.mp4 -vcodec copy -an -ss 00:03:00 -t 00:00:30 finalprojectvideo.mov
72 ffmpeg -i finalprojectvideo.mov -f image2 fp-%05d.png;
73 ffplay finalprojectvideo.mov
74 for ((img in images)); do mogrify edge 2 fp-%05d.png
75* for ((img in images)); do mogrify edge 2 fp-%05d.png; done2
76 for ((i = 1; i<900; ++i)); do echo "hi $i"; done
77 frames = 900; for ((i = 1; i<frames; ++i)); do echo "hi $i"; done
78 frames = 900; for ((i = 1; i<$frames; ++i)); do echo "hi $i"; done
79 frames = 900; for ((i = frame; i<$frames; ++i)); do echo "hi $i"; done
80 for ((i = 1; i<900; i++)); do
81 for ((i = 1; i<900; i++)); do frames= `printf "fp-%05d.png" $ i`; edge = `printf "%05d-edge.png" $i`; echo "Converting $frames to $edge"; convert -draw `text 100,100 "$i"`; convert $frames -edge 2 $edge; done
82 y=25;for ((x = 1; x>$y; ++x)); do echo $x; done
83 ffmpeg -i finalprojectvideo.mov -f image2 %05d-frames.png; let i=1;while [ i -lt 900 ]; do echo '$i';convert -draw "text 100,100 '$i'"; done
84 ffmpeg -i finalprojectvideo.mov -f image2 %05d-frames.png; let i=1;while [ i -lt 900 ]; do echo '$i';convert -draw "text 100,100 '$i'"; done; ffmpeg -i %05d-frames.png -f image 2 final.mov
85 ffmpeg -i finalprojectvideo.mov -f image2 %05d-frames.png; let i=1;while [ i -lt 900 ]; do echo '$i';convert -draw "text 100,100 '$i'"; done; ffmpeg -i %05d-frames.png -f image2 final.mov
86 history > frames2.txt

87 let x=1; echo $x;
88 i=10; echo `$i`
89 i=10; echo `$i'
90 i=10; echo '$i'
91 i=10; echo "$i"
92 ffmpeg -i finalprojectvideo.mov -f image2 %05d-frames.png; let i=1;while [ i -lt 900 ]; do echo '$i';convert -draw "text 100,100 '$i'"; done; ffmpeg -i %05d-frames.png -f image2 final.mov
93 history >> frames2.txt

94 ffmpeg -i finalprojectvideo.mov -f image2 %05d-frames.png; let i=1;while [ i -lt 900 ]; do echo "$i";convert -draw "text 100,100 '$i'"; done; ffmpeg -i %05d-frames.png -f image2 final.mov
95 history >> frames2.txt

No comments:

Post a Comment