User avatar
sav25
Posts: 372
Joined: Thu Aug 30, 2012 7:18 pm
Location: Southend-on-Sea, Essex, UK
Contact: Website Twitter

Re: RPi Cam Web Interface

Wed May 07, 2014 9:03 pm

Hi

Great work - got mine up and running without any issues so far.

I had a look through your first post, and some of the links, but nothing is clear on how to get a full screen stream to a laptop/device.

Can anyone point me in the right direction?
Averagemaker.com

chiruru
Posts: 17
Joined: Sun Apr 20, 2014 8:56 am

Re: RPi Cam Web Interface

Thu May 08, 2014 3:07 am

Hello

If the [Record Video] of Cam_Web_Interface is start at boot time, How can I do?
And, I want to save mp4 file every 5 minutes automatically.
And, If memory is full, old mp4 file is delete automatically.
Anybody commant me, Please. :D

Pangu
Posts: 78
Joined: Tue Dec 18, 2012 5:30 pm

Re: RPi Cam Web Interface

Thu May 08, 2014 10:06 am

sav25 wrote: but nothing is clear on how to get a full screen stream to a laptop/device.
+1. I am also interested on that. How can I have a fullscreen live view with full FOV of the Raspberry camera?

I'd like also know why these default values are used for in

/etc/raspimjpeg

Code: Select all

#
# Preview Options
#
# fps_preview = video_fps (below) / divider
#
width 512
quality 25
divider 1

#
# Video Options
#
video_width 1920
video_height 1080
video_fps 25
video_bitrate 17000000
MP4Box true
MP4Box_fps 25

#
# Image Options
#
image_width 2592
image_height 1944
image_quality 85
That means by default are recorded videos are at resolution 1920x1080 pixels but only 25FPS, why? Wouldn't 30fps be the better and maximum possible for the Raspicam ? And is 2592x1944 the maximum resolution the Raspicam is capable of?

Please tell me where and how to setup /etc/raspimjpeg so the template 4:3 FULL FOV is used when raspimjpeg is started at system boot. Actually I have to login to RPi Cam Web Interface through my browser and manually choose 4:3 FullFOV to set it up. After a reboot this setting is gone of course. Where can we set this up in /etc/raspimjpeg ?

Anyone please explain to me what the various Load Preset's are good for? I mean, the best one in my opinion is 4:3 Full FOV because it shows the maximum possible FOV for our Raspicam, isn't it ? what should 16:9 wide FOV be good for, I don't see any benefits of using this preset, or even Standard FOV. And what means StandardFov,x30 timelapse??

At the bootom of my /etc/raspimjpeg I am using these two lines:

Code: Select all

autostart standard
motion_detection true
do I still need to configure in /etc/motion/motion.conf the first line "daemon on" or should I leave it "daemon off" ?
Last edited by Pangu on Thu May 08, 2014 1:05 pm, edited 1 time in total.

chiruru
Posts: 17
Joined: Sun Apr 20, 2014 8:56 am

Re: RPi Cam Web Interface

Thu May 08, 2014 12:10 pm

Hello,

I have a record video and stop it, and then press [record video].
But I can not record video right now.
It needed a time for translation of mp4.

Mp4 translation function must be improve with multi thread.
If so, It can be record video continuosly.

It is a seriously problem...I think.

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

Re: RPi Cam Web Interface

Thu May 08, 2014 1:53 pm

Pangu wrote:+1. I am also interested on that. How can I have a fullscreen live view with full FOV of the Raspberry camera?
I haven't tested this, but the option "width" in "Preview Options" sets the size of the video stream in the browser. I usually change this to 640, but in theory you could set this width to be the size of your screen. I'm not sure what sort of performance impact that would cause, but it should at least let you do full screen. e.g.

Code: Select all

#
# Preview Options
#
# fps_preview = video_fps (below) / divider
#
width 1280
quality 25
divider 1
Pangu wrote:Please tell me where and how to setup /etc/raspimjpeg so the template 4:3 FULL FOV is used when raspimjpeg is started at system boot.
To start the camera in FOV, these instructions on the wiki should help: http://elinux.org/RPi-Cam-Web-Interface ... ld_of_View

