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

Re: RPi Cam Web Interface - freezing system

Fri May 15, 2015 12:22 pm

boomlikethat wrote:Hey Robert,

I'm using the latest version (5.1.6), and am still experiencing freezing issues on both of my RPIs (one B, one B+, both using latest stuff, and 128 meg GPU).

Here's a snippet of the log, maybe this will help:

{2015/05/13 16:59:41} Capturing stopped
{2015/05/13 16:59:41} Add /var/www/media/0036_2015.05.13_16.59.35.mp4 to Box Queue at pos 12
{2015/05/13 16:59:41} Start boxing /var/www/media/0036_2015.05.13_16.59.35.mp4 from Box Queue at pos 12
{2015/05/13 16:59:44} Finished boxing /var/www/media/0036_2015.05.13_16.59.35.mp4 from Box Queue at pos 12
[2015/05/13 16:59:55] Scheduled management tasks. Next at 1431554395
[2015/05/13 17:01:20] Start capture requested
[2015/05/13 17:01:20] Send ca 1
{2015/05/13 17:01:20} Capturing started
[2015/05/13 17:01:23] Stop capture requested
[2015/05/13 17:01:23] Send ca 0
{2015/05/13 17:01:23} Error: Could not send buffers to port
{2015/05/13 17:01:24} RaspiMJPEG Version 5.1.3
{2015/05/13 17:01:24} Error: Could not enable camera
{2015/05/13 17:01:25} RaspiMJPEG Version 5.1.3

I need to restart every day, at seemingly random times does the crash occur.

I'm stumped. Thanks.
The initial error buffers to port is occurring during a callback from the camera MMAL software when raspimjpeg tries to give it a new buffer to write into. That is a fatal error and raspimjpeg then restarts automatically but then can't connect to the camera at all. So something has cracked up in the lower level software requiring a full restart.

2 suggestions at the moment. Have you got latest updates and rpi-update? Are you sure your power supply is good? The camera does draw quite a bit more and if the supply is marginal or the USB cable is dropping some volts then it might be making the hardware a bit flaky.

johng
Posts: 41
Joined: Thu Apr 23, 2015 10:00 am

Re: RPi Cam Web Interface

Mon May 18, 2015 9:32 am

I am still getting iframe errors. I am running 5.1.6 (although the schedule log still refers to it as 5.1.3) and last night produced a 17MB schedule log which, with iframe errors removed, reduced to 2KB. Iframe errors run at approx 50 per second. Doing an installer stop doesn't halt it and it continues adding iframe errors to the log. As a result(?) the boxing queue overflows and I am left with a pile of h264s which I convert manually. The only solution is to reboot after which it runs for a few hours or so and then iframe errors start again. They seem to start slowly and then build up.

Is there any other log that I should be checking to find out what is going on?

As a wishlist, would it be possible to add variables in the raspimjpeg config file to the schedule log settings so that one could write a daily log such as one can do with the videos etc, eg

Code: Select all

log_file /var/www/media/log/%Y%M%D/scheduleLog.txt
. or similar.

Many thanks John G

PS forgot to mention

1. it is occasionally producing huge video files, 2MB to 7MB. I have checked them and they have long periods of no motion in them.

2. The box queue is overflowing so that boxing stops. schedule log shows

Code: Select all

{2015/05/18 11:23:13} Capturing started
{2015/05/18 11:23:24} Capturing stopped
{2015/05/18 11:23:25} Add /var/www/media/film/20150518/112311.mp4 to Box Queue at pos 11
{2015/05/18 11:23:28} Capturing started
{2015/05/18 11:23:34} Capturing stopped
{2015/05/18 11:23:37} Box queue full. Skipped 
lookinmg at the log, there was a 2.4MB h264 file at 10.32, unboxed since when all unboxed so it looks as if the large file is frying the boxing. The last boxed file is the video recorded at 103123 but not boxed (per file timestamp) until 11.31. I suspect that I have to restart to clear the overloaded box queue.
Last edited by johng on Mon May 18, 2015 11:09 am, edited 1 time in total.

johng
Posts: 41
Joined: Thu Apr 23, 2015 10:00 am

Re: RPi Cam Web Interface

Mon May 18, 2015 9:48 am

