dmshimself
Posts: 9
Joined: Fri Apr 20, 2018 3:24 am

Re: RPi Cam Web Interface

Sat Apr 21, 2018 2:01 am

Cheers. In your previous researches, did you happen to find any settings for ffmpeg which allowed the omx support to work? No worries if not and I'll continue to take a look.

Hobb7T
Posts: 7
Joined: Thu Mar 15, 2018 12:31 am

Re: RPi Cam Web Interface

Sun Apr 29, 2018 9:27 pm

So helpfull :D :D :D
I was looking to use that interface after i installed it through a tutorial, but without any luck. Thanks so much!

woerman
Posts: 3
Joined: Tue May 01, 2018 1:16 pm

Re: RPi Cam Web Interface

Tue May 01, 2018 1:25 pm

I am experiencing problems downloading videos to IOS devices. I can however download the same videos to PC. I redid the installation as well. I tried 3 IOS devices with the same results.

Steps on IOS:
1. Download Videos and images
2. Click on the video opening the preview
3. I can preview the video
4. Select the Download button
5. URL displayed: <Raspi IP>/html/preview.php
6. Screen is black with the play symbol and a line through it

GOPI56
Posts: 29
Joined: Sat Aug 13, 2016 10:13 am
Location: Malaysia

Re: RPi Cam Web Interface

Wed May 02, 2018 1:00 am

Hi,
I am unable to delete or write the captured images and videos after I run this both commands to give permission for the user pi. Do anyone here know what is causing this and how to solve this problem?

Code: Select all

sudo chown - R pi:pi /var/www/html

Code: Select all

sudo chmod - R 755 /var/www/html

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

Re: RPi Cam Web Interface

Wed May 02, 2018 10:49 am

GOPI56 wrote:
Wed May 02, 2018 1:00 am
Hi,
I am unable to delete or write the captured images and videos after I run this both commands to give permission for the user pi. Do anyone here know what is causing this and how to solve this problem?

Code: Select all

sudo chown - R pi:pi /var/www/html

Code: Select all

sudo chmod - R 755 /var/www/html
Do not change the ownership of the /var/www/html folder (change it back to www-data). The apache and raspimjpeg process use www-data as the user and therefore will not be able to access the files or perform operations on them.

You can delete / write data in this folder from user pi using the sudo command.

If you wish to avoid using sudo then you could create a common group to access the files.

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

Re: RPi Cam Web Interface

Wed May 02, 2018 11:27 am

woerman wrote:
Tue May 01, 2018 1:25 pm
I am experiencing problems downloading videos to IOS devices. I can however download the same videos to PC. I redid the installation as well. I tried 3 IOS devices with the same results.

Steps on IOS:
1. Download Videos and images
2. Click on the video opening the preview
3. I can preview the video
4. Select the Download button
5. URL displayed: <Raspi IP>/html/preview.php
6. Screen is black with the play symbol and a line through it
I don't use IOS myself but others do and I haven't heard of this problem.

When you select click on a video in the Download Videos and Images page then you get a preview and the browser should be showing a URL like
ip/preview.php?preview=vi_0005_20180502_115043.mp4.v0005.th.jpg#

Clicking on the Download button should just download the .mp4 file to the client.

In step 6 are you referring to the client when you try to play the mp4 locally or is that what you see in the browser web cam page?

Normally the easiest way to see what is going wrong in these case is to use developer tools in the browser.

woerman
Posts: 3
Joined: Tue May 01, 2018 1:16 pm

Re: RPi Cam Web Interface

Wed May 02, 2018 11:53 am

btidey wrote:
Wed May 02, 2018 11:27 am
woerman wrote:
Tue May 01, 2018 1:25 pm
I am experiencing problems downloading videos to IOS devices. I can however download the same videos to PC. I redid the installation as well. I tried 3 IOS devices with the same results.

Steps on IOS:
1. Download Videos and images
2. Click on the video opening the preview
3. I can preview the video
4. Select the Download button
5. URL displayed: <Raspi IP>/html/preview.php
6. Screen is black with the play symbol and a line through it
I don't use IOS myself but others do and I haven't heard of this problem.