I'm not sure why FPS is limited to 25, it could be a hardware limitation.

I don't use motion so can't help you there I'm afraid.

Pangu
Posts: 78
Joined: Tue Dec 18, 2012 5:30 pm

Re: RPi Cam Web Interface

Thu May 08, 2014 4:28 pm

jarrah31 wrote: I haven't tested this, but the option "width" in "Preview Options" sets the size of the video stream in the browser. I usually change this to 640, but in theory you could set this width to be the size of your screen. I'm not sure what sort of performance impact that would cause, but it should at least let you do full screen. e.g.
could Silvian give us feedback on that, please?
jarrah31 wrote:To start the camera in FOV, these instructions on the wiki should help: http://elinux.org/RPi-Cam-Web-Interface ... ld_of_View
Thank you, that helped. Although I do not understand why I get a bigger FOV when the pixels are reduced. One should expect that 1920x1080 is bigger than 1296 x 976. The aspect ratio of 1920/1080 is 1,78 while the aspect ratio of 1296/976 is 1,33. Why is it not possible to have 1920x1080 with a big FOV, like we have on images ?

And can anyone explain which setting I have to look at in /etc/motion/motion.conf to instruct motion to delay some more seconds after the last motion was captured? I am facing the problem, that I get lots of small videos recorded. When motion stops, the video recording stops immediately. If motion is detected again after 1-2 seconds, the video recording starts again. That causes me to get lots of small video files. I'd like to raise this delay, which setting is that? "gap" ? I have "gap 3" at the moment, should I raise it to let's say "gap 6" ??

And is correct that I have to raise "threshold 1500" if I want motion to behave less sensitive to motions? Sometimes I have fail triggers, and minimal conditions causes motion to trigger a video record start. Is it ok to raise it to "threshold 1600" instead or even much higher?

Is it possible to configure motion.conf so on recorded videos a timestamp is added on the bottom right of each video?
Last edited by Pangu on Thu May 08, 2014 5:05 pm, edited 1 time in total.

User avatar
sav25
Posts: 372
Joined: Thu Aug 30, 2012 7:18 pm
Location: Southend-on-Sea, Essex, UK
Contact: Website Twitter

Re: RPi Cam Web Interface

Thu May 08, 2014 4:32 pm

In terms of full screen, I was meaning more of a "full screen video" mode, the same way you would watch a film on a device or on screen.

If I'm totally honest, I'm not sure why people would want anything but this. Access to settings is helpful, but surely once your settings are configured, you simply want to sit back and watch/monitor? (Unless your pi is a capture and record setup I guess)

I envisage some kind of full screen button similar to YouTube, but I'm betting this wouldn't be easy/possible to implement?
Averagemaker.com

poing
Posts: 1132
Joined: Thu Mar 08, 2012 3:32 pm

Re: RPi Cam Web Interface

Fri May 09, 2014 3:17 pm

Pangu wrote:
jarrah31 wrote:To start the camera in FOV, these instructions on the wiki should help: http://elinux.org/RPi-Cam-Web-Interface ... ld_of_View
Thank you, that helped. Although I do not understand why I get a bigger FOV when the pixels are reduced. One should expect that 1920x1080 is bigger than 1296 x 976. The aspect ratio of 1920/1080 is 1,78 while the aspect ratio of 1296/976 is 1,33. Why is it not possible to have 1920x1080 with a big FOV, like we have on images ?
http://www.raspberrypi.org/forums/viewt ... 43&t=72116

reghorse76
Posts: 8
Joined: Fri May 09, 2014 4:19 pm

Re: RPi Cam Web Interface

Fri May 09, 2014 4:44 pm

Hello guys,
as many others do, i am planning to secure my house with 4 pi-cameras (192.168.1.101 to 104).
Thanks for this interface, it's the best in terms of quality/usabilty.