btidey wrote:
lassiko wrote:
jbeale wrote:The RPi cam software works only with the RPi camera (the little $25 board that connects to the Pi board using the 15-way ribbon cable, not USB). There are two separate versions of the camera hardware, the normal version (green PCB) with an IR-block filter, and the Pi No-IR (black PCB) which has no IR filter so it can see near-infrared as well as normal light. There is no software-selectable "IR mode" unless you mean just convert the color image to black&white, which you can do.

There are some IP security cameras, usually with a wireless or ethernet connection that have a mechanical solenoid to push an IR filter in and out of the optical path under computer control, but that is a different category of camera; not something you can control with the RPi Cam software as far as I know.
I have normal, green PCB camera attached to my raspi at the moment. I was just wondering that if i buy NoIR camera, that would work also with RPi cam software? I also have a IR led light source i could use at night with NoIR camera.
Yes. This software will run fine with NoIR camera; I use one NoIR myself. As jbeale said the only difference is the filter in front of the sensor. There is no difference in the sensor or electronics.
If you google "ircut filter with raspberry pi" there are a number of posts. The thread at .

Code: Select all

https://www.raspberrypi.org/forums/viewtopic.php?f=37&t=96997
. gives a working example to which you would need to add a light sensor to control it. (I have all the bits but haven't yet had time to try it (and anyway the pi is in a nestbox and they've just hatched)). Presumably one could then control it from a script called from RPiCamWebInterface either polling the light sensor or relying on the dawn/dusk schedule.

John G

rahlquist
Posts: 149
Joined: Tue Jan 21, 2014 1:02 pm

Re: RPi Cam Web Interface

Mon May 18, 2015 11:36 am

FWIW, I had been using my pi to record on motion detect. I was having it NOT do the mp4 wrapping and was letting my media server where the recorded videos are moved to via incron do the wrapping. More than 60% are erroring with "Cannot find H264 start code". So I decided to apply all the latest updates including rpi-update and the latest updates to this project. Now I get no video preview and nothing seems to work.

here is a link to one of the non working video files, hopefully this can be fixed soon
https://www.dropbox.com/s/v0xlt9a11eb6j ... .h264?dl=0

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

Re: RPi Cam Web Interface

Mon May 18, 2015 1:20 pm

rahlquist wrote:FWIW, I had been using my pi to record on motion detect. I was having it NOT do the mp4 wrapping and was letting my media server where the recorded videos are moved to via incron do the wrapping. More than 60% are erroring with "Cannot find H264 start code". So I decided to apply all the latest updates including rpi-update and the latest updates to this project. Now I get no video preview and nothing seems to work.

here is a link to one of the non working video files, hopefully this can be fixed soon
https://www.dropbox.com/s/v0xlt9a11eb6j ... .h264?dl=0
If you haven't updated for a while then you may be having difficulties with a change in permissions made a little while back. Previousy raspimjpeg used to run as root, now it runs as www-data to enhance security. This doesn't normally impact local storage but if you have mounted external storage then you need to let user www-data have permission to access that.

The can't find h264 error would normaaly be triggered by the h264 file not having a header sequence 0x00000001. I have just tried storing a local h264 and that was fine. Note also that mp4boxing now happens on the Pi as a queued background task when enabled so is fairly unobtrusive when done there.

The first 2MB of your file is just full of 0's which is probably why it is complaining. Are you using he buffer mode facility? If so thne I would advise using at least 3000mS as the setting. Low values can cause problems.

Review again when you have latest version running.

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

Re: RPi Cam Web Interface

Mon May 18, 2015 1:43 pm

johng wrote:I am still getting iframe errors. I am running 5.1.6 (although the schedule log still refers to it as 5.1.3) and last night produced a 17MB schedule log which, with iframe errors removed, reduced to 2KB.
Is there any other log that I should be checking to find out what is going on?

As a wishlist, would it be possible to add variables in the raspimjpeg config file to the schedule log settings so that one could write a daily log such as one can do with the videos etc, eg

Code: Select all

log_file /var/www/media/log/%Y%M%D/scheduleLog.txt
. or similar.

Many thanks John G

PS forgot to mention

