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

Re: RPi Cam Web Interface

Sun Apr 05, 2015 1:52 pm

RPi85 wrote:Sorry if this has been mentioned already, but is it possible to capture still images using a terminal command without the video stream getting interrupted?
That's an interesting question to which the answer is not quite a simple yes/no.

1) It is possible even now to grab the preview image as displayed on the main page without disrupting the main video stream, but that is only medium resolution typically 512px wide whereas I guess you want a high res still capture. If you do want this one then you can get it just by copying /dev/shm/mjpeg/cam.jpg which is just a sequence of these images. So when you copy it you get the camera output at that instant.

2) Theoretically it looked like raspimjpeg could do a normal hi-res image capture whilst recording video, but there was a shared capturing flag that meant that issuing an image capture grabbed an image but stopped the video recording. I have amended that so that one send an im comand in whilst a video recording is in progress and it seems to work to produce a still image in the middle of a video recording.

3) However, the web interface gets confused and so you can't stop the video from the web, although you can do it manually. I am now looking to see if I can sort that out.

I'll update again if I get that working.

piecam
Posts: 84
Joined: Mon Feb 23, 2015 12:55 am

Re: RPi Cam Web Interface

Sun Apr 05, 2015 2:50 pm

test

piecam
Posts: 84
Joined: Mon Feb 23, 2015 12:55 am

Re: RPi Cam Web Interface

Sun Apr 05, 2015 2:53 pm

[quote/]

2 suggestions.

1) Set 1 of the Pi's to use the standard internal set up and see if that remains stable.

2) Start the software in debugF mode. Just run the installer script with debugF instead of start. This will cause raspimjpeg to log its activity and errors to a file called raspiDebug.txt in the www folder.[/quote]

HI Robert,
This happened in day time when my network (NAS) is fully up and accessible. Anyway, I will try to use defugF mode to see whether I can duplicate this. Then, I will try internal storage.
thanks[/quote]

HI Robert,

Two of 5 pis got stuck in same mode again. There's nothing in the :~$ cat /var/www/raspiDebug.txt.

I will temporarily change it to internal and see how it goes.



Hi Robert,

One of pi cam which is at high traffic area is frozen again. I can ssh to pi and it seems ok box itself. The web feed was stuck in yesterday piture, a h264 file is waiting to be finished. I had to do RPI.sh stop and rpi.sh start, to get it going again.
there's nothing in debug .txt. It's using internal storage.

Any thoughts on this?

thanks
Last edited by piecam on Sun Apr 05, 2015 3:14 pm, edited 1 time in total.

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

Re: RPi Cam Web Interface

Sun Apr 05, 2015 3:10 pm

btidey wrote: I'll update again if I get that working.
Latest version now allows image capture during recordings from the web interface. That should also work from a cmd line

Code: Select all

echo -n 'im' >/var/www/FIFO

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

Re: RPi Cam Web Interface

Sun Apr 05, 2015 3:14 pm

piecam wrote:

One of pi cam which is at high traffic area is frozen again. there's nothing in debug .txt. It's using internal storage.

Any thoughts on this?

thanks
Can you update to latest version which has integrated schedule and rapimjpeg logging which will make it clearer what is going on.

It may also be worth turning off background Boxing for this test as if you are getting several video recordings close together then you may get several box background processes running together and that might trigger a memory problem.

wingers
Posts: 50
Joined: Wed Dec 31, 2014 8:31 pm

Re: RPi Cam Web Interface

Sun Apr 05, 2015 3:17 pm

couple of issues :-

Tried SELECT ALL and then GET ZIP - but nothing happened and eventually just went to a blank web page and had to press back button - never downloaded the zip etc

Now tried to do an update and getting message "error: unable to create temporary shal filename .git/objects/10: no space left on device" - could it be the failed zip issue above filled the SD Card? if so where can I look to delete the files and get it working again

piecam
Posts: 84
Joined: Mon Feb 23, 2015 12:55 am

Re: RPi Cam Web Interface

Sun Apr 05, 2015 3:55 pm

test

piecam
Posts: 84
Joined: Mon Feb 23, 2015 12:55 am

Re: RPi Cam Web Interface