What i am trying to do is to "build" an external webpage which has the 4 previews streaming, like most dvr does.
So i read this 3d, the elinux.org page and googled some pages ...with no result.
I followed the "Embed live-preview in own homepage" and customized my page,
created a "test" sambashare for cam.jpg (checked, it works with no authorization)
changed cam_pic.php to 'readfile("//192.168.1.101/test/cam.jpg"); ' (tried with both //// and // - \\\\ and \\ )
checked that script works ( e.g. i have a <img id="mjpeg_dest" src="cam_pic.php?time=1399653514944"> growing in my page code)
... Am I missing something? I am a little more than a noob with linux, and a super noob with php..
Sorry for my english, any help will be veeeeery appreciated.
Regards

studiomaxer3d
Posts: 7
Joined: Sat May 10, 2014 1:56 am

Re: RPi Cam Web Interface

Sat May 10, 2014 1:58 am

Does anyone know why the frame rate would be terribly slow on Safari in iOS and in Chrome it would run just fine?

poing
Posts: 1132
Joined: Thu Mar 08, 2012 3:32 pm

Re: RPi Cam Web Interface

Sat May 10, 2014 3:19 am

You could try to make a webpage with 4 frames where each frame points to a Pi. http://www.w3.org/TR/html401/present/frames.html

Although I'm not 100% sure this is allowed by the browser because I recall for security it's not allowed to have frames from different domains in one page. Besides I'm not sure the computer will cope because showing the stream does tax the CPU and the network.

Otherwise you could make the four pages load each other with javascript so you see them one by one as a sequence.

studiomaxer3d
Posts: 7
Joined: Sat May 10, 2014 1:56 am

Re: RPi Cam Web Interface

Sat May 10, 2014 3:56 am

I'm getting interesting results with iOS running Adobe Air/Flex Mobile. I have a flex mobile application running a StageWebView (just pulls in the native browser) calling up the Web Interface. It along with Safari browser (outside of Air/Flex Mobile Application) run the Web Interface video very slow. Terrible frame rate.

Now the interesting thing is, when I let the iPad screen go to sleep (by pushing the power button) I immediately wake it up and go back to the Flex Mobile application and the video runs very fast inside the StageWebView.

I have no clue why this is happening, but I thought it would be interesting to pass along. Any ideas? I really need this to run inside an Flex Mobile iOS application.

reghorse76
Posts: 8
Joined: Fri May 09, 2014 4:19 pm

Re: RPi Cam Web Interface

Sat May 10, 2014 10:32 am

poing wrote:You could try to make a webpage with 4 frames where each frame points to a Pi. http://www.w3.org/TR/html401/present/frames.html

Although I'm not 100% sure this is allowed by the browser because I recall for security it's not allowed to have frames from different domains in one page. Besides I'm not sure the computer will cope because showing the stream does tax the CPU and the network.

Otherwise you could make the four pages load each other with javascript so you see them one by one as a sequence.
Thank you for your reply, this is what i am planning to do, but i am stuck with displaying the stream in a webpage. everything seems to me to be correct but the only result is a no-image little box.
Debugging with chrome i have this error "Resource interpreted as Image but transferred with MIME type text/plain".. any idea?
thanks

reghorse76
Posts: 8
Joined: Fri May 09, 2014 4:19 pm

Re: RPi Cam Web Interface

Sat May 10, 2014 12:49 pm

GOT it working, problem is cam_pic.php. Changing references in script_min.js with the full path to the image did the trick.
But preview is not so smooth as in the original web interface.
Image frequently hangs. I'm on a wired lan.
It should be exactly the same thing, uh? why is not? :?:

User avatar
algorithm
Posts: 185
Joined: Mon Nov 25, 2013 9:09 pm
Location: Flatland

Re: RPi Cam Web Interface

Sat May 10, 2014 1:31 pm

reghorse76 wrote:i have this error "Resource interpreted as Image but transferred with MIME type text/plain".. any idea?
Disclaimer: I don't know anything about this software package and haven't looked at the source :) But to eliminate that particular error, try adding this to cam_pic.php before the first output (probably a readfile() function)