1. it is occasionally producing huge video files, 2MB to 7MB. I have checked them and they have long periods of no motion in them.

2. The box queue is overflowing so that boxing stops. schedule log shows

Code: Select all

{2015/05/18 11:23:13} Capturing started
{2015/05/18 11:23:24} Capturing stopped
{2015/05/18 11:23:25} Add /var/www/media/film/20150518/112311.mp4 to Box Queue at pos 11
{2015/05/18 11:23:28} Capturing started
{2015/05/18 11:23:34} Capturing stopped
{2015/05/18 11:23:37} Box queue full. Skipped 
lookinmg at the log, there was a 2.4MB h264 file at 10.32, unboxed since when all unboxed so it looks as if the large file is frying the boxing. The last boxed file is the video recorded at 103123 but not boxed (per file timestamp) until 11.31. I suspect that I have to restart to clear the overloaded box queue.
The web version and the raspimjpeg version can be different as they get updated separately The log is just recording the version raspimjpeg reports.

The iframe errors do seem to vary quite a bit from system to system. Some get very few. Some get a few bursts and a few get longer bursts that do generate a lot of logging. It is associated with the use of the circular buffer as one has to track where the iframe starts are, and somehow that seems to get out of sync sometimes. One can avoid it by switching off the buffer but then you lose the pre-capture before motion triggers. There have been some changes made in this area in the version where we are trying to integrate motion detection directly in. That seems to make it much more stable in the iframe pointer area, but the motion detect algorithm isn't good enough yet to make this a viable replacement.

2 to 7MB video files are quite small and shouldn't be causing any boxing issues. The way the boxing queue works is it allows up to 30 box commands to be outstanding and then will skip any further ones. But in practice the boxing is much faster than video recording so there should never be more than a couple of boxing commands queued. It sounds more like one specific box command got hung up and that then allowed the queue to build up.

Is this running on a Pi A or B?

I'll look at doing something with log archiving. It is a little bit more tricky because several things write to the log file and the name is controlled from both the web side and raspimjpeg. It may be easier to leave it logging like it is but then archive it and start it again once per day.

coderaemon
Posts: 11
Joined: Thu Apr 09, 2015 6:45 am

Re: RPi Cam Web Interface

Mon May 18, 2015 1:50 pm

While RPi Cam Web Interface is running I won't able to use raspistill , raspivid commands?
So I stop Rpi Cam Web interface using the command
./RPi_Cam_Web_Interface_Installer.sh stop
Now raspistill/raspivid works . But I want to use picamera now to record vide. On running a python script
python record_video.py
It says
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/lib/python2.7/dist-packages/picamera/__init__.py", line 82, in <module>
from picamera.camera import PiCamera
File "/usr/lib/python2.7/dist-packages/picamera/camera.py", line 81, in <module>
import mimetypes
File "/usr/lib/python2.7/mimetypes.py", line 29, in <module>
import urllib
File "/usr/lib/python2.7/urllib.py", line 26, in <module>
import socket
File "socket.py", line 6, in <module>
server_socket = socket.socket()
TypeError: 'module' object is not callable

Why python picamera is not working while RPI web interface is even stopped? When RPI interface is runningI can understand but why not working while its stopped.

xab
Posts: 23
Joined: Sat Jan 24, 2015 1:24 pm

Re: RPi Cam Web Interface

Mon May 18, 2015 4:15 pm

I have a question.. Is there a difference between "RaspiMJPEG" and "raspimjpeg"? If there is, what is it? If one were to refer to this , which one should be used?

rahlquist
Posts: 149
Joined: Tue Jan 21, 2014 1:02 pm

Re: RPi Cam Web Interface

Mon May 18, 2015 6:42 pm

btidey wrote: If you haven't updated for a while then you may be having difficulties with a change in permissions made a little while back. Previousy raspimjpeg used to run as root, now it runs as www-data to enhance security. This doesn't normally impact local storage but if you have mounted external storage then you need to let user www-data have permission to access that.
Interesting I had been running 5.1.4 until I started to see the errors. Then updated and poof things no longer worked at all.

So seeing as you mentioned there were some core changes I figured the best thing was to uninstall and re-install and that fixed it.

Thanks!

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

Re: RPi Cam Web Interface