When you select click on a video in the Download Videos and Images page then you get a preview and the browser should be showing a URL like
ip/preview.php?preview=vi_0005_20180502_115043.mp4.v0005.th.jpg#

Clicking on the Download button should just download the .mp4 file to the client.

In step 6 are you referring to the client when you try to play the mp4 locally or is that what you see in the browser web cam page?

Normally the easiest way to see what is going wrong in these case is to use developer tools in the browser.
You are correct, if I select preview it opens a URL like ip/preview.php?preview=vi_0005_20180502_115043.mp4.v0005.th.jpg#

When I choose download the URL changes to ip/html/preview.php and I see the black screen with play button and line through it. Nothing gets downloaded.

In step 6 I am referring to what I am seeing on the browser on my IPhone

GOPI56
Posts: 29
Joined: Sat Aug 13, 2016 10:13 am
Location: Malaysia

Re: RPi Cam Web Interface

Wed May 02, 2018 12:39 pm

btidey wrote:
Wed May 02, 2018 10:49 am
GOPI56 wrote:
Wed May 02, 2018 1:00 am
Hi,
I am unable to delete or write the captured images and videos after I run this both commands to give permission for the user pi. Do anyone here know what is causing this and how to solve this problem?

Code: Select all

sudo chown - R pi:pi /var/www/html

Code: Select all

sudo chmod - R 755 /var/www/html
Do not change the ownership of the /var/www/html folder (change it back to www-data). The apache and raspimjpeg process use www-data as the user and therefore will not be able to access the files or perform operations on them.

You can delete / write data in this folder from user pi using the sudo command.

If you wish to avoid using sudo then you could create a common group to access the files.
Hi, May I know what is the command to restore back the permission for www-data folder? Thank you.

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

Re: RPi Cam Web Interface

Wed May 02, 2018 1:23 pm

GOPI56 wrote:
Wed May 02, 2018 12:39 pm
btidey wrote:
Wed May 02, 2018 10:49 am
GOPI56 wrote:
Wed May 02, 2018 1:00 am
Hi,
I am unable to delete or write the captured images and videos after I run this both commands to give permission for the user pi. Do anyone here know what is causing this and how to solve this problem?

Code: Select all

sudo chown - R pi:pi /var/www/html

Code: Select all

sudo chmod - R 755 /var/www/html
Do not change the ownership of the /var/www/html folder (change it back to www-data). The apache and raspimjpeg process use www-data as the user and therefore will not be able to access the files or perform operations on them.

You can delete / write data in this folder from user pi using the sudo command.

If you wish to avoid using sudo then you could create a common group to access the files.
Hi, May I know what is the command to restore back the permission for www-data folder? Thank you.
Changing ownership back is easy

Code: Select all

sudo chown - R www-data:www-data /var/www/html
Changing permissions is trickier as not all files had same permissions but I think the 755 should be OK.

Running install again would also fix things up.

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

Re: RPi Cam Web Interface

Wed May 02, 2018 1:27 pm

woerman wrote:
Wed May 02, 2018 11:53 am
btidey wrote:
Wed May 02, 2018 11:27 am
woerman wrote:
Tue May 01, 2018 1:25 pm
I am experiencing problems downloading videos to IOS devices. I can however download the same videos to PC. I redid the installation as well. I tried 3 IOS devices with the same results.

Steps on IOS:
1. Download Videos and images
2. Click on the video opening the preview
3. I can preview the video
4. Select the Download button
5. URL displayed: <Raspi IP>/html/preview.php
6. Screen is black with the play symbol and a line through it
I don't use IOS myself but others do and I haven't heard of this problem.

When you select click on a video in the Download Videos and Images page then you get a preview and the browser should be showing a URL like
ip/preview.php?preview=vi_0005_20180502_115043.mp4.v0005.th.jpg#

Clicking on the Download button should just download the .mp4 file to the client.

In step 6 are you referring to the client when you try to play the mp4 locally or is that what you see in the browser web cam page?

