AFUDirk
Posts: 5
Joined: Wed Apr 01, 2015 9:38 am
Location: Germany
Contact: Website

RPi Cam Web Interface

Wed Apr 20, 2016 7:17 am

I want to drive through the interface additional servos, a zoom lens and a manual sharpness setting.
How can I insert in the web interface, additional buttons as they are already available for pan and tilt.
greeting
Dirk

audryhome
Posts: 1
Joined: Thu Mar 17, 2016 7:17 am

Re: RPi Cam Web Interface

Wed Apr 20, 2016 7:57 am

Hi

When I launch manually raspiMJPEG it tells me "RaspiMJPEG Version 5.4.2".
Latest sources available are 4.2.3

I would like to evaluate adding audio to the raspiMJPEG code, and for this I need the version with the 'bu' command enabled, which is not the case for 4.2.3.

Any idea?

Many thanks

btidey
Posts: 1623
Joined: Sun Feb 17, 2013 6:51 pm

Re: RPi Cam Web Interface

Wed Apr 20, 2016 8:13 am

Trixster wrote:Has anyone got Dropbox-Uploader working correctly with the scheduler? I want to upload the jpg which is created by a video into dropbox. I've setup Dropbox-Uploader as per the instructions on the raspi.tv website.

I have a script in /var/www/html/macros called dropbox.sh with the following contents:

#!/bin/bash
/bin/bash ./dropbox_uploader.sh upload /var/www/html/media/*.jpg Photo

running this from the console works nicely, however when I put ca 0;sy dropbox.sh into the relevant Motion Stop field in the scheduler the script doesn't seem to execute as I would expect. The jpg isn't uploaded to dropbox and using Top the dropbox script doesn't seem to be completing - it just sits there chewing up cpu cycles.

Any ideas why it might not be working? all the permissions are setup correctly (www-data is the owner) and the locations of the relevant files are correct as far as i can tell.
Not tried with dropbox upload myself but I would use the built in job macros rather than a sys command. These mean that you get the name of the file passed into the macro and avoid trying to upload all jpgs each time.

So end_box.sh will get called when a video has been captured and fully converted to a mp4. The name it gets passed will be the mp4 file so the script would need to convert the name to the associated jpg but that is fairly easy to do.

btidey
Posts: 1623
Joined: Sun Feb 17, 2013 6:51 pm

Re: RPi Cam Web Interface

Wed Apr 20, 2016 8:24 am

AFUDirk wrote:I want to drive through the interface additional servos, a zoom lens and a manual sharpness setting.
How can I insert in the web interface, additional buttons as they are already available for pan and tilt.
greeting
Dirk
The current pan tilt buttons get added in to the web interface when the file pipan_on or servo_on is present.

If you look in index.php you will find a function called pan_controls. This inserts into the web page the html to produce the buttons etc.

I would extend this to detect a new file to trigger adding in further buttons for the the extra controls you want.

Each current button is linked via an on_click action to a javascript function e.g left button calls servo_left. These functions are in pipan.js and send back to the server the action. The pipan.php at the servo then performs the action.

If you are using the servoblaster (server_on) method then it should be straightforward to add in more buttons to control more servos the same way.

Post back if you need more details.

User avatar
Trixster
Posts: 261
Joined: Sat Jul 07, 2012 3:53 pm

Re: RPi Cam Web Interface

Wed Apr 20, 2016 8:15 pm

btidey wrote:
Trixster wrote:Has anyone got Dropbox-Uploader working correctly with the scheduler? I want to upload the jpg which is created by a video into dropbox. I've setup Dropbox-Uploader as per the instructions on the raspi.tv website.

I have a script in /var/www/html/macros called dropbox.sh with the following contents:

#!/bin/bash
/bin/bash ./dropbox_uploader.sh upload /var/www/html/media/*.jpg Photo

running this from the console works nicely, however when I put ca 0;sy dropbox.sh into the relevant Motion Stop field in the scheduler the script doesn't seem to execute as I would expect. The jpg isn't uploaded to dropbox and using Top the dropbox script doesn't seem to be completing - it just sits there chewing up cpu cycles.

Any ideas why it might not be working? all the permissions are setup correctly (www-data is the owner) and the locations of the relevant files are correct as far as i can tell.
Not tried with dropbox upload myself but I would use the built in job macros rather than a sys command. These mean that you get the name of the file passed into the macro and avoid trying to upload all jpgs each time.

So end_box.sh will get called when a video has been captured and fully converted to a mp4. The name it gets passed will be the mp4 file so the script would need to convert the name to the associated jpg but that is fairly easy to do.
I'm not quite with you. Do I have to create end_box.sh in the macros folder? What text will i put in there to instruct dropbox_uploader to upload the newly created mp4? Does the Motion Stop field become ca 0;end_box.sh ?

One snag seems to be that dropbox_uploader doesn't seem to allow the uploaded file to automatically keep the original filename, it insists that a new file name is used (so in the case of my script this was 'Photo').

btidey
Posts: 1623
Joined: Sun Feb 17, 2013 6:51 pm

Re: RPi Cam Web Interface

Wed Apr 20, 2016 8:43 pm

audryhome wrote:Hi

When I launch manually raspiMJPEG it tells me "RaspiMJPEG Version 5.4.2".
Latest sources available are 4.2.3

I would like to evaluate adding audio to the raspiMJPEG code, and for this I need the version with the 'bu' command enabled, which is not the case for 4.2.3.

Any idea?

Many thanks
You are looking in the wrong place for the raspimjpeg source. As the wiki states these are now at https://github.com/roberttidey/userland ... s/raspicam

btidey
Posts: 1623
Joined: Sun Feb 17, 2013 6:51 pm

Re: RPi Cam Web Interface

Wed Apr 20, 2016 9:33 pm

Trixster wrote: I'm not quite with you. Do I have to create end_box.sh in the macros folder? What text will i put in there to instruct dropbox_uploader to upload the newly created mp4? Does the Motion Stop field become ca 0;end_box.sh ?

One snag seems to be that dropbox_uploader doesn't seem to allow the uploaded file to automatically keep the original filename, it insists that a new file name is used (so in the case of my script this was 'Photo').
Check the wiki section 5.3.3 for the job macros capability.Basically if you put scripts like end_box.sh in the macros folder (with correct ownership and permissions) then they will be called automatically for each job processed. You do not need to put anything extra in the scheduler set up. The sy command can be separately used in the scheduler to perform other functions not directly related to job processing.

When the end_box.sh is called then $1 will have the path/name of the mp4 video file so the first thing the script needs to do is to calculate the name of the corresponding video thumbnail. This can be done by

Code: Select all

#!/bin/sh
thName="$(ls $1*.jpg)"
where $thName is now is the thumbnail name

I'm not sure about the upload script but I would guess something like

Code: Select all

fName=`basename $thName`
./dropbox_uploader.sh upload $thName $fName
would upload with same name

Spanner
Posts: 3
Joined: Thu Apr 21, 2016 4:05 pm

Re: RPi Cam Web Interface

Thu Apr 21, 2016 6:17 pm

Really love this app, thanks for all your work.

Is there a way to make the whole thing portable? So, I power the Pi from a battery pack, and take it out and about, but still be able to access the image and controls via my smartphone?

Effectively use the smartphone or tablet as a screen for the camera and its controls, only without the RPi and smartphone being connected to a wi-fi network?

Thanks for your advice!

btidey
Posts: 1623
Joined: Sun Feb 17, 2013 6:51 pm

Re: RPi Cam Web Interface

Fri Apr 22, 2016 8:39 am

Spanner wrote:Really love this app, thanks for all your work.

Is there a way to make the whole thing portable? So, I power the Pi from a battery pack, and take it out and about, but still be able to access the image and controls via my smartphone?

Effectively use the smartphone or tablet as a screen for the camera and its controls, only without the RPi and smartphone being connected to a wi-fi network?

Thanks for your advice!
You basically need either the smartphone or the Raspberry to be the wifi access point itself rather than rely on an externally hosted wifi network.

For the smartphone method you would put the phone into a hot spot mode.

Doing it at the raspberry end may be more convenient. Search for lots of guides on how to set up a Raspberry Pi wifi access point.

Spanner
Posts: 3
Joined: Thu Apr 21, 2016 4:05 pm

Re: RPi Cam Web Interface

Fri Apr 22, 2016 9:09 am

Ah, that's an interesting approach.

Let's say the Pi is set up as an access point; the smartphone then connects to it directly via Wi-Fi (as it would with any access point out router). How would I then find the IP address for the RPi Cam Web's web interface?

Or vice versa, really. If the phone is acting as a hot spot, would it still be able to access the web interface on the Pi?

btidey
Posts: 1623
Joined: Sun Feb 17, 2013 6:51 pm

Re: RPi Cam Web Interface

Fri Apr 22, 2016 12:26 pm

Spanner wrote:Ah, that's an interesting approach.

Let's say the Pi is set up as an access point; the smartphone then connects to it directly via Wi-Fi (as it would with any access point out router). How would I then find the IP address for the RPi Cam Web's web interface?

Or vice versa, really. If the phone is acting as a hot spot, would it still be able to access the web interface on the Pi?
For the Raspberry host case you configure a static ip for the Raspberry and the install would include a dhcp server which would dish out an ip address to the phone when selecting that wifi SSID. The browse to the web would then be straightforward.

The other way round might be a bit more tricky. I think the phone could dictate the local subnet OK. You would then need to think through how to get a known IP at the camera end. Maybe a static IP using the subnet and not use DHCP.

GammaScorpii
Posts: 17
Joined: Wed Apr 13, 2016 1:25 pm

Re: RPi Cam Web Interface

Fri Apr 22, 2016 3:58 pm

GammaScorpii wrote:Hi guys,

I'm trying to figure out how the brightness of my shot changes depending on the initial light levels when the camera is switched on. I've tried setting the shutter speed at "50000", exposure to "off", ISO to "100". It doesn't change throughout the shot which is good, but every time I switch the camera off and on again, the brightness of the shot is different.

How can I set it to never change?
Anyone else have this issue or is this just me? If the camera is pointing at a light source when it's switched on, the exposure level is drastically different than if it isn't.

I also have a problem when I do use auto exposure, in that it exposes up for dark scenes, but not down for bright scenes? So if I'm shooting some video, eventually I can't see anything outside because it's completely blown out to white, and the exposure level never drops to compensate.

btidey
Posts: 1623
Joined: Sun Feb 17, 2013 6:51 pm

Re: RPi Cam Web Interface

Sat Apr 23, 2016 9:20 am

I got a report that internal motion detection advanced method (noise > 1000) wasn't working for some video resolutions.

This should now be corrected in latest version.

btidey
Posts: 1623
Joined: Sun Feb 17, 2013 6:51 pm

Re: RPi Cam Web Interface

Sat Apr 23, 2016 9:26 am

GammaScorpii wrote:
GammaScorpii wrote:Hi guys,

I'm trying to figure out how the brightness of my shot changes depending on the initial light levels when the camera is switched on. I've tried setting the shutter speed at "50000", exposure to "off", ISO to "100". It doesn't change throughout the shot which is good, but every time I switch the camera off and on again, the brightness of the shot is different.

How can I set it to never change?
Anyone else have this issue or is this just me? If the camera is pointing at a light source when it's switched on, the exposure level is drastically different than if it isn't.

I also have a problem when I do use auto exposure, in that it exposes up for dark scenes, but not down for bright scenes? So if I'm shooting some video, eventually I can't see anything outside because it's completely blown out to white, and the exposure level never drops to compensate.
Sounds a bit strange. Two suggestions try taking some raspivid captures when started at different lumination. DO you see the problem with that. Second, take a back up copy of uconfig in web folder. Then reset settings (under system) which will delete it and revert everything to default settings. Do you still get a problem? You can restore your settings by copying uconfig back and stop starting camera. Post the uconfig settings here.

Spanner
Posts: 3
Joined: Thu Apr 21, 2016 4:05 pm

Re: RPi Cam Web Interface

Sun Apr 24, 2016 12:08 pm

btidey wrote:
Spanner wrote:Ah, that's an interesting approach.

Let's say the Pi is set up as an access point; the smartphone then connects to it directly via Wi-Fi (as it would with any access point out router). How would I then find the IP address for the RPi Cam Web's web interface?

Or vice versa, really. If the phone is acting as a hot spot, would it still be able to access the web interface on the Pi?
For the Raspberry host case you configure a static ip for the Raspberry and the install would include a dhcp server which would dish out an ip address to the phone when selecting that wifi SSID. The browse to the web would then be straightforward.

The other way round might be a bit more tricky. I think the phone could dictate the local subnet OK. You would then need to think through how to get a known IP at the camera end. Maybe a static IP using the subnet and not use DHCP.
Just a quick update on this. It seems it works very smoothly with two different options.

First, I set up the smartphone as a wi-fi hot spot and connected the Pi to it. When you go to the Pi's IP address (as shown by the smartphone in the hot spot settings), you can access the RPi Cam Web Interface.

Secondly, I set up the Pi as a wi-fi hot spot and connect the smartphone to it by joining its "wi-fi network". Again, go to the Pi's (static) IP address in the phone's browser, and there's the interface! Nice!

Thanks for all the suggestions! And great work again on this superb app.

User avatar
slabua
Posts: 95
Joined: Tue Sep 11, 2012 7:00 pm
Contact: Website

Re: RPi Cam Web Interface

Sun Apr 24, 2016 2:22 pm

btidey wrote:
The log indicates that the scheduler did the right thing in sending a time lapse stop (tl 0) but raspimjpeg didn't obey that for some reason which I don't understand at the moment.

Can you see whether that happens each time?
Yes, each time.
Hmm, could it be because of which user is launching the process and/or some other user/permission settings? I remember there's some line about su/sudo which never worked on my system, so not sure what I should check now.
Salvatore La Bua - www.slblabs.com
DICGIM - University of Palermo, Italy

GammaScorpii
Posts: 17
Joined: Wed Apr 13, 2016 1:25 pm

Re: RPi Cam Web Interface

Mon Apr 25, 2016 3:21 pm

btidey wrote:
GammaScorpii wrote:
GammaScorpii wrote:Hi guys,

I'm trying to figure out how the brightness of my shot changes depending on the initial light levels when the camera is switched on. I've tried setting the shutter speed at "50000", exposure to "off", ISO to "100". It doesn't change throughout the shot which is good, but every time I switch the camera off and on again, the brightness of the shot is different.

How can I set it to never change?
Anyone else have this issue or is this just me? If the camera is pointing at a light source when it's switched on, the exposure level is drastically different than if it isn't.

I also have a problem when I do use auto exposure, in that it exposes up for dark scenes, but not down for bright scenes? So if I'm shooting some video, eventually I can't see anything outside because it's completely blown out to white, and the exposure level never drops to compensate.
Sounds a bit strange. Two suggestions try taking some raspivid captures when started at different lumination. DO you see the problem with that. Second, take a back up copy of uconfig in web folder. Then reset settings (under system) which will delete it and revert everything to default settings. Do you still get a problem? You can restore your settings by copying uconfig back and stop starting camera. Post the uconfig settings here.
Thanks btidey, I'll run some more tests and reset my settings and see how I go. On a side note, does anyone know if there's a way of specifying auto white balance gain? It's the only other manual control I need. I see the option there to turn it off, but it defaults to a weird level (where everything is green). With raspivid, I can use -awb off -awbg 1.5,1.5 to get a nice looking, colorful image.

btidey
Posts: 1623
Joined: Sun Feb 17, 2013 6:51 pm

Re: RPi Cam Web Interface

Mon Apr 25, 2016 6:40 pm

GammaScorpii wrote:
Thanks btidey, I'll run some more tests and reset my settings and see how I go. On a side note, does anyone know if there's a way of specifying auto white balance gain? It's the only other manual control I need. I see the option there to turn it off, but it defaults to a weird level (where everything is green). With raspivid, I can use -awb off -awbg 1.5,1.5 to get a nice looking, colorful image.
I wasn't aware of those two extra parameters in off mode. I'll check whether they can be added to raspimjpeg.

User avatar
Mettauk
Posts: 238
Joined: Mon Dec 10, 2012 12:40 pm
Location: Zarg

Re: RPi Cam Web Interface

Mon Apr 25, 2016 9:35 pm

Just waiting for the new 8mp camera module and wondering how RPi software will adjust to the changes in fov etc?

Also, a big thank you to 'him' that developed RPi Cam and to those that have continued to enhance and develop this fantastic software!
As humans we have been the same for a very very long time, technology changes how we do... not who we are as people.

btidey
Posts: 1623
Joined: Sun Feb 17, 2013 6:51 pm

Re: RPi Cam Web Interface

Mon Apr 25, 2016 10:54 pm

btidey wrote:
GammaScorpii wrote:
Thanks btidey, I'll run some more tests and reset my settings and see how I go. On a side note, does anyone know if there's a way of specifying auto white balance gain? It's the only other manual control I need. I see the option there to turn it off, but it defaults to a weird level (where everything is green). With raspivid, I can use -awb off -awbg 1.5,1.5 to get a nice looking, colorful image.
I wasn't aware of those two extra parameters in off mode. I'll check whether they can be added to raspimjpeg.
Latest version 6.1.1 has an extra camera settings item to control r and blue gains when white balance is off. The values are x 100 so 150 = 1.5

btidey
Posts: 1623
Joined: Sun Feb 17, 2013 6:51 pm

Re: RPi Cam Web Interface

Mon Apr 25, 2016 11:06 pm

Mettauk wrote:Just waiting for the new 8mp camera module and wondering how RPi software will adjust to the changes in fov etc?

Also, a big thank you to 'him' that developed RPi Cam and to those that have continued to enhance and develop this fantastic software!
A good question. I don't have one of the new ones.

As far as I know it should work as a drop in replacement. The raw image sensor has the same aspect ratio as the 5MP one (4:3) but can obviously go to higher resolutions. Both video and static image resolutions are controlled from the web interface and one can try out new custom values by entering say 3280 × 2464 for an image capture. It is also easy to add new presets as capabilities become better known.

It is possible the video memory allocation for the GPU may need to be increased to cope with larger sizes.

If someone gets one to try with RPi cam then please report findings.

fluxi
Posts: 1
Joined: Tue Apr 26, 2016 10:32 am

Re: RPi Cam Web Interface

Tue Apr 26, 2016 11:31 am

Max1968 wrote:Installation script issues

Hi,

I've been using raspimjpeg on 6 different pi's for more than a year now, and i was very very happy about it. However, with the recent changes to the installation script(s) I'm facing severe issues, and today it completely killed one of my pi's so that i need to reinstall it from scratch. What exactly is the recommended installation procedure / base OS ?

The issues I had was:

- Update failing with some weird message i should commit my changes first (i didnt do any changes) - This happened several times, usually i just removed the raspimjpeg installation with the install script and reinstalled, worked fine after

- Recently completely inconsistent behaviour of the install script. On the same pi running wheezy i did a install followed by an uninstall and a deletion of the git directory. The first time it was installed into subfolder html, the second time it was installed into the root www directory

- Today the installation script tried to do a chown www-data:www-data of my media directory (why is it doing this at all ?), but due to some errors somewhere it did this on / instead, and now not only my rpi itself but also some mounted network drives have severe ownership issues... This was on a pi running jessie.

Due to these issues recently i took a look at pikrellcam, so far it looks good. Thus i will do a fresh install of both, and go on with whatever runs more smooth now...

I had the the issue with jessie and RPi Cam Control v6.0.39.
At some point, the whole filesystem was owned by www-data:www-data and I had to setup my rpi from scratch.
Some days ago, I faced an even more severe bug whereby the whole filesystem got deleted after a "Full Uninstall" with option "hard".

I used the RPi_Cam_Web_Interface_Installer.sh and not install.sh though which might be my mistake but still this must not happen in any situation. Seems the handling of variables in the scripts is not correct when they are empty etc..?

GammaScorpii
Posts: 17
Joined: Wed Apr 13, 2016 1:25 pm

Re: RPi Cam Web Interface

Thu Apr 28, 2016 6:06 am

btidey wrote:
btidey wrote:
GammaScorpii wrote:
Thanks btidey, I'll run some more tests and reset my settings and see how I go. On a side note, does anyone know if there's a way of specifying auto white balance gain? It's the only other manual control I need. I see the option there to turn it off, but it defaults to a weird level (where everything is green). With raspivid, I can use -awb off -awbg 1.5,1.5 to get a nice looking, colorful image.
I wasn't aware of those two extra parameters in off mode. I'll check whether they can be added to raspimjpeg.
Latest version 6.1.1 has an extra camera settings item to control r and blue gains when white balance is off. The values are x 100 so 150 = 1.5

This is awesome thank you!

I'm actually using this interface and these cameras to shoot a film. Is there anything I should know about using these with full manual control/getting the absolute best quality video from them? For example, I'm guessing I shouldn't touch settings like contrast and brightness as it looks like those are effects added after capture?

Thanks again for your help.

User avatar
Mettauk
Posts: 238
Joined: Mon Dec 10, 2012 12:40 pm
Location: Zarg

Re: RPi Cam Web Interface

Thu Apr 28, 2016 3:36 pm

Trying out v2 camera module and manually changed still resolution in web interface to 3280 x 2464 without any problems taking stills inc timelapse and changed Image quality from 10 to 100 without issue, other than file size.

I did a rpi-update to correct image flip and to see what happens with video and then realised I don't know what the resolution change should be for say Max_view972p? default for this is 1296x972 but with then new module I wonder if this should rise?

Currently using RPi Cam version v6.0.33
As humans we have been the same for a very very long time, technology changes how we do... not who we are as people.

Gary Littlemore
Posts: 327
Joined: Thu Oct 11, 2012 11:52 am
Location: Cheshire, UK

Re: RPi Cam Web Interface

Thu Apr 28, 2016 8:43 pm

I've just updated my software and noticed the jump from 6.0.38 to 6.1.2. What been updated, any new we need to know about?
3b+, 2b, b+, b, Zero & Zero-W

Return to “Camera board”