Sun Apr 05, 2015 3:56 pm

btidey wrote:
piecam wrote:

One of pi cam which is at high traffic area is frozen again. there's nothing in debug .txt. It's using internal storage.

Any thoughts on this?

thanks
Can you update to latest version which has integrated schedule and rapimjpeg logging which will make it clearer what is going on.

It may also be worth turning off background Boxing for this test as if you are getting several video recordings close together then you may get several box background processes running together and that might trigger a memory problem.
HI Robert,

Again, one of pi (in front door, high traffic area), got in stuck again with new update and MP4Boxing off. Here's log.
[2015/Apr/03 09:42:20] Scheduled management tasks
[2015/Apr/03 10:44:00] Scheduled management tasks
[2015/Apr/03 11:10:38] Start capture requested
[2015/Apr/03 11:10:38] Send ca 1
[2015/Apr/03 11:10:54] Stop capture requested
[2015/Apr/03 11:10:54] Send ca 0
[2015/Apr/03 11:13:13] Start capture requested
[2015/Apr/03 11:13:13] Send ca 1
[2015/Apr/03 11:13:26] Stop capture requested
[2015/Apr/03 11:13:26] Send ca 0
[2015/Apr/03 11:21:38] Start capture requested
[2015/Apr/03 11:21:38] Send ca 1
[2015/Apr/03 11:22:15] Stop capture requested
[2015/Apr/03 11:22:15] Send ca 0
[2015/Apr/03 11:32:21] Start capture requested
[2015/Apr/03 11:32:21] Send ca 1
[2015/Apr/03 11:32:48] Stop capture requested
[2015/Apr/03 11:32:48] Send ca 0
[2015/Apr/03 11:45:57] Scheduled management tasks
[2015/Apr/03 12:46:52] Scheduled management tasks
[2015/Apr/03 13:47:44] Scheduled management tasks
[2015/Apr/03 14:48:35] Scheduled management tasks
[2015/Apr/03 15:49:27] Scheduled management tasks
[2015/Apr/03 16:50:19] Scheduled management tasks
[2015/Apr/03 17:51:11] Scheduled management tasks
[2015/Apr/03 18:52:02] Scheduled management tasks
[2015/Apr/03 19:49:01] New period detected 3
[2015/Apr/03 19:49:01] Send md 0
[2015/Apr/05 11:10:06] RaspiCam support started
[2015/Apr/05 11:10:06] Capture Pipe already exists /var/www/FIFO1
[2015/Apr/05 11:10:06] Scheduler loop is started
[2015/Apr/05 11:10:06] New period detected 2
[2015/Apr/05 11:10:06] Send md 0
[2015/Apr/05 11:10:08] Send em auto
[2015/Apr/05 11:10:10] Send md 1
[2015/Apr/05 11:10:12] Scheduled management tasks
[2015/Apr/05 11:10:52] Stop capture request ignored, already stopped
[2015/Apr/05 11:11:07] RaspiCam support started
[2015/Apr/05 11:11:07] Capture Pipe already exists /var/www/FIFO1
[2015/Apr/05 11:11:07] Scheduler loop is started
[2015/Apr/05 11:11:07] New period detected 2
[2015/Apr/05 11:11:07] Send md 0
[2015/Apr/05 11:11:09] Send em auto
[2015/Apr/05 11:11:11] Send md 1
[2015/Apr/05 11:11:13] Scheduled management tasks
[2015/04/05 11:22:44] RaspiCam support started
[2015/04/05 11:22:44] Capture Pipe already exists /var/www/FIFO1
[2015/04/05 11:22:44] Scheduler loop is started
[2015/04/05 11:22:44] New period detected 2
[2015/04/05 11:22:44] Send md 0
[2015/04/05 11:22:46] Send em auto
[2015/04/05 11:22:48] Send md 1
[2015/04/05 11:22:50] Scheduled management tasks
[2015/04/05 11:22:50] Stop capture request ignored, already stopped
[2015/04/05 11:50:07] Start capture requested
[2015/04/05 11:50:07] Send ca 1
[2015/04/05 11:50:22] Stop capture requested
[2015/04/05 11:50:22] Send ca 0
[2015/04/05 11:50:34] Start capture requested
[2015/04/05 11:50:34] Send ca 1
[2015/04/05 11:50:46] Stop capture requested
[2015/04/05 11:50:46] Send ca 0
[2015/04/05 11:50:52] Start capture requested
[2015/04/05 11:50:52] Send ca 1
[2015/04/05 11:51:09] Stop capture requested
[2015/04/05 11:51:09] Send ca 0


