Replies: 10 comments 2 replies
-
|
Motion uses POST instead of GET. In the [examples](doc /motion_examples.html) page within doc subdirectory of the code it shows examples. Note that the data sent may need to be url encoded. There was a recent discussion on this topic too. |
Beta Was this translation helpful? Give feedback.
-
|
Dear Mr Dave, thanks for your suggestions Something must be wrong somewhere. If I compare the log files for v4.7 and v5 I miss some parts in the v5 version. Specifically the part that is actully setting the camera parameters specified. At init, a section of the logfile from v4.7 looks like this: [1:ml1:CAM41] [NTC] [VID] [Jan 03 14:47:22] v4l2_pixfmt_set: Testing palette YUYV (1024x768) Here we see the commands "Set control" of "brightness", "auto exposure" and "exposure time, absolut". Exactly those that are specified in the config file for those cameras: Parameters to control video device. See motion_guide.htmlvideo_params ID09963776=-64,ID10094849=1,ID10094850=40,palette=15 If we then look into the logfile for v5 from my tests yesterday, we see that those "Set control" commands are missing: Jan 02 14:21:03 [NTC][VID][cl51:CAM51] pixfmt_set: Using palette YUYV (1024x768) Here I tried with even more params but none seemed to have any effect (except maybe the palette): Parameters to control video device. See motion_guide.htmlv4l2_params ID09963776=-32,ID09963777=32,ID09963778=60,ID09963788=1,ID09963792=100,ID09963802=4600,ID09963795=0,ID09963804=1,ID10094849=1,ID10094850=505,palette=15 If i today try again (with a bit simpler web camera) I get similar results with no "Set controls": Jan 03 15:19:12 [NTC][VID][cl51:CAM51] pixfmt_try: Testing palette YUYV (1024x768) Parameters to control video device. See motion_guide.htmlv4l2_params ID09963776=32,ID09963777=32,ID09963778=60,ID09963788=1,ID09963792=100,ID09963804=3,ID10094849=3,palette=15 Is a mystery. I think I have followed the instructions in the documents correctly, camera is shown but changing parameters does not work With kind regards, Walter |
Beta Was this translation helpful? Give feedback.
-
|
Dear Mr Dave, I have the following params set: Parameters to control video device. See motion_guide.htmlv4l2_params ID09963776=32,ID09963777=32,ID09963778=60,ID09963788=1,ID09963792=100,ID09963804=3,ID10094849=3,palette=15
|
Beta Was this translation helpful? Give feedback.
-
|
In addition, just wondering, do you require bookworm or later for v5? I built the v5 from master on a raspberry Pi3 running 64bit version of raspbian bullseye: Only thing from the requirements I could not install was libcamera-v4l2. The build worked anyway fine without and cameras can be viewed. Don't know if this matters... |
Beta Was this translation helpful? Give feedback.
-
|
The only thing I can think of now is to possibly try to use the names of the controls rather than the id numbers. e.g. Use Regarding base systems, if it builds it should be fine. |
Beta Was this translation helpful? Give feedback.
-
|
Dear Mr Dave, OK, thanks, understood! Unfortunately the same, no change. I did make a complete new setup with a new sd card on a RPi4. This time the build also included the libcamera_v4l2 and everything built fine. But trying to change brightness and contrast on the camera did not work (also tried some other params but no success) Kind regards & wish you a nice sunday, |
Beta Was this translation helpful? Give feedback.
-
|
Sigh..it is a bug with the rewrite. The |
Beta Was this translation helpful? Give feedback.
-
|
Good Morning Mr Dave, My next test was then to try to change those dynamically while Motion is running but this seems not yet to work Using a Python script (as mentioned in an earlier posting) seems not have any effect at all, the command is not recognized by Motion (the command for changing the text_left works however fine when I tried it) Next I tried using a http request. This seems to be recognized by Motion Here the complete Motion log: |
Beta Was this translation helpful? Give feedback.
-
Pretty sure this one is url encoding as well as needing an = after the v4l2_params. For some reason I haven't figured out yet, some equal signs need to be url encoded. Not sure if it is a curl thing or something that is in Motion. For example, your command would be
|
Beta Was this translation helpful? Give feedback.
-
|
Dear Mr Dave, Thanks for helping me out with the curl commands, they do work but there is a disadvantage using them since the camera(s) are restarted. When using the http requests (in v4.7 and earlier) the configuration params are changed without restarts. I have now found the main differencies from the log files, comparing v5 with v4.7 Using the same http requests for both; In v4.7 I see "util_parms_parse" and all those "util_parms_add" that seems to be the ones required. In v5 those are missing. Could those be addded to v5 in some way? Or could it be some url encoding is required in v5 that is not needed in v4.7? Kind regards, Walter Log from v4.7 Log from v5 |
Beta Was this translation helpful? Give feedback.

Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hello, I think I am not able to figure this out
Up until 4.7 I was able to change camera settings dynamically via http. But when I try a similar approach in version 5 like below this seems not to work:
http://127.0.0.1:8080/1/config/set?v4l2_params=ID09963776=-64,ID10094849=1,ID10094850=112,palette=15I have also tried to set v4l2_params vis curl as well as via python script.But that does not seem to work either, only thing that happens is that the camera is restarted by Motion
Is it supposed to be possible to set v4l2 dynamically? If so what is the recommended procedure?
.......
I have noticed and tried curl/python commands for some other purposes and they seem to work as expected.
Do we have an API documentation for setting configuration parameters in v5?
Any hint or advise how to do similar changes via http or other methods is highly appreciated
Kind regards, Walter
Beta Was this translation helpful? Give feedback.
All reactions