streameye icon indicating copy to clipboard operation
streameye copied to clipboard

Can't get example to work

Open ras07 opened this issue 4 years ago • 4 comments

When trying out the first example in README.md, as follows:

while true; do
    for file in *.jpg; do
        cat $file
        echo -n "--separator--"
        sleep 0.5
    done
done | streameye -s "--separator--"

my browser displays one image, but then nothing changes. In the command window I get:

2020-03-29 22:58:28: INFO : streamEye 0.9
2020-03-29 22:58:28: INFO : hello!
2020-03-29 22:58:28: INFO : listening on 0.0.0.0:8080
2020-03-29 22:58:31: INFO : new client connection from 192.168.1.12:59747
2020-03-29 22:58:32: INFO : new client connection from 192.168.1.12:59748
2020-03-29 22:58:42: ERROR: 192.168.1.12:59748: timeout reading from client
2020-03-29 22:58:42: ERROR: 192.168.1.12:59748: failed to read client request

I get the same results on both Raspbian Buster and a VM running Ubuntu 18.04 (x64). Any suggestions?

ras07 avatar Mar 30 '20 04:03 ras07

Try a different browser.

ccrisan avatar Mar 30 '20 07:03 ccrisan

Same result on Chrome, Firefox, and Opera. (I don't always get the two ERROR: messages on the server side - sometimes I get nothing but the "new client" messages - but on the browser side it's always one image, and then nothing changes.)

ras07 avatar Mar 30 '20 16:03 ras07

@ras07 use -d and see if streamEye actually sees all the "frames".

ccrisan avatar Apr 01 '20 07:04 ccrisan

late but... I'd the same problem and I get very good results with this new script (cstream has to be installed)

#!/bin/bash
OctetsParSec=500000 
while true; do 
    for file in *.jpg; do 
        echo -n "myboundary"
        cat "$file"
    done
done | cstream -t "$OctetsParSec" | streameye -s "myboundary"

To be noticed too : streameye is very sensible to the \r\n\r\n of the HTTP request. For example \n\n\n\n doesn't work.

jlpamart avatar Dec 08 '20 12:12 jlpamart