@raspberrypi:~$ ps -A
PID TTY TIME CMD
1 ? 00:00:01 init
2 ? 00:00:00 kthreadd
3 ? 00:01:10 ksoftirqd/0
5 ? 00:00:00 kworker/0:0H
7 ? 00:00:33 rcu_preempt
8 ? 00:00:00 rcu_sched
9 ? 00:00:00 rcu_bh
10 ? 00:00:00 khelper
11 ? 00:00:00 kdevtmpfs
12 ? 00:00:00 netns
13 ? 00:00:00 perf
14 ? 00:00:00 khungtaskd
15 ? 00:00:00 writeback
16 ? 00:00:00 crypto
17 ? 00:00:00 bioset
18 ? 00:00:00 kblockd
20 ? 00:00:00 rpciod
21 ? 00:00:00 kswapd0
22 ? 00:00:00 fsnotify_mark
23 ? 00:00:00 nfsiod
29 ? 00:00:00 kthrotld
30 ? 00:00:49 VCHIQ-0
31 ? 00:00:01 VCHIQr-0
32 ? 00:00:00 VCHIQs-0
33 ? 00:00:00 iscsi_eh
34 ? 00:00:00 dwc_otg
35 ? 00:00:00 DWC Notificatio
36 ? 00:00:00 kworker/u2:1
37 ? 00:00:00 VCHIQka-0
38 ? 00:00:00 SMIO
39 ? 00:00:00 deferwq
40 ? 00:00:00 kworker/u2:2
41 ? 00:00:01 mmcqd/0
42 ? 00:00:00 kworker/0:2
43 ? 00:00:00 jbd2/mmcblk0p2-
44 ? 00:00:00 ext4-rsv-conver
159 ? 00:00:00 udevd
262 ? 00:00:00 udevd
268 ? 00:00:00 udevd
1365 ? 00:00:00 ipv6_addrconf
1388 ? 00:00:00 dhclient
1546 ? 00:00:00 rsyslogd
1596 ? 00:00:00 apache2
1632 ? 00:02:30 apache2
1633 ? 00:02:26 apache2
1639 ? 00:02:03 apache2
1640 ? 00:02:50 apache2
1656 ? 00:00:00 cron
1658 ? 00:00:00 dbus-daemon
1722 ? 00:02:23 apache2
1734 ? 00:00:01 ntpd
1757 ? 00:00:00 sshd
1802 tty1 00:00:00 getty
1803 tty2 00:00:00 getty
1804 tty3 00:00:00 getty
1805 tty4 00:00:00 getty
1806 tty5 00:00:00 getty
1807 tty6 00:00:00 getty
1818 ? 00:02:26 apache2
1819 ? 00:00:00 sshd
1821 ? 00:00:00 sshd
1822 pts/1 00:00:00 bash
1870 ? 00:02:13 apache2
1913 pts/1 00:00:00 sudo
1914 pts/1 00:02:38 raspimjpeg
1940 ? 00:01:44 apache2
1942 ? 00:00:00 kworker/0:0
1943 ? 00:01:39 apache2
1944 ? 00:01:52 apache2
1957 ? 00:00:19 php
1969 ? 00:05:37 motion
1991 ? 00:00:00 kworker/0:1H
1993 ? 00:00:00 sshd
1995 ? 00:00:00 sshd
1996 pts/0 00:00:00 bash
2008 pts/0 00:00:00 ps
peng@raspberrypi:~$

