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

Re: RPi Cam Web Interface

Mon Apr 09, 2018 8:51 pm

Shotingman03 wrote:
Mon Apr 09, 2018 1:32 pm
When I run start.sh it just says "This account is not available".
You need to supply a bit more information here.

Was the install successful> Did you choose autostart? When are you running ./start.sh (You don't normally need to do this)? Are you running under pi user or something else? If a different user does that user have sudo rights?

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

Re: RPi Cam Web Interface

Mon Apr 09, 2018 9:02 pm

ChAoSWK wrote:
Mon Apr 09, 2018 2:46 pm
Hello,

due some circumstances (someone has stolen my cam in the garden and looked fully inside the camera this idiot) I had to install a completely new raspberry cam.

I re-ordered the zero w and put the newest stretch image even with the current RPICAM Control last week. I installed the scripts as before (every hour a break also every 20 seconds a photo).

The settings are as the same as on my other cam on the first version of the rpi (running inside my flat). Now I am wondering why I have nearly 100% cpu load with a load average from about > 2. Compared the settings to the old raspberry are the same, so the cpu load should be lower than on the old pi because it runs at 1000 mhz (the old pi at 700). I verified with the commands for reading out the clock speed, the pi zero truely runs on 1000mhz. It records on a mounted nfs source via wifi, the old pi directly via lan. All other settings are the same.

here is htop:

May there be an issue with stretch? My other cam is running on jessie.

Thx

Dirk
I have cameras running on stretch with very low cpu usage (<3%) so it is not directly related to that. Your htop output seems to show several raspimjpeg processes running. That isn't right.There should only be 2, one main process and a watchdog version which has should have 0 cpu usage.

Restart and then use ps -A to check there are only two copies running. Wifi may be an issue if that is not reliable. I would certainly make sure recordings are local and then copied across using the boxing_path facility.

ChAoSWK
Posts: 14
Joined: Fri Dec 04, 2015 11:34 am

Re: RPi Cam Web Interface

Tue Apr 10, 2018 6:30 am

btidey wrote:
Mon Apr 09, 2018 9:02 pm

I have cameras running on stretch with very low cpu usage (<3%) so it is not directly related to that. Your htop output seems to show several raspimjpeg processes running. That isn't right.There should only be 2, one main process and a watchdog version which has should have 0 cpu usage.

Restart and then use ps -A to check there are only two copies running. Wifi may be an issue if that is not reliable. I would certainly make sure recordings are local and then copied across using the boxing_path facility.
I can't get such a low CPU usage. You seem to be half right, when I record to my local SD-Card the load average goes down to 1.0 - 1.5 and utilization in % is 25 - 50.

Even when I stop all my cron scripts, make a clean reboot and start recoding via web interface, I can see 13 raspimjpeg processes. two are printed in white, all other in green, may that only bee threads of a process?

I can not get away from wifi recording, my camera was stolen last week. Only because of wifi recording I was able to give the face of the theft to the police. When I record to sdcard and upload every hour the whole video may be lost.

Is there any recommendation to lower the cpu usage while wifi recording (smb instead of nfs, tcp, udp... ... ...) some idea?

thx

EDIT: Changed to samba (Server is Win2008R2) and CPU load went to the same as writing to the SD card. NFS seemed to rise the load extremely, but can not imagine why. Now I have 25 - 50% with a load average of 1.0 - 1.5 and most times the CPU clock slows down to 700 mhz istead of the 1000 mhz.

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

Re: RPi Cam Web Interface

Tue Apr 10, 2018 10:08 am

ChAoSWK wrote:
Tue Apr 10, 2018 6:30 am


I can't get such a low CPU usage. You seem to be half right, when I record to my local SD-Card the load average goes down to 1.0 - 1.5 and utilization in % is 25 - 50.

Even when I stop all my cron scripts, make a clean reboot and start recoding via web interface, I can see 13 raspimjpeg processes. two are printed in white, all other in green, may that only bee threads of a process?

I can not get away from wifi recording, my camera was stolen last week. Only because of wifi recording I was able to give the face of the theft to the police. When I record to sdcard and upload every hour the whole video may be lost.

Is there any recommendation to lower the cpu usage while wifi recording (smb instead of nfs, tcp, udp... ... ...) some idea?

thx

EDIT: Changed to samba (Server is Win2008R2) and CPU load went to the same as writing to the SD card. NFS seemed to rise the load extremely, but can not imagine why. Now I have 25 - 50% with a load average of 1.0 - 1.5 and most times the CPU clock slows down to 700 mhz istead of the 1000 mhz.
On my piZero camera (wired not wifi) I get about 5.5% cpu on raspimjpeg when recording a video. Networking / wifi will increase load.

There should definitely only be 2 raspimjpeg processes showing in ps -A. Check the /etc/rc.local to make sure there is only one start up command in there. If you go into the RPi_Cam_Web_Interface folder and run ./stop.sh that should kill all raspimjpeg processes. Then a ./start.sh shoud start up and there should only be 2 running

ChAoSWK
Posts: 14
Joined: Fri Dec 04, 2015 11:34 am

Re: RPi Cam Web Interface

Wed Apr 11, 2018 1:34 pm

btidey wrote:

On my piZero camera (wired not wifi) I get about 5.5% cpu on raspimjpeg when recording a video. Networking / wifi will increase load.

There should definitely only be 2 raspimjpeg processes showing in ps -A. Check the /etc/rc.local to make sure there is only one start up command in there. If you go into the RPi_Cam_Web_Interface folder and run ./stop.sh that should kill all raspimjpeg processes. Then a ./start.sh shoud start up and there should only be 2 running
My indoor cam is build on a RPi1, it has between 10% and 20% with CPU load with NFS via wired network, the average load is 0.7.

So, you can think about it is the difference between wifi and wired lan (wifi has to handle a few more things like wpa encryption etc)...

But then, why is nfs so cpu intensive and samba not? The NFS mount options are the same on both pi. From the past I even know, NFS has much more performance than SMB.

ps -a tells me exactly 2 processes, while htop shows also the threads of the 2 processes...

Cavas
Posts: 2
Joined: Wed Apr 11, 2018 3:23 pm

Re: RPi Cam Web Interface

Wed Apr 11, 2018 3:26 pm

Hi,

I have juste installed it but I have this error message :

pi@raspberrypi:~/RPi_Cam_Web_Interface $ mmal: mmal_vc_component_enable: failed to enable component: ENOSPC
sh: 1: /var/www/html/macros/error_hard.sh: Permission denied

My Raspberry Pi is a model 3 B+ and I'm a beginner.

Any idea about that ?

Thanks

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

Re: RPi Cam Web Interface

Wed Apr 11, 2018 9:42 pm

Cavas wrote:
Wed Apr 11, 2018 3:26 pm
Hi,

I have juste installed it but I have this error message :

pi@raspberrypi:~/RPi_Cam_Web_Interface $ mmal: mmal_vc_component_enable: failed to enable component: ENOSPC
sh: 1: /var/www/html/macros/error_hard.sh: Permission denied

My Raspberry Pi is a model 3 B+ and I'm a beginner.

Any idea about that ?

Thanks
The error is caused by the software failing to initialise the connection to the camera. This can have several causes

Camera support not added in raspi-config
Camera cables not inserted properly into Raspberry or camera end
Small internal ribbon on camera module not connected well. (Press it down)
Not enough GPU memory allocated. gpu_mem in /boot/config.txt should be at least 128 (default)
Inadequate power supply (camera adds a bit of extra load). Note this can also be caused by a poor USB cable connecting the power supply to the raspberry

You can also check whether raspistill works. That is a basic test of the camera.

Shotingman03
Posts: 2
Joined: Mon Apr 09, 2018 1:28 pm

Re: RPi Cam Web Interface

Thu Apr 12, 2018 10:51 am

btidey wrote:
Mon Apr 09, 2018 8:51 pm
Shotingman03 wrote:
Mon Apr 09, 2018 1:32 pm
When I run start.sh it just says "This account is not available".
You need to supply a bit more information here.

Was the install successful> Did you choose autostart? When are you running ./start.sh (You don't normally need to do this)? Are you running under pi user or something else? If a different user does that user have sudo rights?
I just followed what the wiki told me to do.

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

Re: RPi Cam Web Interface

Thu Apr 12, 2018 11:31 am

Shotingman03 wrote:
Thu Apr 12, 2018 10:51 am
btidey wrote:
Mon Apr 09, 2018 8:51 pm
Shotingman03 wrote:
Mon Apr 09, 2018 1:32 pm
When I run start.sh it just says "This account is not available".
You need to supply a bit more information here.

Was the install successful> Did you choose autostart? When are you running ./start.sh (You don't normally need to do this)? Are you running under pi user or something else? If a different user does that user have sudo rights?
I just followed what the wiki told me to do.
The wiki does not say to run ./start.sh

After the end of ./install.sh you get asked whether to start now or not. You can also just reboot if you have chosen autostart.

I need to know if you are running as user pi?

Try also issuing the command groups www-data. It should come back and say www-data belongs to the video group

This will establish if there is a user called www-data which there should be if apache was installed correctly.

If not then I would suggest starting again with a clean OS and re-doing the install.

Cavas
Posts: 2
Joined: Wed Apr 11, 2018 3:23 pm

Re: RPi Cam Web Interface

Thu Apr 12, 2018 1:23 pm

btidey wrote:
Wed Apr 11, 2018 9:42 pm
Cavas wrote:
Wed Apr 11, 2018 3:26 pm
Hi,

I have juste installed it but I have this error message :

pi@raspberrypi:~/RPi_Cam_Web_Interface $ mmal: mmal_vc_component_enable: failed to enable component: ENOSPC
sh: 1: /var/www/html/macros/error_hard.sh: Permission denied

My Raspberry Pi is a model 3 B+ and I'm a beginner.

Any idea about that ?

Thanks
The error is caused by the software failing to initialise the connection to the camera. This can have several causes

Camera support not added in raspi-config
Camera cables not inserted properly into Raspberry or camera end
Small internal ribbon on camera module not connected well. (Press it down)
Not enough GPU memory allocated. gpu_mem in /boot/config.txt should be at least 128 (default)
Inadequate power supply (camera adds a bit of extra load). Note this can also be caused by a poor USB cable connecting the power supply to the raspberry

You can also check whether raspistill works. That is a basic test of the camera.

Thanks for answer.

- I checked if camera cables were properly inserted and I think that's OK (Attached photos)
- I increased GPU memory to 256
- I chedcked in raspi-config (5 - Interfacing options / P1 - Camera) and I have this message : "The camera interface is enabled"
- I use the official power supply (5V - 2.5 A https://www.kubii.fr/14-chargeurs-alime ... 10911.html)

I really don't understand what's wrong.

I try this command raspistill -o cam.jpg and it return :

pi@raspberrypi:~ $ raspistill -o cam.jpg
mmal: mmal_vc_component_enable: failed to enable component: ENOSPC
mmal: camera component couldn't be enabled
mmal: main: Failed to create camera component
mmal: Failed to run camera app. Please check for firmware updates

:?
Attachments
IMG_2246.jpg
IMG_2246.jpg (198.07 KiB) Viewed 766 times
IMG_2245.jpg
IMG_2245.jpg (186.4 KiB) Viewed 766 times
IMG_2247.jpg
IMG_2247.jpg (128.01 KiB) Viewed 766 times

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

Re: RPi Cam Web Interface

Thu Apr 12, 2018 3:34 pm

Cavas wrote:
Thu Apr 12, 2018 1:23 pm


Thanks for answer.

- I checked if camera cables were properly inserted and I think that's OK
- I increased GPU memory to 256
- I chedcked in raspi-config (5 - Interfacing options / P1 - Camera) and I have this message : "The camera interface is enabled"
- I use the official power supply (5V - 2.5 A https://www.kubii.fr/14-chargeurs-alime ... 10911.html)

I really don't understand what's wrong.

I try this command raspistill -o cam.jpg and it return :

pi@raspberrypi:~ $ raspistill -o cam.jpg
mmal: mmal_vc_component_enable: failed to enable component: ENOSPC
mmal: camera component couldn't be enabled
mmal: main: Failed to create camera component
mmal: Failed to run camera app. Please check for firmware updates

:?
As you get same error for raspistill that confirms it is a generic problem connecting to the camera.

I can't see anything specifically wrong in the photos. I would double check the cable connections to the camera including the tiny one on the module itself. Make sure the ribbon is well in before closing the connector latch (but it looks OK in the photos).

Other than that maybe it is a faulty camera module or a faulty interface on the raspberry. Do you have another raspberry to try the camera on? You can just use the raspistill test after enabling the camera to check that out.

Once you get it working then GPU 128 should be fine for RPI Cam use.

rjx-ray
Posts: 1
Joined: Sun Apr 15, 2018 10:51 am

Re: RPi Cam Web Interface

Sun Apr 15, 2018 11:04 am

I have RPI Cam Web Interface working well on a pi running wheezy and I now want to install it on a pi running jessie

But when I try to install I get

Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package php7.0
E: Couldn't find any package by regex 'php7.0'
E: Unable to locate package php7.0-cli
E: Couldn't find any package by regex 'php7.0-cli'
E: Unable to locate package libapache2-mod-php7.0
E: Couldn't find any package by regex 'libapache2-mod-php7.0'
awk: cannot open /etc/apache2/ports.conf (No such file or directory)
awk: cannot open /etc/apache2/ports.conf (No such file or directory)
mv: cannot move ‘etc/apache2/sites-available/raspicam.conf’ to ‘/etc/apache2/sites-available/raspicam.conf’: No such file or directory
ln: failed to create symbolic link ‘/etc/apache2/sites-enabled/raspicam.conf’: No such file or directory
sed: can't read /etc/apache2/conf.d/other-vhosts-access-log: No such file or directory
Failed to restart apache2.service: Unit apache2.service failed to load: No such file or directory.
sed: can't read /etc/motion/motion.conf: No such file or directory

I understand its an issue with apache, can I change the scripts in any way to get round this?

Or could I check out an older version and use that?

Thanks for any help

-Richard

Oliver2526
Posts: 12
Joined: Mon Jan 15, 2018 10:40 pm

Re: RPi Cam Web Interface

Sun Apr 15, 2018 2:22 pm

Hello,

first of all: the RPi Cam Web Interface is an excellent program. It generally works great and it makes fun to use!

Now to my problem:
I use the camera as a surveillance camera in combination with two IR-LED-Lamps for night vision (this one: https://www.amazon.com/Quimat-Raspberry ... dpSrc=srch). After 4 months of constant use, I experienced that the brightness during night drops gradually and in the hours before sunrise the image is almost black. First I thought that the power of the LED-Lamps decreases, however, after a reboot I can get the clearly visible image back again. As the lamps work independently from the software running on the Pi, I think the problem is somehow related with the brightness regulation in the RPi Cam Web Interface.

My hypotheses is that I use some kind of unstable camera settings... could please someone check them?

Here are my camera settings:
settings.png
settings.png (40.43 KiB) Viewed 464 times
settings2.png
settings2.png (23.37 KiB) Viewed 464 times

And these settings result in the following image which is ok since it is REALLY dark outside. However, the brightness of the image drops gradually and after 1, 2 hours the image is total black. As already said, a reboot recovers the image quality back again.
image.png
image.png (161.61 KiB) Viewed 464 times
Thanks!
Oliver

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

Re: RPi Cam Web Interface

Sun Apr 15, 2018 9:38 pm

rjx-ray wrote:
Sun Apr 15, 2018 11:04 am
I have RPI Cam Web Interface working well on a pi running wheezy and I now want to install it on a pi running jessie

But when I try to install I get

Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package php7.0
E: Couldn't find any package by regex 'php7.0'
E: Unable to locate package php7.0-cli
E: Couldn't find any package by regex 'php7.0-cli'
E: Unable to locate package libapache2-mod-php7.0
E: Couldn't find any package by regex 'libapache2-mod-php7.0'
awk: cannot open /etc/apache2/ports.conf (No such file or directory)
awk: cannot open /etc/apache2/ports.conf (No such file or directory)
mv: cannot move ‘etc/apache2/sites-available/raspicam.conf’ to ‘/etc/apache2/sites-available/raspicam.conf’: No such file or directory
ln: failed to create symbolic link ‘/etc/apache2/sites-enabled/raspicam.conf’: No such file or directory
sed: can't read /etc/apache2/conf.d/other-vhosts-access-log: No such file or directory
Failed to restart apache2.service: Unit apache2.service failed to load: No such file or directory.
sed: can't read /etc/motion/motion.conf: No such file or directory

I understand its an issue with apache, can I change the scripts in any way to get round this?

Or could I check out an older version and use that?

Thanks for any help

-Richard
The software works OK with Jessie and Stretch. The errors you are getting is with the install not finding the repositories.

This is either a temporary problem accessing the standard raspberry repositories which occasionally happens. It normally fixes itself if you try later.

It could also be the index location of the repositories is not up to date. That is why it is important to do the 2 sudo apt-get commands in the wiki before starting the install.

I know the location of some of the repositories changed around in the stretch environment recently but they will work if you do the updates. I guess it might be possible that these changes have somehow adversely affected Jessie.

I would recommend starting with latest Stretch, doing the updates and then doing the install.

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

Re: RPi Cam Web Interface

Sun Apr 15, 2018 9:48 pm

Oliver2526 wrote:
Sun Apr 15, 2018 2:22 pm
Hello,

first of all: the RPi Cam Web Interface is an excellent program. It generally works great and it makes fun to use!

Now to my problem:
I use the camera as a surveillance camera in combination with two IR-LED-Lamps for night vision (this one: https://www.amazon.com/Quimat-Raspberry ... dpSrc=srch). After 4 months of constant use, I experienced that the brightness during night drops gradually and in the hours before sunrise the image is almost black. First I thought that the power of the LED-Lamps decreases, however, after a reboot I can get the clearly visible image back again. As the lamps work independently from the software running on the Pi, I think the problem is somehow related with the brightness regulation in the RPi Cam Web Interface.

My hypotheses is that I use some kind of unstable camera settings... could please someone check them?

Here are my camera settings:


And these settings result in the following image which is ok since it is REALLY dark outside. However, the brightness of the image drops gradually and after 1, 2 hours the image is total black. As already said, a reboot recovers the image quality back again.
image.png

Thanks!
Oliver
Not sure at the moment what could cause this if reboot fixes it. Might be worth trying a stop / start of the camera to see if that does the same thing as that might give a clue as to where any change could lie. This can be done in two ways. First is to do stop camera / start camera from the web interface. Second is from the ~RPi_Cam_Web_Interface do a ./stop.sh followed by a ./start.sh command. That does a more drastic stop and restart of the software.

Under dark conditions it can also help quite a bit to drop the frame rate of the video so that it can accumulate more light in each frame. One can automate this change in the scheduler if you want to keep a high frame rate during daytime lighting conditions.

Oliver2526
Posts: 12
Joined: Mon Jan 15, 2018 10:40 pm

Re: RPi Cam Web Interface

Mon Apr 16, 2018 5:35 pm

Thanks for the fast reply! Ok, I will try your suggestions tonight and report the results.

Thanks for the help!
Oliver

Update: I noticed that the brighntess decrease is not continuous but occurs in several small steps every xxx minutes. Has anyone an idea what could cause this??

Oliver2526
Posts: 12
Joined: Mon Jan 15, 2018 10:40 pm

Re: RPi Cam Web Interface

Mon Apr 16, 2018 9:03 pm

Not sure at the moment what could cause this if reboot fixes it. Might be worth trying a stop / start of the camera to see if that does the same thing as that might give a clue as to where any change could lie. This can be done in two ways. First is to do stop camera / start camera from the web interface. Second is from the ~RPi_Cam_Web_Interface do a ./stop.sh followed by a ./start.sh command. That does a more drastic stop and restart of the software.

Under dark conditions it can also help quite a bit to drop the frame rate of the video so that it can accumulate more light in each frame. One can automate this change in the scheduler if you want to keep a high frame rate during daytime lighting conditions.
Ok, I tried the suggestions above, however, I was not very successful...

- A change of fps didn't show any effect (even if I recuded it to 5 fps the image remained dark)

- I don't know how to do a stop/start from the web interface, so I tried it over the command line. However, the software did crash after ./stop.sh (the Error was "Oops: 17 [#1] SMP ARM") and the followed ./start.sh had no effect. Even a reboot didn't bring the camera back. I had to manually disconnect and reconnect to whole Pi from the power supply.... :o

However, I found out that I can manually trigger the brightness drop by flashing a light (e.g. from my smartphone) into the camera. Afterwards the brightness doesn't go to its initial level. So, it seems that the brightness regulation got "stuck" somehow... Maybe, something similar happens over night. Very strange.

Thanks for any help!
- Oliver

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

Re: RPi Cam Web Interface

Mon Apr 16, 2018 9:26 pm

Oliver2526 wrote:
Mon Apr 16, 2018 9:03 pm


Ok, I tried the suggestions above, however, I was not very successful...

- A change of fps didn't show any effect (even if I recuded it to 5 fps the image remained dark)

- I don't know how to do a stop/start from the web interface, so I tried it over the command line. However, the software did crash after ./stop.sh (the Error was "Oops: 17 [#1] SMP ARM") and the followed ./start.sh had no effect. Even a reboot didn't bring the camera back. I had to manually disconnect and reconnect to whole Pi from the power supply.... :o

However, I found out that I can manually trigger the brightness drop by flashing a light (e.g. from my smartphone) into the camera. Afterwards the brightness doesn't go to its initial level. So, it seems that the brightness regulation got "stuck" somehow... Maybe, something similar happens over night. Very strange.

Thanks for any help!
- Oliver
There is a button on the web interface labelled stop camera. If this is activated the software disconnects from the camera but is still running. The button toggles to start camera.

The error during ./stop.sh sounds like a kernel error which is very strange. I have never had that. Sounds like something else might be wrong in the background. If that is repeatable I would be tempted to reinstall the OS.

The brightness theory sounds interesting. Maybe after the flash there is so little light that the camera isn't auto adjusting back properly.

Oliver2526
Posts: 12
Joined: Mon Jan 15, 2018 10:40 pm

Re: RPi Cam Web Interface

Mon Apr 16, 2018 10:24 pm

There is a button on the web interface labelled stop camera. If this is activated the software disconnects from the camera but is still running. The button toggles to start camera.
Ah, now I found it (the button was not active until I stopped 'motion detection'). And yes, indeed, with stopping/restarting the camera, I was able to readjust the brightness.
The error during ./stop.sh sounds like a kernel error which is very strange. I have never had that. Sounds like something else might be wrong in the background. If that is repeatable I would be tempted to reinstall the OS.
Yes, I had the software "Motion Eye" installed before. I uninstalled it, but maybe, there are some drivers left anywhere... by the way, I found that the process 'raspimjpeg' is running twice... is this normal??

Best regards,
Oliver

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

Re: RPi Cam Web Interface

Tue Apr 17, 2018 9:55 am

Oliver2526 wrote:
Mon Apr 16, 2018 10:24 pm
There is a button on the web interface labelled stop camera. If this is activated the software disconnects from the camera but is still running. The button toggles to start camera.
Ah, now I found it (the button was not active until I stopped 'motion detection'). And yes, indeed, with stopping/restarting the camera, I was able to readjust the brightness.
The error during ./stop.sh sounds like a kernel error which is very strange. I have never had that. Sounds like something else might be wrong in the background. If that is repeatable I would be tempted to reinstall the OS.
Yes, I had the software "Motion Eye" installed before. I uninstalled it, but maybe, there are some drivers left anywhere... by the way, I found that the process 'raspimjpeg' is running twice... is this normal??

Best regards,
Oliver
It is possible that a prior install of some camera related software might be having some effect on the kernel crash you saw. I doubt whether it would be affecting the brightness issue as if the s/w succeeds in connecting to the camera then it should own it. It is best to start with a fresh OS whenever possible.

As the brightness issue seems to get fixed with a stop / start of the camera then it sounds like it is something in the MMAL handling of brightness adjustment, maybe related to the dark overall picture and a flash of light. It might be worth starting a separate thread for that specific issue as it may make it more likely to get a response from the MMAL / camera module experts.

It is normal for the raspimjpeg to have 2 instances running. When you start raspimjpeg it spawns another copy of itself which acts a watchdog just monitoring the first process and attempting to recover if it dies.

Zuifer
Posts: 3
Joined: Mon Apr 16, 2018 11:02 pm

Re: RPi Cam Web Interface

Wed Apr 18, 2018 4:47 pm

Hello everybody

Preview works fine. When i started record, after a couple of minutes the preview freezed and i cant log in anymore.

Pi Zero W
128MB GPU
update raspbian like in the instructions


Log of debug.sh:

Code: Select all

pi@raspberrypi:~/RPi_Cam_Web_Interface $ ./debug.sh 
start monitoring for pid: 744
{2018/04/18 15:45:19} start monitoring for pid: 744
RaspiMJPEG Version 5.8.10
recommended video buffer size 65536
h264 size set to 131072
recommended video buffers 1
h264 buffers set to recommended 1
Opening FIFO 0 /var/www/html/FIFO 7
Opening FIFO 1 /var/www/html/FIFO11 8
MJPEG streaming, ready to receive commands
send smd 9
pi@raspberrypi:~/RPi_Cam_Web_Interface $ Starting command loop
Already stopped. Ignore 
Capturing started

Message from syslogd@raspberrypi at Apr 18 15:51:36 ...
 kernel:[  617.452980] Internal error: Oops - BUG: 0 [#1] ARM

Message from syslogd@raspberrypi at Apr 18 15:51:36 ...
 kernel:[  617.575223] Internal error: Oops: 805 [#2] ARM

Message from syslogd@raspberrypi at Apr 18 15:51:36 ...
 kernel:[  617.575303] Process apache2 (pid: 603, stack limit = 0xd4c7c188)

Message from syslogd@raspberrypi at Apr 18 15:51:36 ...
 kernel:[  617.575305] Stack: (0xd4c7d9f0 to 0xd4c7e000)

Message from syslogd@raspberrypi at Apr 18 15:51:36 ...
 kernel:[  617.575309] d9e0:                                     00000008 00000000 d4c7da24 00000005

Message from syslogd@raspberrypi at Apr 18 15:51:36 ...
 kernel:[  617.575316] da00: 00001c80 00000000 00000006 000000c0 00000006 dd9e001c d4c7da34 00000000

Message from syslogd@raspberrypi at Apr 18 15:51:36 ...
 kernel:[  617.575320] da20: d703f8f6 d72a695c 00000000 d7028400 00000001 000000ff d4c7da54 d4c7da48
Another test with default stream, no mp4box. After 1-3 minutes after starting the record, the preview freezed but login is possible

Log:

Code: Select all

./debug.sh 
start monitoring for pid: 747
{2018/04/18 16:34:37} start monitoring for pid: 747
RaspiMJPEG Version 5.8.10
recommended video buffer size 65536
h264 size set to 131072
recommended video buffers 1
h264 buffers set to recommended 1
Opening FIFO 0 /var/www/html/FIFO 7
Opening FIFO 1 /var/www/html/FIFO11 8
MJPEG streaming, ready to receive commands
send smd 9
pi@raspberrypi:~/RPi_Cam_Web_Interface $ Starting command loop
Capturing image
Capturing image
Capturing started
Capturing stopped
Add /var/www/html/media/vi_0004_20180418_163615.mp4 to Box Queue at pos 0
Start boxing /var/www/html/media/vi_0004_20180418_163615.h264 to /var/www/html/media/vi_0004_20180418_163615.mp4 Queue pos 0
Finished boxing /var/www/html/media/vi_0004_20180418_163615.mp4 from Box Queue at pos 0
Removed item from Box Queue
Change: MP4Box = 0
Capturing started

Message from syslogd@raspberrypi at Apr 18 16:39:49 ...
 kernel:[  415.510799] Internal error: Oops: 17 [#1] ARM

Message from syslogd@raspberrypi at Apr 18 16:39:49 ...
 kernel:[  415.576847] Process kworker/0:1 (pid: 10, stack limit = 0xd7150188)

Message from syslogd@raspberrypi at Apr 18 16:39:49 ...
 kernel:[  415.581623] Stack: (0xd7151e78 to 0xd7152000)

Message from syslogd@raspberrypi at Apr 18 16:39:49 ...
 kernel:[  415.586436] 1e60:                                                       00000001 00000001

Message from syslogd@raspberrypi at Apr 18 16:39:49 ...
 kernel:[  415.592464] 1e80: d7ea6a10 c09be368 d7c73af8 d7c73aec 00000016 00000016 c0046aec 20000013





I don't know, maybe my board is broken. Or the camera. It is a cheap 5MP one. But on the other side streaming and capturing with vlc/ffmpeg do work and is stable.


Anybody have similar problems regarding zero w and cameras?

Thanks

Oliver2526
Posts: 12
Joined: Mon Jan 15, 2018 10:40 pm

Re: RPi Cam Web Interface

Wed Apr 18, 2018 6:26 pm

It might be worth starting a separate thread for that specific issue as it may make it more likely to get a response from the MMAL / camera module experts.
Ok, I just started a new thread in this board.

Thanks again for all the help!

Regards,
Oliver

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

Re: RPi Cam Web Interface

Wed Apr 18, 2018 9:15 pm

Zuifer wrote:
Wed Apr 18, 2018 4:47 pm
Hello everybody

Preview works fine. When i started record, after a couple of minutes the preview freezed and i cant log in anymore.

Pi Zero W
128MB GPU
update raspbian like in the instructions


Log of debug.sh:


Another test with default stream, no mp4box. After 1-3 minutes after starting the record, the preview freezed but login is possible

Log:

I don't know, maybe my board is broken. Or the camera. It is a cheap 5MP one. But on the other side streaming and capturing with vlc/ffmpeg do work and is stable.


Anybody have similar problems regarding zero w and cameras?

Thanks
I don't think this is necessarily related to the board. Those errors you are getting are kernel errors indicating some more general problem.

How are you powering the board; power supply and connecting cable? DId you install any other software other than going through the wiki instructions?

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

Re: RPi Cam Web Interface

Fri Apr 20, 2018 3:55 am

Using ffmpeg instead of gkstreamer

Hi I'm using a pi 3 running existing apps on raspberian stretch and installed RPi Cam on that. It generally works extremely well, but I think I'm not alone in failing to get gkstreamer working to create a movie from some timelapse files. What I can do is run ffmpeg (which has omx_pi support built in under stretch) and that works fine, although it isn't as fast as I expected. I took the liberty of replacing the convertCmd.txt files with
/usr/bin/ffmpeg -f image2 -i i_%05d.jpg

(and I put an extra space on the end) and that seems to work fine, albeit slowly; you can see ffmpeg running in top like a good 'un. Maybe a nice in there would be good :-) With a -vcodec h264_omx put in at the end, again with an extra space to be sure, it still works, but takes the same length of time.

But at least it works. Has anyone got this to use the GPU for faster encoding at all or got the original gksteamer to work with stretch?

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

Re: RPi Cam Web Interface

Fri Apr 20, 2018 11:23 am

dmshimself wrote:
Fri Apr 20, 2018 3:55 am
Using ffmpeg instead of gkstreamer

Hi I'm using a pi 3 running existing apps on raspberian stretch and installed RPi Cam on that. It generally works extremely well, but I think I'm not alone in failing to get gkstreamer working to create a movie from some timelapse files. What I can do is run ffmpeg (which has omx_pi support built in under stretch) and that works fine, although it isn't as fast as I expected. I took the liberty of replacing the convertCmd.txt files with
/usr/bin/ffmpeg -f image2 -i i_%05d.jpg

(and I put an extra space on the end) and that seems to work fine, albeit slowly; you can see ffmpeg running in top like a good 'un. Maybe a nice in there would be good :-) With a -vcodec h264_omx put in at the end, again with an extra space to be sure, it still works, but takes the same length of time.

But at least it works. Has anyone got this to use the GPU for faster encoding at all or got the original gksteamer to work with stretch?
Thanks.

Originally we used to use ffmmpeg for this conversion. It got replaced by gkstreamer as the default as it was much faster (gpu) and ffmpeg struggled on low end Pi models. However, it then seems to have got bust by some OS changes in late jessie and stretch which didn't seem to update all the gkstreamer modules.

I'll continue to monitor this to see if gkstreamer gets fixed. In the meantime maybe it would be best to revert to ffmpeg as the default like you have done. The convertCmd.txt was put in so that changes like this could be made.

Return to “Camera board”

Who is online

Users browsing this forum: No registered users and 11 guests