Normally the easiest way to see what is going wrong in these case is to use developer tools in the browser.
You are correct, if I select preview it opens a URL like ip/preview.php?preview=vi_0005_20180502_115043.mp4.v0005.th.jpg#

When I choose download the URL changes to ip/html/preview.php and I see the black screen with play button and line through it. Nothing gets downloaded.

In step 6 I am referring to what I am seeing on the browser on my IPhone
Can anybody else with IOS / iPhone comment whether they have an issue with download?

Can you try ticking a video thumbnail and try downloading zip to see if that works?

woerman
Posts: 3
Joined: Tue May 01, 2018 1:16 pm

Re: RPi Cam Web Interface

Wed May 02, 2018 1:30 pm

btidey wrote:
Wed May 02, 2018 1:27 pm
woerman wrote:
Wed May 02, 2018 11:53 am
btidey wrote:
Wed May 02, 2018 11:27 am


I don't use IOS myself but others do and I haven't heard of this problem.

When you select click on a video in the Download Videos and Images page then you get a preview and the browser should be showing a URL like
ip/preview.php?preview=vi_0005_20180502_115043.mp4.v0005.th.jpg#

Clicking on the Download button should just download the .mp4 file to the client.

In step 6 are you referring to the client when you try to play the mp4 locally or is that what you see in the browser web cam page?

Normally the easiest way to see what is going wrong in these case is to use developer tools in the browser.
You are correct, if I select preview it opens a URL like ip/preview.php?preview=vi_0005_20180502_115043.mp4.v0005.th.jpg#

When I choose download the URL changes to ip/html/preview.php and I see the black screen with play button and line through it. Nothing gets downloaded.

In step 6 I am referring to what I am seeing on the browser on my IPhone
Can anybody else with IOS / iPhone comment whether they have an issue with download?

Can you try ticking a video thumbnail and try downloading zip to see if that works?

I get the same result

thenorm
Posts: 11
Joined: Mon Feb 24, 2014 2:05 am

Re: RPi Cam Web Interface

Wed May 02, 2018 11:12 pm

I can't get past the step 4 in installation. I tried " chmod u+x *.sh" but that wasn't it. I even tried running it as root.

sh: 1: /var/www/html/macros/error_hard.sh: Permission denied
mmal: mmal_vc_component_create: failed to create component 'vc.ril.camera' (1:ENOMEM)
mmal: mmal_component_create_core: could not create component 'vc.ril.camera' (1)
sh: 1: /var/www/html/macros/error_hard.sh: Permission denied

cpeppler
Posts: 3
Joined: Thu May 03, 2018 4:13 am

Re: RPi Cam Web Interface

Thu May 03, 2018 4:22 am

I am an mentor for FIRST robotics, starting to research vision processing on the Pi. I found RPi Cam Web Interface, and think this is a great piece of software.

I'm using a tool called GRIP https://wpilib.screenstepslive.com/s/44 ... on-to-grip for setting up and testing vision processing pipeline. The tool runs on a windows machine, but it takes a URL for a video input (The call it an IP Camera).

What I need is a URL that is the address of the MJPEG stream, not the address of the webpage that it is being rendered within.

What is that URL (or port?) if I just want to get the MJPEG stream itself?

Thanks in advance.

Charlie Peppler

warmark
Posts: 4
Joined: Mon Jan 26, 2015 6:03 pm

Re: RPi Cam Web Interface

Thu May 03, 2018 4:29 am

wh7qq wrote:
Wed May 11, 2016 10:20 pm
This is a really dumb question that probably has been asked and answered elsewhere but I don't know the right keywords to find it. I am trying to load RPi-Cam to an SD card set up with q4os which is based on raspbian but uses a different desktop. Raspbian comes pre-installed with "git" but q4os does not and after doing

Code: Select all

apt-get install git
and trying to git clone the repository, it asks me for a username and password which, of course, I do not have. How can I download the RPi-Cam Web Interface or install a username and password in git? I am about to throw the computer and monitor down the stairs to the concrete driveway with frustration over the username/password gunk everywhere! :x :x
I'm having the same problem.
Any answers yet ...?