@raspberrypi:~$ df -h
Filesystem Size Used Avail Use% Mounted on
rootfs 7.1G 849M 6.0G 13% /
/dev/root 7.1G 849M 6.0G 13% /
devtmpfs 182M 0 182M 0% /dev
tmpfs 38M 196K 37M 1% /run
tmpfs 5.0M 0 5.0M 0% /run/lock
tmpfs 75M 72K 75M 1% /run/shm
/dev/mmcblk0p1 48M 17M 32M 34% /boot
tmpfs 75M 0 75M 0% /tmp

@raspberrypi:~$ free -h
total used free shared buffers cached
Mem: 371M 196M 175M 0B 4.1M 139M
-/+ buffers/cache: 52M 318M
Swap: 0B 0B 0B


@raspberrypi:~$ free -h
total used free shared buffers cached
Mem: 371M 196M 175M 0B 4.1M 139M
-/+ buffers/cache: 52M 318M
Swap: 0B 0B 0B
Attachments
Screenshot112.png
Screenshot112.png (60.02 KiB) Viewed 2765 times
Screenshot111.png
Screenshot111.png (42.3 KiB) Viewed 2766 times

RPi85
Posts: 26
Joined: Fri Dec 27, 2013 10:42 pm

Re: RPi Cam Web Interface

Sun Apr 05, 2015 4:57 pm

btidey wrote:
btidey wrote: I'll update again if I get that working.
Latest version now allows image capture during recordings from the web interface. That should also work from a cmd line

Code: Select all

echo -n 'im' >/var/www/FIFO
Thanks for the quick reply. Although that command works, it still stops the video stream for a moment. It's a short moment, but with continuous movevent (ie. capturing pictures when PIR detects movement) it will make the video stream very choppy.

