comparison clojure/com/aurellem/run/final_cut.clj @ 605:54644b08da1a

rendered final video.
author Robert McIntyre <rlm@mit.edu>
date Sun, 02 Sep 2012 14:28:53 -0500
parents c8cda378e1a0
children 47572d444485
comparison
equal deleted inserted replaced
604:c8cda378e1a0 605:54644b08da1a
133 ;; "-f" "webm" 133 ;; "-f" "webm"
134 ;; "-g" "200" 134 ;; "-g" "200"
135 ;; (.getCanonicalPath movie)) nil)) 135 ;; (.getCanonicalPath movie)) nil))
136 136
137 (defn final-cut! [^File render-dir] 137 (defn final-cut! [^File render-dir]
138 (let [movie (File. render-dir "final.ogg") 138 (let [movie (File. render-dir "final.avi")
139 final-audio (File. render-dir "final.wav") 139 final-audio (File. render-dir "final.mp3")
140 final (File. render-dir "final")] 140 final (File. render-dir "final")]
141 (.delete movie) 141 (.delete movie)
142 (.delete final-audio) 142 (.delete final-audio)
143 (clojure.java.shell/sh 143 (clojure.java.shell/sh
144 "sox" (.getCanonicalPath (File. render-dir "audio.wav")) 144 "sox" (.getCanonicalPath (File. render-dir "audio.wav"))
148 "-framerate" "60" 148 "-framerate" "60"
149 "-i" (str (.getCanonicalPath final) "/" "%07d.png") 149 "-i" (str (.getCanonicalPath final) "/" "%07d.png")
150 "-i" (.getCanonicalPath final-audio) 150 "-i" (.getCanonicalPath final-audio)
151 "-b:a" "128k" 151 "-b:a" "128k"
152 "-b:v" "9000k" 152 "-b:v" "9000k"
153 "-c:a" "libvorbis" 153 "-c:a" "libmp3lame"
154 "-c:v" "libtheora" 154 "-c:v" "mpeg4"
155 "-r" "60" 155 "-r" "60"
156 (.getCanonicalPath movie)) nil)) 156 (.getCanonicalPath movie)) nil))
157 157
158 158
159 (comment 159 (comment