changeset 607:743b7b68e74e

added video without buttons.
author Robert McIntyre <rlm@mit.edu>
date Mon, 03 Sep 2012 08:14:46 -0500
parents 47572d444485
children 2c348cc68bac
files clojure/com/aurellem/run/final_cut.clj
diffstat 1 files changed, 26 insertions(+), 18 deletions(-) [+]
line wrap: on
line diff
     1.1 --- a/clojure/com/aurellem/run/final_cut.clj	Sun Sep 02 23:44:22 2012 -0500
     1.2 +++ b/clojure/com/aurellem/run/final_cut.clj	Mon Sep 03 08:14:46 2012 -0500
     1.3 @@ -135,26 +135,34 @@
     1.4  ;;      (.getCanonicalPath movie)) nil))
     1.5  
     1.6  (defn final-cut! [^File render-dir]
     1.7 -  (let [movie (File. render-dir "rlm-yellow-hack.avi")
     1.8 +  (let [movie-with-buttons (File. render-dir "rlm-yellow-hack.avi")
     1.9          final-audio (File. render-dir "final.mp3")
    1.10 -        final (File. render-dir "final")]
    1.11 -    (.delete movie)
    1.12 -    (.delete final-audio)
    1.13 -    (clojure.java.shell/sh
    1.14 -     "sox" (.getCanonicalPath (File. render-dir "audio.wav"))
    1.15 -     (.getCanonicalPath final-audio))
    1.16 -    (clojure.java.shell/sh
    1.17 -     "ffmpeg"
    1.18 -     "-framerate" "60" 
    1.19 -     "-i" (str (.getCanonicalPath final) "/" "%07d.png")
    1.20 -     "-i" (.getCanonicalPath final-audio)
    1.21 -     "-b:a" "128k"
    1.22 -     "-b:v" "9000k"
    1.23 -     "-c:a" "libmp3lame"
    1.24 -     "-c:v" "mpeg4"
    1.25 -     "-r" "60"
    1.26 -     (.getCanonicalPath movie)) nil))
    1.27 +        frames-with-buttons (File. render-dir "final")
    1.28 +        frames (File. render-dir "frames")
    1.29 +        movie (File. render-dir "rlm-yellow-hack-no-buttons.avi")
    1.30  
    1.31 +        render-video
    1.32 +        (fn [frames movie]
    1.33 +          (.delete movie)
    1.34 +          (.delete final-audio)
    1.35 +          (clojure.java.shell/sh
    1.36 +           "sox" (.getCanonicalPath (File. render-dir "audio.wav"))
    1.37 +           (.getCanonicalPath final-audio))
    1.38 +          (clojure.java.shell/sh
    1.39 +           "ffmpeg"
    1.40 +           "-framerate" "60" 
    1.41 +           "-i" (str (.getCanonicalPath frames) "/" "%07d.png")
    1.42 +           "-i" (.getCanonicalPath final-audio)
    1.43 +           "-b:a" "128k"
    1.44 +           "-b:v" "9000k"
    1.45 +           "-c:a" "libmp3lame"
    1.46 +           "-c:v" "mpeg4"
    1.47 +           "-r" "60"
    1.48 +           (.getCanonicalPath movie)))]
    1.49 +
    1.50 +        (render-video frames-with-buttons movie-with-buttons)
    1.51 +        (render-video frames movie)
    1.52 +        nil))
    1.53    
    1.54  (comment
    1.55