The /dev/shm/mjpeg/cam.jpg is good to have, although yes, it is a bit too low resolution. Any way to change that? With Picamera (https://picamera.readthedocs.org/en/rel ... -recording) there seems to be an option to record video and capture pictures at the same time using video-port based image capture. Is this something that could be implemented to RPi Cam?

PS: Are you involved in the development? I see the OP is not you, but you seem to have a good understanding of what's going on :)

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

Re: RPi Cam Web Interface

Sun Apr 05, 2015 6:30 pm

wingers wrote:couple of issues :-

Tried SELECT ALL and then GET ZIP - but nothing happened and eventually just went to a blank web page and had to press back button - never downloaded the zip etc

Now tried to do an update and getting message "error: unable to create temporary shal filename .git/objects/10: no space left on device" - could it be the failed zip issue above filled the SD Card? if so where can I look to delete the files and get it working again
Zipping files for download should create a new zip of the selected files in the /var/www/media folder and then remove that after the download. On a standard B (not Pi2) I see this taking approximately 0.7 sec per MB to create the zip so if there were say 150MB of selected files then that would be taking nearly 2 minutes and the web page would appear to be frozen during this time. It is possible that with large selections then something on the web side (e.g. the browser) is timing out before the zip completes. If this happens then the zip may get left behind.

In a standard set up all data files and any zips are in the /var/www/media folder. A delete all from the web page actually just wipes that folder and any sub-folders used clean and that would include any orphan zips.

A cmd line sudo rm -rf /var/www/media/* should do the same.

wingers
Posts: 50
Joined: Wed Dec 31, 2014 8:31 pm

Re: RPi Cam Web Interface

Sun Apr 05, 2015 6:33 pm

btidey wrote: Zipping files for download should create a new zip of the selected files in the /var/www/media folder and then remove that after the download. On a standard B (not Pi2) I see this taking approximately 0.7 sec per MB to create the zip so if there were say 150MB of selected files then that would be taking nearly 2 minutes and the web page would appear to be frozen during this time. It is possible that with large selections then something on the web side (e.g. the browser) is timing out before the zip completes. If this happens then the zip may get left behind.

In a standard set up all data files and any zips are in the /var/www/media folder. A delete all from the web page actually just wipes that folder and any sub-folders used clean and that would include any orphan zips.

A cmd line sudo rm -rf /var/www/media/* should do the same.
Thanks - found that directory and deleted all the contents and now working again - but have issue with download of timelapse images, it is just downloading a 0kb zip file? any thoughts

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

Re: RPi Cam Web Interface

Sun Apr 05, 2015 6:53 pm

RPi85 wrote:
btidey wrote:
btidey wrote: I'll update again if I get that working.
Latest version now allows image capture during recordings from the web interface. That should also work from a cmd line

Code: Select all

echo -n 'im' >/var/www/FIFO
Thanks for the quick reply. Although that command works, it still stops the video stream for a moment. It's a short moment, but with continuous movement (ie. capturing pictures when PIR detects movement) it will make the video stream very choppy.

The /dev/shm/mjpeg/cam.jpg is good to have, although yes, it is a bit too low resolution. Any way to change that? With Picamera (https://picamera.readthedocs.org/en/rel ... -recording) there seems to be an option to record video and capture pictures at the same time using video-port based image capture. Is this something that could be implemented to RPi Cam?

PS: Are you involved in the development? I see the OP is not you, but you seem to have a good understanding of what's going on :)
One can change the size of the cam.jpg by changing the width parameter in the /etc/raspimjpeg config file and then stopping / starting the camera to get that reloaded. It is defaulted to 512. The height will be controlled by whatever the video aspect is. So a 4:3 video format leads to a 512 x 384 cam.jpg. One can certainly increase this a bit but this file is used for other purposes so consider carefully. First, if using motion detection then motion has to process a stream of these files. Increasing to say 768 will more than double the processing load on motion. Second, these files are used to provide the thumbnail for the download preview page. They get downloaded and resized in the browser to the required display size. Increasing the actual size will slow down the display of that page.

For the image capture during video processing, raspimjpeg has potentially three streams open to the camera; one to create cam.jpg, one to record video, one to snapshot an image. Previously the interface only allowed one of the last two to be active and I changed that to allow all 3. There is no overhead on the RPI cam side in doing this; it just sends in a capture command to the camera interface. It could be that the single core CPU is just running out of steam at that point. One might have more success in preventing any jerkiness with a Pi2 which has considerably more power.

Silvan Melchior was the original developer of RPi Cam. I forked his code onto my Git and I have made all the changes that exist there on both the web side and to the core raspimjpeg program. The source code changes to the raspimjpeg program itself are held in the userland repository there where userland is a Foundation group of code containing the camera apps amongst other things.

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

Re: RPi Cam Web Interface

Sun Apr 05, 2015 7:09 pm

piecam wrote:Logs
The buttons snapshot would indicate that it is currently undertaking a video recording but has not yet received a stop.

This could mean one of 2 things.

If it was still actually recording in this state after a ca 0 was sent from scheduler. One could tell this by seeing a gradually increasing .h264 file being stored. This would indicate the stop command has been missed somehow. I haven't seen that myself.

Secondly it could mean the raspimjpeg has finished the recording but not correctly updated the status so the web buttons get back to the correct state.

The last recordings are fairly close together but that could only be a potential problem if background MPBoxing was being used. When you say you have MP4 Boxing false do you mean that, which would not produce mp4 files but only raw h264 or just that you have set it treu so that MPBoxing is inline with recording?

It is still worth updating and getting the integrated raspimjpeg logging going as that shows a full picture of what is going on.

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

Re: RPi Cam Web Interface

Sun Apr 05, 2015 7:52 pm

wingers wrote:
Thanks - found that directory and deleted all the contents and now working again - but have issue with download of timelapse images, it is just downloading a 0kb zip file? any thoughts
Not sure about 0kb file yet unless timelapse didn't really have any captures. The preview page should have the number of captures in brackets. You don't necessarily get th efirst capture straight away, it can take up to the lapse delay before the first.

On the white page after zipping problem I have managed to reproduce this and it was being caused by a time out setting on php pages. I am not quite sure why I haven't seen this before as I'm sure I have had lengthy downloads.

I have increased the timeouts considerably just around the zipping and conversion routines so zips should cope with around 500MB total. You still have to wait whilst this is going on. Doing it in the background would require a more fundamental change and would probably mean changing to a make zip function on the server and then a separate download zip only after that was completed.

wingers
Posts: 50
Joined: Wed Dec 31, 2014 8:31 pm

Re: RPi Cam Web Interface

Sun Apr 05, 2015 7:56 pm

btidey wrote:Not sure about 0kb file yet unless timelapse didn't really have any captures. The preview page should have the number of captures in brackets. You don't necessarily get th efirst capture straight away, it can take up to the lapse delay before the first.

On the white page after zipping problem I have managed to reproduce this and it was being caused by a time out setting on php pages. I am not quite sure why I haven't seen this before as I'm sure I have had lengthy downloads.

I have increased the timeouts considerably just around the zipping and conversion routines so zips should cope with around 500MB total. You still have to wait whilst this is going on. Doing it in the background would require a more fundamental change and would probably mean changing to a make zip function on the server and then a separate download zip only after that was completed.
A lot of the captures show (0) in brackets, but still show a preview which is confusing, as if no images then how can it show a preview?

I had lots of time lapses taken earlier in day, so they had definitely finished, didn't matter whether I clicked on one saying (1) or one saying (4) I still got a 0kb zip file - in the end I just copied them manually from Raspberry to my desktop via FTP and then deleted them

Thanks re: timeout for white page issue - I think that was definitely my issue as had loads of images I was trying to download in one go

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

Re: RPi Cam Web Interface

Sun Apr 05, 2015 10:03 pm

wingers wrote: A lot of the captures show (0) in brackets, but still show a preview which is confusing, as if no images then how can it show a preview?

I had lots of time lapses taken earlier in day, so they had definitely finished, didn't matter whether I clicked on one saying (1) or one saying (4) I still got a 0kb zip file - in the end I just copied them manually from Raspberry to my desktop via FTP and then deleted them

Thanks re: timeout for white page issue - I think that was definitely my issue as had loads of images I was trying to download in one go
You always get a thumbnail because at the start of every capture image, timelapse sequence or video it capture the latest cam.jpg as the thumbnail.

However, I don't see 0 for time lapses and my zips work. For time lapses if you click the thumbnail it shows the first image of the sequence and the download button above that should also get a zip of the full sequence. Is everything being stored in the media folder or are you using sub-folders? Have you changed the filename structure at all? It should work for most.

wingers
Posts: 50
Joined: Wed Dec 31, 2014 8:31 pm

Re: RPi Cam Web Interface

Sun Apr 05, 2015 10:31 pm

btidey wrote: You always get a thumbnail because at the start of every capture image, timelapse sequence or video it capture the latest cam.jpg as the thumbnail.

However, I don't see 0 for time lapses and my zips work. For time lapses if you click the thumbnail it shows the first image of the sequence and the download button above that should also get a zip of the full sequence. Is everything being stored in the media folder or are you using sub-folders? Have you changed the filename structure at all? It should work for most.
Yes clicking the thumbnail is showing the first image okay - then I click download and it downloads a 0kb zip - this all seems to have happened since I had the issue when trying to download all images in one go and got white screen - it had been working okay before then - I have removed RPi_Cam_Web and reinstalled it but still same problem

All settings (except motion threshold) are default - all being stored in main media folder and not using sub-folders, no changes to filename structure

Will give it a try again tomorrow and report back if still a problem

RPi85
Posts: 26
Joined: Fri Dec 27, 2013 10:42 pm

Re: RPi Cam Web Interface

Sun Apr 05, 2015 10:32 pm

@btidey

Thanks for the insight. Hmm, so https://github.com/silvanmelchior/RPi_Cam_Web_Interface doesn't include the latest version? Where should I get it?

wingers
Posts: 50
Joined: Wed Dec 31, 2014 8:31 pm

Re: RPi Cam Web Interface

Sun Apr 05, 2015 10:33 pm

RPi85 wrote:@btidey

Thanks for the insight. Hmm, so https://github.com/silvanmelchior/RPi_Cam_Web_Interface doesn't include the latest version? Where should I get it?
Full instructions on downloading Robert's improved version can be found here = http://elinux.org/RPi-Cam-Web-Interface

papillon88
Posts: 1
Joined: Mon Apr 06, 2015 6:01 am

Re: RPi Cam Web Interface

Mon Apr 06, 2015 6:27 am

Hi all,

this is what I have done :
1) connected the raspberry pi with the camera module on to the LAN.
2) connected my laptop to the LAN
3) downloaded and installed the RPi_Cam_Web_Interface package on laptop
4) accessed the camera through the browser
5) read through the RPi_Cam_Web_Interface.sh script to understand how the installation worked.
6) went through the architecture @ https://github.com/roberttidey/RPi_Cam_ ... RPiCam.pdf to understand how the web interface (the collection of files and folders in the /var/www folder) is working in conjunction with the raspimjpeg process in the pi and the cam.jpg and media folder.
7) i thus understand to a bare minimum extent how the package is working on RPi.

but this is what I want to do now :
I want the same thing but on aws cloud EC2 server - i want to stream the data from the RPi to the cloud server. Rest all things must be the same. the web page interface, the buttons functionality etc etc. In conclusion this is what I imagine - instead of making RPi itself the cam server, i want to make the cloud server a cam server.

I need some guidance in terms of what files to edit, how to edit etc etc, which direction to think to implement this idea given that I have the RPi_Cam_Web_Interface package. I would greatly appreciate your time and patience to help me on this. Even if its a birds eye view, so be it. I'll try to pick up from there and if I get stuck again, ill return.

piecam
Posts: 84
Joined: Mon Feb 23, 2015 12:55 am

Re: RPi Cam Web Interface

Mon Apr 06, 2015 5:59 pm

HI Robert,

I put back my /var/www/media to NAS link again. However, even though I granted nas folder to guest accessible, it's not allowed for me to access and it complained no rights to open folder.

When I took a look at my NAS folder, it seems new folder and subfolder are created without "x".
drwxrwxrwx 7 cam users 4096 Apr 2 19:22 2015-04-02
drwxrwxrwx 3 cam users 4096 Apr 5 16:10 2015-04-05
drw-rw-rw- 3 cam users 4096 Apr 6 02:33 2015-04-06

Apr 2 is the working one with necessary attributes. I modified Apr 5 to get it accessible and Ap6 is the one not accessible until I change mode. However, as soon as another file is put there, it's changed again.

Any ideas? Have we changed code in this regard?
or it has nothing to do with your code. I just found out that
drwxrwxrwx 3 cam users 4096 Apr 6 02:33 2015-04-06
-rw-r--r-- 1 cam users 76001 Apr 6 14:10 2015-04-06@Driveway_NoIR@im_0200_20150406_141003.jpg.i0200.th.jpg

these thumbnails can be accessed easily.
This line is still same in /etc/fstab as before,
//192.168.100.10/Recording /var/www/media cifs username=cam,password=xxxxx,workgroup=workgroup,users,auto,user_xattr 0 0

I am just wondering whether you may have a hint of what might cause this problem.
thanks

thanks

jarrah31
Posts: 125
Joined: Wed Oct 10, 2012 10:16 am

Re: RPi Cam Web Interface

Mon Apr 06, 2015 9:11 pm

btidey wrote:Core raspimjpeg updated to log its activity to a configured file. This is an extra parameter in /etc/raspimjpeg (log_file)

In the new default file this is set to be the same as the scheduler log so that scheduler and raspimjpeg events appear integrated together. scheduler events have [] date stamps and raspimjpeg have {} date stamps.

A download log button is added to show log screen so that these can be retrieved easily.

Note that if you do a script update rather than an install then the etc/raspimjpeg isn't changed so to get the logging working like this you would need to add an entry like log_file /var/www/scheduleLog.txt

The debugF function in the install script is removed as no longer required.

Edit: Bit more logging added to web pages so for example zip times are logged.

Schedule now only shows the relevant rows for the day mode selected. You need to save the settings for the day mode first.

Edit2: Day mode changes now show selected rows as soon as the Day mode changes.
Hi Robert,

Just wanted to say that I really appreciate all the updates you're doing to the core raspimjpeg program to make it even better.

Also your continued activity and ability to provide really useful responses to people's questions has really helped invigorate this once stale thread!

Thanks for all your effort and expertise!!

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

Re: RPi Cam Web Interface

Mon Apr 06, 2015 11:06 pm

Latest version on my Github now does zipping in background and has a progress bar which shows where the zip has got to before it is downloaded. This also avoids the issues around timeouts. Styling of progress bar is a bit crude at the moment.

This update needs the zip cmd installed which the install script should fetch.

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

Re: RPi Cam Web Interface

Mon Apr 06, 2015 11:21 pm

papillon88 wrote:Hi all,

this is what I have done :
1) connected the raspberry pi with the camera module on to the LAN.
2) connected my laptop to the LAN
3) downloaded and installed the RPi_Cam_Web_Interface package on laptop
4) accessed the camera through the browser
5) read through the RPi_Cam_Web_Interface.sh script to understand how the installation worked.
6) went through the architecture @ https://github.com/roberttidey/RPi_Cam_ ... RPiCam.pdf to understand how the web interface (the collection of files and folders in the /var/www folder) is working in conjunction with the raspimjpeg process in the pi and the cam.jpg and media folder.
7) i thus understand to a bare minimum extent how the package is working on RPi.

but this is what I want to do now :
I want the same thing but on aws cloud EC2 server - i want to stream the data from the RPi to the cloud server. Rest all things must be the same. the web page interface, the buttons functionality etc etc. In conclusion this is what I imagine - instead of making RPi itself the cam server, i want to make the cloud server a cam server.

I need some guidance in terms of what files to edit, how to edit etc etc, which direction to think to implement this idea given that I have the RPi_Cam_Web_Interface package. I would greatly appreciate your time and patience to help me on this. Even if its a birds eye view, so be it. I'll try to pick up from there and if I get stuck again, ill return.
I think there are various ways of going around this but you have to decide on how to split the functions up.

Core raspimjpeg must reside on the raspberry of course. So then one needs to decide where everything else goes.

At one extreme you leave the primary Apache / motion / scheduling on the rapsberry and then provide a separate cloud web server which is effectively acting as the front end server and making back end calls to the raspberry to effectively serve the ui to a more scalable number of users.

At the other extreme you just get the raspberry to provide a url access to the cam.jpg stream and then do motion detection and all the other functionality on the cloud server. Similarly you use the cmd_pipe on the raspberry to feed the commands through to raspimjpeg just like the local Apache does. So this approach retains a web server on the raspberry but it is just being used to service a few url calls from the cloud server.

One little complication is that the main index page needs access to raspimjpeg config and uconfig which it is just reading directly as files so that would need to change to be a url access.

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

Re: RPi Cam Web Interface

Mon Apr 06, 2015 11:30 pm

piecam wrote:HI Robert,

I put back my /var/www/media to NAS link again. However, even though I granted nas folder to guest accessible, it's not allowed for me to access and it complained no rights to open folder.

When I took a look at my NAS folder, it seems new folder and subfolder are created without "x".
drwxrwxrwx 7 cam users 4096 Apr 2 19:22 2015-04-02
drwxrwxrwx 3 cam users 4096 Apr 5 16:10 2015-04-05
drw-rw-rw- 3 cam users 4096 Apr 6 02:33 2015-04-06

Apr 2 is the working one with necessary attributes. I modified Apr 5 to get it accessible and Ap6 is the one not accessible until I change mode. However, as soon as another file is put there, it's changed again.

Any ideas? Have we changed code in this regard?
or it has nothing to do with your code. I just found out that
drwxrwxrwx 3 cam users 4096 Apr 6 02:33 2015-04-06
-rw-r--r-- 1 cam users 76001 Apr 6 14:10 2015-04-06@Driveway_NoIR@im_0200_20150406_141003.jpg.i0200.th.jpg

these thumbnails can be accessed easily.
This line is still same in /etc/fstab as before,
//192.168.100.10/Recording /var/www/media cifs username=cam,password=xxxxx,workgroup=workgroup,users,auto,user_xattr 0 0

I am just wondering whether you may have a hint of what might cause this problem.
thanks

thanks
raspimjpeg was changed to create files with 666 permissions, i.e. without executable permission. This shouldn't have impacted in any way access to these files as they are not 'executed' just read or written and just tightens up security a bit if these don't have execute permission.

I suppose it is conceivable that is having some effect when cross mounted to windows systems.

I can prepare a test version of raspimjpeg for you to try with it set back to 777 to see if that makes a difference.

Return to “Camera board”