Add option to run in low-res mode
|Status:||Closed||Start date:||17 Feb 2020|
|Target version:||PiBox - 1.1.0 - Upgrades|
|Severity:||03 - Medium|
This means an additional Message Action type for MT_STREAM: MA_START_LOW.
This implies the following:
- handleStream: adds msgAction case for MA_START_LOW that is the same as MA_START, but passes the msgAction value to spawnStream.
- spawnStream: accepts msgAction type argument.
- spawnStream: uses msgAction argument to select the FPS and builds command with that.
If I do this then I can use the media system as a web cam at the house, using an ssh tunnel to the Pi's. Using the phone at 30fps works but is really, really slow and falls behind quickly. I think slowing down the frame rate (and maybe the video size) would help.
RM #741: Support low-res and hi-res modes for webcam. Fix quit to properly exit the webcam on the server. Fix dialog call when improperly seting pw for users.
RM #741: Make every request for the webcam kill any existing webcam process first. Allow request for either hi-res or low-res webcam.
RM #741: Disable externally configured webcam command in favor of internal command usage, which will allow for using either hi- or low-res options.
#1 Updated by Hammel about 1 year ago
- Status changed from New to In Progress
- % Done changed from 0 to 10
The description only mentions what should be done with piboxd. I need to map out what piboxwww has to have changed too.
- webcam(): default to low-res (action=3 instead of 1)
- webcam.tmpl: add hires() function that adds res=high to URL.
- webcam.tmpl: change reload() function to pass res=low in URL.
- webcam(): Use $_GET["res"] to determine if action should be 1 instead of 3.
Also, the "Reload" button should now say "High Res" and add a new button that says "Low Res" in webcam.tmpl.
That should allow hi vs low resolution when requesting the stream from piboxd.
#2 Updated by Hammel about 1 year ago
- % Done changed from 10 to 20
This will likely work, but there is an underlying bug that needs to be fixed first: The use of TAG to add state doesn't work. This means that "Quit" or restarting at a different resolution doesn't work. The backgrounded mjpeg-streamer process keeps running.
The simple fix (but not ideal) is to stop associating the request with the tag. Every new inbound request kills the currently running process before restarting it with a new config.
Now working on implementing that fix.
#3 Updated by Hammel about 1 year ago
- Status changed from In Progress to Closed
- % Done changed from 20 to 100
Done. High and low res options work on the web interface. Console interface is always hi res. Switching resolution or device will always restart the server so only one person at a time can view it. Low-res works much better on my phone over 4G (i think, maybe 3G?).
Tested, committed to both repos (piboxd and piboxwww) and pushed.