warmark
Posts: 4
Joined: Mon Jan 26, 2015 6:03 pm

Re: RPi Cam Web Interface

Thu May 03, 2018 4:37 am

warmark wrote:
Thu May 03, 2018 4:29 am
wh7qq wrote:
Wed May 11, 2016 10:20 pm
This is a really dumb question that probably has been asked and answered elsewhere but I don't know the right keywords to find it. I am trying to load RPi-Cam to an SD card set up with q4os which is based on raspbian but uses a different desktop. Raspbian comes pre-installed with "git" but q4os does not and after doing

Code: Select all

apt-get install git
and trying to git clone the repository, it asks me for a username and password which, of course, I do not have. How can I download the RPi-Cam Web Interface or install a username and password in git? I am about to throw the computer and monitor down the stairs to the concrete driveway with frustration over the username/password gunk everywhere! :x :x
I'm having the same problem.
Any answers yet ...?
I get as far as git clone https://github.com/silvanmelchior/RPi_C ... erface.git and then it asks for username for https://github.com

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

Re: RPi Cam Web Interface

Thu May 03, 2018 10:56 am

thenorm wrote:
Wed May 02, 2018 11:12 pm
I can't get past the step 4 in installation. I tried " chmod u+x *.sh" but that wasn't it. I even tried running it as root.

sh: 1: /var/www/html/macros/error_hard.sh: Permission denied
mmal: mmal_vc_component_create: failed to create component 'vc.ril.camera' (1:ENOMEM)
mmal: mmal_component_create_core: could not create component 'vc.ril.camera' (1)
sh: 1: /var/www/html/macros/error_hard.sh: Permission denied
Sorry. I don't understand your issue. You say problem is running installation but the errors you posted look like the run time errors you get when the software is run but can't connect to the camera.

Connecting to camera issues are normally caused by
1. Ribbon camera cable. Try re-inserting both ends making sure they are the right way round and fully inserted. Also press down on the little ribbon on the module itself
2. Not enabling camera support. sudo raspi-config
3. Poor power supply or power supply cable producing extra dips when camera turns on.

Also try running raspistill to verify camera is working.

If the problem is with the installation itself please give more details.

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

Re: RPi Cam Web Interface

Thu May 03, 2018 11:03 am

cpeppler wrote:
Thu May 03, 2018 4:22 am
I am an mentor for FIRST robotics, starting to research vision processing on the Pi. I found RPi Cam Web Interface, and think this is a great piece of software.

I'm using a tool called GRIP https://wpilib.screenstepslive.com/s/44 ... on-to-grip for setting up and testing vision processing pipeline. The tool runs on a windows machine, but it takes a URL for a video input (The call it an IP Camera).

What I need is a URL that is the address of the MJPEG stream, not the address of the webpage that it is being rendered within.

What is that URL (or port?) if I just want to get the MJPEG stream itself?

Thanks in advance.

Charlie Peppler
You can get a mjpeg stream by accessing http:/ip/html/cam_pic_new.php

where html is the subfolder installed into or miss out if installed with no subfolder.

It is also good to add a parameter like
cam_pic_new.php?pDelay=40000
where pDelay is the delay between frames (uSec) and so sets the frame rate

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

Re: RPi Cam Web Interface

Thu May 03, 2018 11:16 am

warmark wrote:
Thu May 03, 2018 4:37 am
warmark wrote:
Thu May 03, 2018 4:29 am
wh7qq wrote:
Wed May 11, 2016 10:20 pm
This is a really dumb question that probably has been asked and answered elsewhere but I don't know the right keywords to find it. I am trying to load RPi-Cam to an SD card set up with q4os which is based on raspbian but uses a different desktop. Raspbian comes pre-installed with "git" but q4os does not and after doing

Code: Select all

