     (let [vs (Socket. host 5555)]
       (.setSoTimeout vs 5000)
       ;wakes up the socket so that it will continue to stream data
-      (.write (DataOutputStream. (.getOutputStream vs)) (byte-array (map byte [1 0 0 0])))
+      (doto (.getOutputStream vs)
+        (.write (byte-array (map bin/ubyte [1 0 0 0])))
+        (.flush))
       (reset! vsocket vs))))
 
+(doto System/err
+  (.write (byte-array (map bin/ubyte [65 66 67 10])))
+  (.flush))
+(.write (DataOutputStream. System/err) (byte-array (map byte [1 0 0 0])))
+(.flush System/err)
 (defn read-from-input [size]
   (let [bv (byte-array size)]
     (.read (.getInputStream @vsocket) bv)


(defn save-image [bi]
  (ImageIO/write bi "png" (File. "opencvin.png")))

(defn display-frame [video]
  (try



(defn init-video [host]
  #_(setup-viewer)
  (init-video-stream host))

(defn start-video [host]