Mon May 18, 2015 8:06 pm

xab wrote:I have a question.. Is there a difference between "RaspiMJPEG" and "raspimjpeg"? If there is, what is it? If one were to refer to this , which one should be used?
The executable is all lower case 'raspimjpeg'. This was built originally on source code RaspiMJPEG.c and although that still exists it has been split into several source files now.

On the forums I don't think we care as a general reference unless referring to a specific file to use. As most people are interested in the binary the lower case version would probably make most sense.

User avatar
gigpi
Posts: 17
Joined: Thu May 14, 2015 12:23 pm

Re: RPi Cam Web Interface

Mon May 18, 2015 9:10 pm

btidey wrote:Thanks for that. There must be some dependency on Rasbian version there or maybe an interaction with other software, as I haven't seen that startpar behaviour myself.

I have added the redirects in to avoid the problem there.

Your comment on the installer with respect to overwrite is in our issues list together with some other installer 'unfriendliness' like overwriting Apache settings etc. Append can help but then there has to be checks to makes sure one is doing extra appends during upgrades. One can check for previous stuff and skip but then one might not be doing a change one wants to do. Really we should be deleting previous stuff before adding stuff during upgrades. Not too difficult to do but can be time consuming to test.

Always happy to receive code / installer mods!
Thanks for answering and fixing main code!
What i forgot to say in my previous post is that i install always in a subdir of /var/www, so maybe the startpar behaviour was caused by that, i tried to investigate myself but command git checkout PREV_COMMIT tricked me installing always last version with error redirection fix included...so i gave up there :P

Regarding rc.local ovewrite issue, i think you are right, deleting Raspimjpeg section block should be a better way than just appending, maybe sed or awk could help but i'm not fully sure. In any case if you want/need a tester i'm here :)

I found some other things to be fixed:
- if you install in a /var/www/ custom subdir motion stop to record, you need to manually modify path to "/var/www/FIFO1" and "/var/www/FIFO" in schedule.php, stopping and restarting schedule in its options page to take effect
- motion settings can't be saved (both with default install path and also with a custom one), file /etc/motion/motion.conf is correctly assigned to root:www-data as i read back at page 85, but doesn't have writing permission for the group, so a "chmod g+w /etc/motion/motion.conf" is needed to save options via web
- on the wiki troubleshooting section, "echo 'start' >> ~/motion.txt" is repeated 2 times, i think second one should be "echo 'stop' >> ~/motion.txt"

I also looked at Skalad tilt/pan version (if this thread it's only for official version sorry to have posted) and found that if you want to install in a /var/www subdir and want to use tilt/pan buttons you need to manually set the path in "up.sh", "down.sh", "left.sh", "right.sh" and "control-child.php" files.
You also need to modify "schedule.php" same as above if you want motion to record video.
Plus, when you install in a subdir it creates 2 version of FIFO1, one in the subdir and the other in /var/www/, but this seems to affecting nothing :)
I really hope Skalad developer read here and can fix them.

All my testing was done with a rpi2 B model and latest 2015-05-05 raspbian.

BTW, there are plans for merging servoblaster tilt/pan functions and original project in the future? I've done it myself and got it working, but i'd prefer upgrading from one place only, also, job done by real developers works better than mine :)

Hello!

johng
Posts: 41
Joined: Thu Apr 23, 2015 10:00 am

Re: RPi Cam Web Interface

Mon May 18, 2015 9:15 pm

by btidey » Mon May 18, 2015 1:43 pm
johng wrote:
I am still getting iframe errors. I am running 5.1.6 (although the schedule log still refers to it as 5.1.3) and last night produced a 17MB schedule log which, with iframe errors removed, reduced to 2KB.
Is there any other log that I should be checking to find out what is going on?

As a wishlist, would it be possible to add variables in the raspimjpeg config file to the schedule log settings so that one could write a daily log such as one can do with the videos etc, eg

Code: Select all
log_file /var/www/media/log/%Y%M%D/scheduleLog.txt

. or similar.

Many thanks John G

PS forgot to mention

1. it is occasionally producing huge video files, 2MB to 7MB. I have checked them and they have long periods of no motion in them.

2. The box queue is overflowing so that boxing stops. schedule log shows