apt-get install git
and trying to git clone the repository, it asks me for a username and password which, of course, I do not have. How can I download the RPi-Cam Web Interface or install a username and password in git? I am about to throw the computer and monitor down the stairs to the concrete driveway with frustration over the username/password gunk everywhere! :x :x
I'm having the same problem.
Any answers yet ...?
I get as far as git clone https://github.com/silvanmelchior/RPi_C ... erface.git and then it asks for username for https://github.com
Try using git clone git://github.com/silvanmelchior/RPi_Cam_Web_Interface.git

You can also create your own account on github and use that. You can also download it as a .zip from github. Expand the latter and copy the contents across to ~/RPi_Cam_Web_Interface
The bin folder etc should end up in that folder.

warmark
Posts: 4
Joined: Mon Jan 26, 2015 6:03 pm

Re: RPi Cam Web Interface

Sat May 05, 2018 12:42 am

thank you

antennas
Posts: 20
Joined: Thu Sep 20, 2012 4:09 pm

Re: RPi Cam Web Interface

Mon May 07, 2018 12:45 am

yozza wrote:
Sat Nov 18, 2017 12:05 pm
btidey wrote:
Sat Nov 18, 2017 9:43 am
yozza wrote:
Fri Nov 17, 2017 2:13 pm

Thanks again for your help and apologies for not being able to resolve this myself. Have created the gpio.sh that does what I need, and initially tried to execute with an argument, the log file seemed to indicate it was executing but nothing happened, so I created separate gpio_on.sh and gpio_off.sh and again they appear to execute from the log but nothing happens. My GPIO commands require to be at elevated level, so I have sudo'ed them to ensure they execute. They all work from the command line, do you have any suggestions - I tried putting in test statements but didn't get anywhere with that .
$ tail scheduleLog.txt
{2017/11/17 13:24:17} Executing macro /var/www/html/macros/gpio.sh 0 &
{2017/11/17 13:24:19} Executing macro /var/www/html/macros/gpio.sh 1 &
{2017/11/17 13:24:20} Executing macro /var/www/html/macros/gpio.sh 0 &
[2017/11/17 13:50:43] Logged in user::
[2017/11/17 13:50:43] UserLevel 6
{2017/11/17 13:50:45} Executing macro /var/www/html/macros/gpio_on.sh &
{2017/11/17 13:50:48} Executing macro /var/www/html/macros/gpio_off.sh &
{2017/11/17 13:50:50} Executing macro /var/www/html/macros/gpio_on.sh &
{2017/11/17 13:55:12} Executing macro /var/www/html/macros/gpio_on.sh &
{2017/11/17 13:55:14} Executing macro /var/www/html/macros/gpio_off.sh &
how can I prove these are executing?
You can prove a macro is executing by putting something simple in it
like

Code: Select all

echo 'test' >> /var/www/html/macrotest.txt
Every time it executes it should put a new 'test' line in that file.

You can't do sudo commands from the macros normally. The www-data user doesn't have sudo permissions.

You probably have to add user www-data to the group that has gpio permissions.

Something like

Code: Select all

sudo usermod -a -G gpio www-data
If you need to do a specific sudo command then you can add that to /etc/sudoers.d/
Brilliant, thanks for your help and the great cam web interface you have developed.

As you pointed out it was a user group permission issue.

Thanks.

I read the above and have tried what I can find here to make it work, but the button I setup does not work. I can use the command line to execute the bash script but I cannot get the button to do it. I love some ides on how to make it work.

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

Re: RPi Cam Web Interface

Mon May 07, 2018 7:51 am

antennas wrote:
Mon May 07, 2018 12:45 am
I read the above and have tried what I can find here to make it work, but the button I setup does not work. I can use the command line to execute the bash script but I cannot get the button to do it. I love some ides on how to make it work.
I assume you are trying to use the user defined buttons and cannot get the macro action to work when you press the button.

You need to establish first whether an attempt to call the macro is occurring when you press the button or whether the system tries to call the macro but it doesn't execute as expected.

The first is likely to be a configuration issue; the second is likely to be a permissions issue.

If the user button config is correct then you should at least see a line in the schedule log file after you have pressed the button showing that it is trying to run the macro.
e.g. {2018/05/07 08:43:22} Executing macro /var/www/macros/button1.sh &

