       (clear-dir s3-upload-dir)
 
       (>!! cap-chan {:time-secs cap-time-secs
-                     :fps fps
+                     :fps       fps
                      :frame-dir frame-dir})
       (let [clips-iterations (int
                                (/
-                                (read-string cap-time-secs)
+                                 (read-string cap-time-secs)
                                  (/
                                    (read-string clip-interval-ms)
                                    1000)))]

          (do
            (Thread/sleep (read-string clip-interval-ms))
            (let [clipname (str s3-upload-dir "/" i ".mp4")]
              (>!! clip-chan {:fps fps
                              :frame-dir frame-dir
                              :clip-dir clip-dir
                              :clipname clipname})
              (>!! s3-upload-chan clipname))
            (println "currently uploaded/ing clips: " @uploaded-clips)
            )))
      ))

;TODO use `motion` to capture only motion frames

(go-loop []
  (let [data (<! cap-chan)
        {time-secs :time-secs
         fps       :fps
         frame-dir :frame-dir} data]
    (do-cap time-secs fps frame-dir))
  (recur))