Code: Select all

header('Content-Type: image/jpeg');
header('Content-Disposition: inline; filename="cam_pic_' . date('Ymd_His') . '.jpg"');

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

Re: RPi Cam Web Interface

Sun May 11, 2014 11:04 am

I just noticed that the exif date in the pictures saved is set to 1970:01:01 00:00:00 for each of them.
Is there any way to fix this, or is it pertinent to raspistill itself?
Salvatore La Bua - www.slblabs.com
DICGIM - University of Palermo, Italy

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

Re: RPi Cam Web Interface

Sun May 11, 2014 11:30 am

Sounds more like time is not being set from the time server.
As humans we have been the same for a very very long time, technology changes how we do... not who we are as people.

teeth_03
Posts: 284
Joined: Sat Sep 08, 2012 12:02 am

Re: RPi Cam Web Interface

Sun May 11, 2014 12:35 pm

Yeah, if someone could make a premade setup for a "RasPi DVR", that would be fantastic.

reghorse76
Posts: 8
Joined: Fri May 09, 2014 4:19 pm

Re: RPi Cam Web Interface

Mon May 12, 2014 2:32 am

Thank you algorithm for your time, but it doesn't work, at least on my pc.

This is the little i did,no php, very poor and terribly ugly (too late for creating loops!) it flickers,too.. but if someone can give a hand it's something to start with.

Code: Select all

<!DOCTYPE html>
<META HTTP-EQUIV="Pragma" CONTENT="no-cache"> 
<html>
  <head>
  <title>Title</title>
  </head>
  <center>
 <h1>RPI preview test</h1>
 </center>
  <script language="javascript">
var refreshrate=50;               //milliseconds
var image="http://192.168.1.51/cam.jpg";    //image path
var image2="http://192.168.1.52/cam.jpg";    
var image3="http://192.168.1.53/cam.jpg";    
var image4="http://192.168.1.54/cam.jpg";    

var imgheight=288;              
var imgwidth=512;            
function refresh(){
document.images["pic"].src=image+"?"+ new Date().getTime() ;
document.images["pic2"].src=image2+"?"+ new Date().getTime() ;
document.images["pic3"].src=image3+"?"+ new Date().getTime();
document.images["pic4"].src=image4+"?"+ new Date().getTime();
setTimeout('refresh()', refreshrate);
}

document.write('<a href="http://192.168.1.51"><img src="'+image+'" height="'+imgheight+'" width="'+imgwidth+'" name="pic" style="float: left; border-width: 2px; border-style: solid;"></a>');
document.write('<a href="http://192.168.1.52"><img src="'+image+'" height="'+imgheight+'" width="'+imgwidth+'" name="pic2" style="float: right; border-width: 2px; border-style: solid;"></a>');
document.write('<a href="http://192.168.1.53"><img src="'+image+'" height="'+imgheight+'" width="'+imgwidth+'" name="pic3" style="float: left; border-width: 2px; border-style: solid;"></a>');
document.write('<a href="http://192.168.1.54"><img src="'+image+'" height="'+imgheight+'" width="'+imgwidth+'" name="pic4" style="float: right; border-width: 2px; border-style: solid;"></a>');

if(document.images)window.onload=refresh;
</script>
</html>

Pangu
Posts: 78
Joined: Tue Dec 18, 2012 5:30 pm

Re: RPi Cam Web Interface

Tue May 13, 2014 9:04 am

Is it possible to define an area at cameras FOV which should be used for the "auto" exposure function? I have the problem, that my image contains a long huge window which is very bright. The auto exposure function fits the light according to this big window and the result is that the rest of the image is very dark. I am not interested in the content of the window but more at the rest of the image. Unfortunately I cannot move the camera not to include the window. Is it somehow possible to tell the auto exposure function to use the rest of the image for setting auto exposure ?

