Mercurial > vba-clojure
comparison clojure/com/aurellem/run/final_cut.clj @ 607:743b7b68e74e
added video without buttons.
author | Robert McIntyre <rlm@mit.edu> |
---|---|
date | Mon, 03 Sep 2012 08:14:46 -0500 |
parents | 47572d444485 |
children |
comparison
equal
deleted
inserted
replaced
606:47572d444485 | 607:743b7b68e74e |
---|---|
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 "rlm-yellow-hack.avi") | 138 (let [movie-with-buttons (File. render-dir "rlm-yellow-hack.avi") |
139 final-audio (File. render-dir "final.mp3") | 139 final-audio (File. render-dir "final.mp3") |
140 final (File. render-dir "final")] | 140 frames-with-buttons (File. render-dir "final") |
141 (.delete movie) | 141 frames (File. render-dir "frames") |
142 (.delete final-audio) | 142 movie (File. render-dir "rlm-yellow-hack-no-buttons.avi") |
143 (clojure.java.shell/sh | |
144 "sox" (.getCanonicalPath (File. render-dir "audio.wav")) | |
145 (.getCanonicalPath final-audio)) | |
146 (clojure.java.shell/sh | |
147 "ffmpeg" | |
148 "-framerate" "60" | |
149 "-i" (str (.getCanonicalPath final) "/" "%07d.png") | |
150 "-i" (.getCanonicalPath final-audio) | |
151 "-b:a" "128k" | |
152 "-b:v" "9000k" | |
153 "-c:a" "libmp3lame" | |
154 "-c:v" "mpeg4" | |
155 "-r" "60" | |
156 (.getCanonicalPath movie)) nil)) | |
157 | 143 |
144 render-video | |
145 (fn [frames movie] | |
146 (.delete movie) | |
147 (.delete final-audio) | |
148 (clojure.java.shell/sh | |
149 "sox" (.getCanonicalPath (File. render-dir "audio.wav")) | |
150 (.getCanonicalPath final-audio)) | |
151 (clojure.java.shell/sh | |
152 "ffmpeg" | |
153 "-framerate" "60" | |
154 "-i" (str (.getCanonicalPath frames) "/" "%07d.png") | |
155 "-i" (.getCanonicalPath final-audio) | |
156 "-b:a" "128k" | |
157 "-b:v" "9000k" | |
158 "-c:a" "libmp3lame" | |
159 "-c:v" "mpeg4" | |
160 "-r" "60" | |
161 (.getCanonicalPath movie)))] | |
162 | |
163 (render-video frames-with-buttons movie-with-buttons) | |
164 (render-video frames movie) | |
165 nil)) | |
158 | 166 |
159 (comment | 167 (comment |
160 | 168 |
161 ;; step 1 | 169 ;; step 1 |
162 | 170 |