python - SimpleCV Jpeg Streamer only works with local host -
when run following python code , connect in chrome localhost:8080 can see camera if try connect thecomputersip:8080 on chrome on device on same network cant connect , error connection refused. i'm not sure how fix , appreciated (the script being run on windows using pycharm).
from simplecv import * w=640/2 h=480/2 cam = camera(0,{"width":w,"height":h}) disp =display() js = jpegstreamer(8080,0.01) print(js.url()) print(js.streamurl()) while disp.isnotdone(): img = cam.getimage() img.show() img.save(js)
solved changed:
js = jpegstreamer(8080,0.01)
to:
js = jpegstreamer("0.0.0.0:8080",0.01)
Comments
Post a Comment