If this is not happening then check your userbuttons set up or post more data here on your set up

The log file could show it can't find the macro file or it doesn't have permissions to do so. If so check the ownership and privileges of the file. It should be owned by www-data and have rwx permissions for the owner.

If that looks OK then it might be a particular command within the macro that is causing a problem. All commands within the macro are executed under the ownership of www-data and if www-data doesn't have the rights to do a particular command then it will fail and the macro terminates.

Start off by checking that a simple macro works Ok. Use the test.sh which just writes the data to a file. If a particular command is causing a problem then this can be fixed either by assigning www-data to an associated group or giving it special sudoers priviliges for that command.

GreenAcres
Posts: 2
Joined: Mon May 07, 2018 8:54 pm

Re: RPi Cam Web Interface

Mon May 07, 2018 9:06 pm

I installed the interface and it is working great, however I did not think about another service I was running that already uses port 80 when I set up the camera. I have the lights in my house controlled via smartphone through a web interface and it does not work while the camera is being used on port 80. I tried to search the forums for how to change the port number for the camera after install, but it says "port" is too common and is ignored. Can somebody tell me how or where to change the port this is using? Also, what is another valid port for this service... can I just change it to 81?

Thanks

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

Re: RPi Cam Web Interface

Tue May 08, 2018 10:10 am

GreenAcres wrote:
Mon May 07, 2018 9:06 pm
I installed the interface and it is working great, however I did not think about another service I was running that already uses port 80 when I set up the camera. I have the lights in my house controlled via smartphone through a web interface and it does not work while the camera is being used on port 80. I tried to search the forums for how to change the port number for the camera after install, but it says "port" is too common and is ignored. Can somebody tell me how or where to change the port this is using? Also, what is another valid port for this service... can I just change it to 81?

Thanks
Just run the install again and change the port setting there. I would use a high port number like 8080. You will need to include that port number in your camera interface url e.g. http://ip:8080/html

antennas
Posts: 20
Joined: Thu Sep 20, 2012 4:09 pm

Re: RPi Cam Web Interface

Thu May 10, 2018 1:57 am

If that looks OK then it might be a particular command within the macro that is causing a problem. All commands within the macro are executed under the ownership of www-data and if www-data doesn't have the rights to do a particular command then it will fail and the macro terminates.

Start off by checking that a simple macro works Ok. Use the test.sh which just writes the data to a file. If a particular command is causing a problem then this can be fixed either by assigning www-data to an associated group or giving it special sudoers priviliges for that command.


It is a permission issue, as I can see it says permission denied. I do not know how to set the right permissions. I am using the user buttons file with 2 new buttons. I found the commands here once but I cannot find them again. Why does the software not give proper permissions when it installs? Wouldn't it be OK to give permissions to the macro folder??

Thanks for the help.

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

Re: RPi Cam Web Interface

Thu May 10, 2018 8:14 am

antennas wrote:
Thu May 10, 2018 1:57 am
If that looks OK then it might be a particular command within the macro that is causing a problem. All commands within the macro are executed under the ownership of www-data and if www-data doesn't have the rights to do a particular command then it will fail and the macro terminates.

Start off by checking that a simple macro works Ok. Use the test.sh which just writes the data to a file. If a particular command is causing a problem then this can be fixed either by assigning www-data to an associated group or giving it special sudoers priviliges for that command.


It is a permission issue, as I can see it says permission denied. I do not know how to set the right permissions. I am using the user buttons file with 2 new buttons. I found the commands here once but I cannot find them again. Why does the software not give proper permissions when it installs? Wouldn't it be OK to give permissions to the macro folder??

Thanks for the help.
The permissions on www-data are deliberately set low to avoid security issues. This is actually a common policy for web applications and not specific to this software. The macros run under this user.

I have updated the wiki under Job Macros to give the explicit commands needed to change the ownership and permissions of the files. e.g.

Code: Select all

sudo chown www-data:www-data /var/www/html/macros/mymacro.sh
sudo chmod 764 /var/www/html/macros/mymacro.sh
Permissions need to be given for any new file created there.

Return to “Camera board”