Code: Select all
{2015/05/18 11:23:13} Capturing started
{2015/05/18 11:23:24} Capturing stopped
{2015/05/18 11:23:25} Add /var/www/media/film/20150518/112311.mp4 to Box Queue at pos 11
{2015/05/18 11:23:28} Capturing started
{2015/05/18 11:23:34} Capturing stopped
{2015/05/18 11:23:37} Box queue full. Skipped

lookinmg at the log, there was a 2.4MB h264 file at 10.32, unboxed since when all unboxed so it looks as if the large file is frying the boxing. The last boxed file is the video recorded at 103123 but not boxed (per file timestamp) until 11.31. I suspect that I have to restart to clear the overloaded box queue.




The web version and the raspimjpeg version can be different as they get updated separately The log is just recording the version raspimjpeg reports.

The iframe errors do seem to vary quite a bit from system to system. Some get very few. Some get a few bursts and a few get longer bursts that do generate a lot of logging. It is associated with the use of the circular buffer as one has to track where the iframe starts are, and somehow that seems to get out of sync sometimes. One can avoid it by switching off the buffer but then you lose the pre-capture before motion triggers. There have been some changes made in this area in the version where we are trying to integrate motion detection directly in. That seems to make it much more stable in the iframe pointer area, but the motion detect algorithm isn't good enough yet to make this a viable replacement.

2 to 7MB video files are quite small and shouldn't be causing any boxing issues. The way the boxing queue works is it allows up to 30 box commands to be outstanding and then will skip any further ones. But in practice the boxing is much faster than video recording so there should never be more than a couple of boxing commands queued. It sounds more like one specific box command got hung up and that then allowed the queue to build up.

Is this running on a Pi A or B?

I'll look at doing something with log archiving. It is a little bit more tricky because several things write to the log file and the name is controlled from both the web side and raspimjpeg. It may be easier to leave it logging like it is but then archive it and start it again once per day.
It's running on a B+. I have another one running on a Pi 2 and 5.1.3 which seems much more stable. With the B+ I am fairly regularly getting the boxing queue building up. Also stopping and restarting with the installer via SSH or stooping and starting Motion and Camera in the browser don't seem to work; I have to reboot to get it going again. I'm writing to a windows shared folder bound to /var/www/media in case that might be relevant.

Presumably another option would be to turn off boxing and do it at the end of each day (when I'm merging the day's files anyway). Not sure where to find turn off boxing but will have a look...
Many thanks, johng

miraaz
Posts: 34
Joined: Tue May 19, 2015 9:28 am

Re: RPi Cam Web Interface

Tue May 19, 2015 9:38 am

Why not add in "RPi_Cam_Web_Interface_Installer.sh" line:
cd $(dirname $(readlink -f $0))
Then not needed to cd in script directory first.

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

Re: RPi Cam Web Interface

Tue May 19, 2015 12:43 pm

I'm running v5.1.3, and I'm not able to connect to the clean.php Has it now been removed?
Kanga-Who wrote:
Mettauk wrote:
Kanga-Who wrote:Hi all,

I'm having an issue getting the boot settings to stick with my new B2. I have a B+ running RPi cam v 4.2.3, and can navigate to 'cd RPi_Cam_Web_Interface/etc/raspimjpeg/' and 'run sudo nano raspimjpeg', and change the boot config and rename the camera and have it boot in 'night' mode'.
You seem to be editing the wrong file... Try

Code: Select all

sudo nano /etc/raspimjpeg
is the correct one, not as you have it in your post as; RPi_Cam_Web_Interface/etc/raspimjpeg/ that's the wrong file.
Thanks so much, I did have that saved in my little txt doc with shortcuts, but for some reason thought I needed to be in the RPi_Web_Cam_Interface directory to run it.

Very much appreciated the prompt response.

Also, I use the 'myipaddress:port/clean.php' and it works on my B+, but the same address on the B2 does not work, is there a work around for this? Loving the B2 so far!
3b+, 2b, b+, b, Zero & Zero-W

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

Re: RPi Cam Web Interface

Tue May 19, 2015 6:05 pm

