Small update -- I still find this rpi camera websocket server really cool.
But I found two issues:
- After start you can click Stop Video, and video transmission to browser stops.
But clicking Start Video again has no effect.
- Clicking Disconnect throws an unhandled js error and server stops.
For 1) ending server with CTRL-C and restarting gets it going again.
For 2) "ps -ef | grep raspivid" gives process ID of still running raspivid, "kill -9 ..." with that process ID and the restarting server gets it going again.
This is not working for "server-rpi.js", for "nodejs server-static.js" all buttons work fine.
I will use this rpi camera server for (mobile) raspivid development work without HDMI monitor:
Code: Select all
[email protected]:~/h264-live-player $ diff lib/raspivid.js.orig lib/raspivid.js
< var msk = "raspivid -t 0 -o - -w %d -h %d -fps %d";
> var msk = "../userland/build/bin/raspivid -t 0 -o - -stf 5 -w %d -h %d -fps %d";
< var streamer = spawn('raspivid', ['-t', '0', '-o', '-', '-w', this.options.width, '-h', this.options.height, '-fps', this.options.fps, '-pf', 'baseline']);
> var streamer = spawn('../userland/build/bin/raspivid', ['-t', '0', '-o', '-', '-stf', '5', '-w', this.options.width, '-h', this.options.height, '-fps', this.options.fps, '-pf', 'baseline']);
[email protected]:~/h264-live-player $
Since @131 explicitely asked for "sane" bitrates I will keep the 12fps, while working on vertical lines reductions and vertical increments for raspivid (that allowed raspiraw to do eg. 640x128_s at 665fps with v1 camera).
Development will be based on 640x480 mostly as with v1 camera work for raspiraw:
If I send I2C commands (at 5th frame) after GPU is done with sending its I2C commands to camera, I will not only be able to change framerate (that worked successfully already, 640x480 at 180fps on v2 camera
), but also do other commands commands. Working hypothesis is that if I tell camera to only capture 240 lines instead of 480, GPU will scale that 640x240 to the requested 640x480. Will see tomorrow ...