 
 (defn -main
   "I don't do a whole lot ... yet."
-  [cap-frame-cnt clip-interval fps frame-dir clip-dir intermediate-dir s3-upload-dir]
+  [cap-time-secs clip-interval-ms fps frame-dir clip-dir intermediate-dir s3-upload-dir]
   (do (clear-dir frame-dir)
       (clear-dir clip-dir)
       (clear-dir intermediate-dir)
       (clear-dir s3-upload-dir)
 
-      (future (do-cap cap-frame-cnt fps frame-dir))
-      (dotimes [i 100]
-        (do
-          (Thread/sleep (read-string clip-interval))
-          (do-clip fps frame-dir clip-dir (str s3-upload-dir "/" i ".mp4"))
-          ))
+      (future (do-cap cap-time-secs fps frame-dir))
+      (let [clips-iterations (int
+                               (/
+                                (read-string cap-time-secs)
+                                 (/
+                                   (read-string clip-interval-ms)
+                                   1000)))]
+        (dotimes [i clips-iterations]
+          (do
+            (Thread/sleep (read-string clip-interval-ms))
+            (do-clip fps frame-dir clip-dir (str s3-upload-dir "/" i ".mp4"))
+            )))
       ))

            "-j"
            "100"
            "-t"
            cap-frame-cnt
            "-r"
            fps]]
    (try
      (println "in: " in)
      (apply sh in)
      (catch Throwable t
        (println "error: " (.getMessage t))))))

(defn- get-clip-number [frame-file] ""
  (let [name (.getName frame-file)

(defn- delete-file [file] ""
  (fs/delete file))

(defn- do-cap [cap-time-secs fps frame-dir] ""
  (println "doing capture with total time: " cap-time-secs
           " fps: " fps
           " into frame dir: " frame-dir)
  (let [in ["streamer"