Gary Littlemore wrote:I'm running v5.1.3, and I'm not able to connect to the clean.php Has it now been removed?
I believe clean.php was removed quite a while ago.

The Wiki has instructions under 'Embed live-preview in own homepage' on how to get simple access. This is effectively what clean.php was.

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

Re: RPi Cam Web Interface

Tue May 19, 2015 6:09 pm

johng wrote:
It's running on a B+. I have another one running on a Pi 2 and 5.1.3 which seems much more stable. With the B+ I am fairly regularly getting the boxing queue building up. Also stopping and restarting with the installer via SSH or stooping and starting Motion and Camera in the browser don't seem to work; I have to reboot to get it going again. I'm writing to a windows shared folder bound to /var/www/media in case that might be relevant.

Presumably another option would be to turn off boxing and do it at the end of each day (when I'm merging the day's files anyway). Not sure where to find turn off boxing but will have a look...
Many thanks, johng
It is possible your use of the window share is slowing down the boxing operation if the access over the network is slow for some reason. Even on a B I find boxing only takes about 25% of the recording time when local file store is used. It would be interesting to post a zip of a bit of log where queue is building up to see the timing.

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

Re: RPi Cam Web Interface

Tue May 19, 2015 6:12 pm

gigpi wrote:
BTW, there are plans for merging servoblaster tilt/pan functions and original project in the future? I've done it myself and got it working, but i'd prefer upgrading from one place only, also, job done by real developers works better than mine :)

Hello!
We could look at merging those tilt pan functions in. However, we have to be a bit careful as there is already pan-pi stuff in there already and I don't want to break that for any people using that.

kevw
Posts: 22
Joined: Wed Aug 27, 2014 1:49 pm

Re: RPi Cam Web Interface

Wed May 20, 2015 8:22 am

Morning,

I was looking at the sensor region to isolate a area in the frame but it doesn't seem to work as expected. I did a test W & H of 500 x 500 and tried 'moving' this around with the X & Y but I got strange results in that the area didn't move..same for a smaller 100x100 W&H - I was expecting to be able to move the small window around the FOV

I'm running 5.1.6 on an RPI 2

Kind regards,

Kev

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

Re: RPi Cam Web Interface

Wed May 20, 2015 9:18 am

miraaz wrote:Why not add in "RPi_Cam_Web_Interface_Installer.sh" line:
cd $(dirname $(readlink -f $0))
Then not needed to cd in script directory first.
Pull request merged in for this now.

johng
Posts: 41
Joined: Thu Apr 23, 2015 10:00 am

Re: RPi Cam Web Interface

Wed May 20, 2015 9:43 am

btidey wrote:
johng wrote:
It's running on a B+. I have another one running on a Pi 2 and 5.1.3 which seems much more stable. With the B+ I am fairly regularly getting the boxing queue building up. Also stopping and restarting with the installer via SSH or stooping and starting Motion and Camera in the browser don't seem to work; I have to reboot to get it going again. I'm writing to a windows shared folder bound to /var/www/media in case that might be relevant.

Presumably another option would be to turn off boxing and do it at the end of each day (when I'm merging the day's files anyway). Not sure where to find turn off boxing but will have a look...
Many thanks, johng
It is possible your use of the window share is slowing down the boxing operation if the access over the network is slow for some reason. Even on a B I find boxing only takes about 25% of the recording time when local file store is used. It would be interesting to post a zip of a bit of log where queue is building up to see the timing.
Many thanks for your help. I think you're right. It's running on one of those BT extender things which is the only way that I can get ethernet outside the house and it had started to run really slowly (ping round trip approx 600ms). Have rebooted everything and now back running at good speed, almost the same as direct ethernet connection.
Having said which, I've left it running this morning saving to the SD card per default to get a comparison and I'll put it onto the windows share later. Will look through logs to get an example of boxing overflow.
I also tried turning off boxing by changing MP4 Boxing Mode to false via the browser. It continued to produce MP4 files rather than h264 but the files were unreadable (Windows media viewer, Quicktime and VLC viewer all rejected them). If I change MPBox4 in raspimjpeg to False does this do the same thing or will I get h264 files (which I can then bulk convert)? Presumably this would also kill the iframe errors?

Thanks again, Johng

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

Re: RPi Cam Web Interface