raspispy
Posts: 2
Joined: Tue May 13, 2014 10:39 am

Re: RPi Cam Web Interface // high CPU load

Tue May 13, 2014 11:30 am

Hello There,

I've just made a new fresh raspbian install with all updates and running RPi Cam
Web Interface causes permanent very high load on my System. Without motion-detection,
load is an average of 5.5 - with motion-detection activated above 6 (see 'top' below).

Also, CPU temperature remains permanently above 60°C

Can anybody please confirm, if this is normal?


Code: Select all

top - 13:22:22 up 16:02,  2 users,  load average: 6.37, 6.32, 6.24
Tasks:  79 total,   1 running,  78 sleeping,   0 stopped,   0 zombie
%Cpu(s): 46.5 us,  9.2 sy,  0.0 ni, 44.2 id,  0.0 wa,  0.0 hi,  0.0 si,  0.0 st
KiB Mem:    382972 total,   230776 used,   152196 free,    16140 buffers
KiB Swap:   102396 total,        0 used,   102396 free,   156616 cached

  PID USER      PR  NI  VIRT  RES  SHR S  %CPU %MEM    TIME+  COMMAND
 3305 root      20   0 63544  16m 1544 S  42.0  4.5  30:28.64 motion
 2785 root      20   0  428m 2336  824 S   6.2  0.6  27:45.68 raspimjpeg
 6614 pi        20   0  4672 1384 1028 R   1.3  0.4   3:54.39 top
    7 root      20   0     0    0    0 S   0.7  0.0   2:30.65 rcu_preempt
   30 root       1 -19     0    0    0 D   0.7  0.0   2:42.39 VCHIQ-0
    3 root      20   0     0    0    0 S   0.3  0.0   0:24.00 ksoftirqd/0
   31 root       1 -19     0    0    0 D   0.3  0.0   0:06.99 VCHIQr-0
 1989 www-data  20   0 24392 6012 2180 S   0.3  1.6   0:35.91 apache2
 6490 pi        20   0  3760 1140  964 S   0.3  0.3   1:26.66 watch
    1 root      20   0  2148  720  616 S   0.0  0.2   0:04.11 init
    2 root      20   0     0    0    0 S   0.0  0.0   0:00.00 kthreadd
    5 root       0 -20     0    0    0 S   0.0  0.0   0:00.00 kworker/0:0H
    8 root      20   0     0    0    0 S   0.0  0.0   0:00.00 rcu_bh
temp=65.4'C
-e core: volt=1.20V
-e sdram_c: volt=1.20V
-e sdram_i: volt=1.20V
-e sdram_p: volt=1.23V

punktea
Posts: 21
Joined: Thu Jul 18, 2013 8:55 am

Re: RPi Cam Web Interface

Tue May 13, 2014 11:32 am

To display several streams on the same webpage:
On Pi:
- install mjpg-streamer
- in /etc/raspimjpeg:
preview_path /run/shm/img.jpg
- start mjpg-streamer as follows:
nohup $(LD_LIBRARY_PATH=/usr/local/lib mjpg_streamer -i "input_file.so -f /run/shm -n img.jpg" -o "output_http.so -w /usr/local/www")
On your PC:
http://<Pi_IP_address>:8080/javascript.html
-> should see Pi camera streaming smoothly on your browser
Modify this html page to display streams from several Pi cameras.

studiomaxer3d
Posts: 7
Joined: Sat May 10, 2014 1:56 am

Re: RPi Cam Web Interface

Wed May 14, 2014 1:04 pm

I'm trying to figure out how to make this WONDERFUL application run without a router. I need to set up the pi so I can directly connect to it via wifi without a router and that needs to play nicely with RPICam Web interface. Thanks


studiomaxer3d
Posts: 7
Joined: Sat May 10, 2014 1:56 am

Re: RPi Cam Web Interface

Wed May 14, 2014 2:11 pm

Thanks! I will give it a go.

Return to “Camera board”