Wed May 20, 2015 4:21 pm

johng wrote: Many thanks for your help. I think you're right. It's running on one of those BT extender things which is the only way that I can get ethernet outside the house and it had started to run really slowly (ping round trip approx 600ms). Have rebooted everything and now back running at good speed, almost the same as direct ethernet connection.
Having said which, I've left it running this morning saving to the SD card per default to get a comparison and I'll put it onto the windows share later. Will look through logs to get an example of boxing overflow.
I also tried turning off boxing by changing MP4 Boxing Mode to false via the browser. It continued to produce MP4 files rather than h264 but the files were unreadable (Windows media viewer, Quicktime and VLC viewer all rejected them). If I change MPBox4 in raspimjpeg to False does this do the same thing or will I get h264 files (which I can then bulk convert)? Presumably this would also kill the iframe errors?

Thanks again, Johng
Changing Boxing mode should be the same from either browser control or raspimjpeg and seems to work for me. I can chnage in the browser, run a file and change it back again and end up with an h264 file. There was a 'feature' that unboxed files could still get labelled as .mp4 even though they weren't. That has been changed in recent versions after 5th May.

One little trick that might be possible to help in situations like this is to use the macro facility to run a script after capture end commands. This can be done in the scheduler. This way you could always capture locally and then copy with the macro to its final destination.

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

Re: RPi Cam Web Interface

Wed May 20, 2015 4:39 pm

*** Important ***
I have pushed a largish change. It seems OK but be prepared, you may need to revert. One way to do this is just to keep a local copy of the changed files before upgrading. These are (index and config php in www folder, script.js in www/js folder, the raspimjpeg binary in opt/vc/bin, and the raspimjpeg config in /etc.

The motivation here was to move to some changes in the camera interfacing which have been made which seem to help in the on-going iframe error issue although I don't think it totally resolves them. If they occur then we do get some extra debug in the logs which will help.

These changes were part of the move to inbuilt motion detection to replace the separate motion process. This is not yet a real replacement as the detection algorithms still need work. So the version posted in this update still uses external motion as the default.

There is a camera setting that switches between the two but that is more for developer convenience. You are welcome to play with it but we know it is not ready yet so be aware of that before posting comments on it. In particular the motion vector preview seems to have a problem in Chrome when used with default streaming method but works OK in full mjpeg streaming.

User avatar
jbeale
Posts: 3479
Joined: Tue Nov 22, 2011 11:51 pm
Contact: Website

Re: RPi Cam Web Interface

Wed May 20, 2015 4:41 pm

kevw wrote:I was looking at the sensor region to isolate a area in the frame but it doesn't seem to work as expected. I did a test W & H of 500 x 500 and tried 'moving' this around with the X & Y but I got strange results in that the area didn't move..same for a smaller 100x100 W&H - I was expecting to be able to move the small window around the FOV
I had the same experience; as far as I can tell, the sensor region option has no effect.

silvanmelchior
Posts: 76
Joined: Mon Nov 25, 2013 5:56 pm

Re: RPi Cam Web Interface

Wed May 20, 2015 5:34 pm

For those of you who are testing the new version of motion detection, it would be good if you could give feedback how good it is working for you, so we can develop a better version.

And to those of you who are struggling with the iframe errors: I'm trying to fix the problem for weeks now without success, so if anybody has an idea what could be the problem, please contribute to the discussion on github: https://github.com/silvanmelchior/RPi_C ... /issues/56
The problem is that the occurence of the error is very rare and everytime I made a fix I need to wait many hours until I get a result. So I'm sorry that there is no fix at the moment, but I'm trying.

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

Re: RPi Cam Web Interface

Wed May 20, 2015 7:30 pm

jbeale wrote:
kevw wrote:I was looking at the sensor region to isolate a area in the frame but it doesn't seem to work as expected. I did a test W & H of 500 x 500 and tried 'moving' this around with the X & Y but I got strange results in that the area didn't move..same for a smaller 100x100 W&H - I was expecting to be able to move the small window around the FOV
I had the same experience; as far as I can tell, the sensor region option has no effect.
This is true. We send the values into the camera interface but I don't think we really know what to expect here.

Return to “Camera board”