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

Re: RPi Cam Web Interface

Wed Apr 15, 2015 4:52 pm

0lly wrote: I can confirm that it does not run with them.
I'm back to Firefox 36.0.4
OK. Because of the difficulties in some browsers I have made the following changes which are in the repo.

1. Revert default operation to the image at a time preview as used before
2. Left MJPEG stream support in as well
3. Introduced a new button in System which toggles between MJPEG stream and Default Stream (image by image
4. Retain Stream mode in browser cookie.

There are some MJPEG stream improvements which will also be merged in shortly.

That let me have MJPEG streaming in Chrome plus Default Streaming in 37.01 Firefox on the same platform.
Attachments
streammode.jpg
streammode.jpg (9.47 KiB) Viewed 2525 times

morticiaskeeper
Posts: 101
Joined: Mon Aug 27, 2012 6:05 pm

Re: RPi Cam Web Interface

Wed Apr 15, 2015 7:05 pm

New update tested on Chrome & Safari in iOS. Livestream now shows a still frame, only updating when prompted.

Chrome in Android works fine.

Would it be the iOS version? I'm using 7.1.2 the latest for the iPad2 before the 8 upgrade.

Edit. Now also tried in Opera, Dolphin & private browser. Same result in all.
Last edited by morticiaskeeper on Wed Apr 15, 2015 8:08 pm, edited 1 time in total.

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

Re: RPi Cam Web Interface

Wed Apr 15, 2015 7:19 pm

Hello

Those of you who use the circular buffer with a size of 4000 or lower should update to version 5.1.3, because otherwise your logfile could get overflowed with iframe-error-messages.

The problem is that the h264-encoder outputs an iframe every 60 frames per default, so if the buffer is too small to hold at least one of these frames, the whole content of the buffer gets useless. The new version fits the intraperiod to the size of the buffer and changes it back, once recording started. Additionally, the new version checks wheter there are enough iframes (at least 4) in the buffer and otherwise asks the encoder for a new one. This way, it can be guaranteed that at least 75% of the buffer is decodable.

I hope the new version fixes the problem

drhitchcock
Posts: 10
Joined: Wed Jan 02, 2013 5:40 am

Re: RPi Cam Web Interface

Wed Apr 15, 2015 7:56 pm

Hi there!

After I run the initial ./RPi_Cam_Web_Interface_Installer.sh after cloning the Github repo I get the error message "No or invalid option selected". What does this error message mean?

I have the Infrared Pi Camera board attached and it runs fine with raspistill and raspivid.

Many thanks,
Dr Hitchcock.

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

Re: RPi Cam Web Interface

Wed Apr 15, 2015 7:58 pm

drhitchcock wrote:Hi there!

After I run the initial ./RPi_Cam_Web_Interface_Installer.sh after cloning the Github repo I get the error message "No or invalid option selected". What does this error message mean?

I have the Infrared Pi Camera board attached and it runs fine with raspistill and raspivid.

Many thanks,
Dr Hitchcock.
You need to type ./RPi_Cam_Web_Interface_Installer.sh install

Blairvoyach
Posts: 5
Joined: Sun Jun 24, 2012 11:00 am

Re: RPi Cam Web Interface

Wed Apr 15, 2015 8:37 pm

Sorry if this a FAQ, I have searched but I'm stumped.and a newbie to Raspberry Pi
When I come clone the RPi_Cam_Web_Interface.git from Silvan's site, I am asked for a username and password which I obviously do not posess.

Can someone please give me a hint on what to try ?

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

Re: RPi Cam Web Interface

Wed Apr 15, 2015 9:11 pm

morticiaskeeper wrote:New update tested on Chrome & Safari in iOS. Livestream now shows a still frame, only updating when prompted.

Chrome in Android works fine.

Would it be the iOS version? I'm using 7.1.2 the latest for the iPad2 before the 8 upgrade.

Edit. Now also tried in Opera, Dolphin & private browser. Same result in all.
Were you getting a livestream OK before the recent MJPEG stream change? Is the system menu on main page now showing a blue button called MJPEG-Stream. If it is then it should be operating the same way as before.

drhitchcock
Posts: 10
Joined: Wed Jan 02, 2013 5:40 am

Re: RPi Cam Web Interface

Thu Apr 16, 2015 4:58 am

Oh man! What a dingus. Can I blame baby brain for that?
silvanmelchior wrote:
drhitchcock wrote:Hi there!

After I run the initial ./RPi_Cam_Web_Interface_Installer.sh after cloning the Github repo I get the error message "No or invalid option selected". What does this error message mean?

I have the Infrared Pi Camera board attached and it runs fine with raspistill and raspivid.

Many thanks,
Dr Hitchcock.
You need to type ./RPi_Cam_Web_Interface_Installer.sh install

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

Re: RPi Cam Web Interface

Thu Apr 16, 2015 5:00 am

Blairvoyach wrote:Sorry if this a FAQ, I have searched but I'm stumped.and a newbie to Raspberry Pi
When I come clone the RPi_Cam_Web_Interface.git from Silvan's site, I am asked for a username and password which I obviously do not posess.

Can someone please give me a hint on what to try ?
Sounds strange, could you post your console-input and the answer?

Blairvoyach
Posts: 5
Joined: Sun Jun 24, 2012 11:00 am

Re: RPi Cam Web Interface

Thu Apr 16, 2015 5:45 am

I'm probably doing something very wrong but this is what I get :)

pi@raspberrypi ~ $ git clone https://github.com/silvanmechior/RPi_Cam_Web_Interf
ace.git
Cloning into 'RPi_Cam_Web_Interface'...
Username for 'https://github.com':
Password for 'https://github.com':
fatal: Authentication failed

Blairvoyach
Posts: 5
Joined: Sun Jun 24, 2012 11:00 am

Re: RPi Cam Web Interface

Thu Apr 16, 2015 5:49 am

Must have been something wierd I was doing Silvan, now it it working :oops:

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

Re: RPi Cam Web Interface

Thu Apr 16, 2015 5:57 am

Blairvoyach wrote:Must have been something wierd I was doing Silvan, now it it working :oops:
Great!

morticiaskeeper
Posts: 101
Joined: Mon Aug 27, 2012 6:05 pm

Re: RPi Cam Web Interface

Thu Apr 16, 2015 6:33 am

btidey wrote: Were you getting a livestream OK before the recent MJPEG stream change? Is the system menu on main page now showing a blue button called MJPEG-Stream. If it is then it should be operating the same way as before.
Yes, it was working fine before the change. The blue button works, on iOS it switches from the single shot livestream to the loading message, on Android it switches from livestream to the new smoother livestream.

morticiaskeeper
Posts: 101
Joined: Mon Aug 27, 2012 6:05 pm

Re: RPi Cam Web Interface

Thu Apr 16, 2015 6:48 am

Now this is getting confusing!

I've just done a side by side test to show the problem to my wife. We used an iPad and an Android Hudl2. The Android showed live video on both settings, the iPad showed LOADING on mjpeg and a still frame on default.

I closed the iPad cover down into standby mode. Opened it up again and it now gives live video :-)

Safari doesn't seem to be able to change out of mjpeg, giving LOADING even after switching to default.

jussi24
Posts: 64
Joined: Fri Jul 26, 2013 11:30 am

Re: RPi Cam Web Interface

Thu Apr 16, 2015 8:16 am

btidey wrote: OK. Because of the difficulties in some browsers I have made the following changes which are in the repo.
...
There are some MJPEG stream improvements which will also be merged in shortly.
That let me have MJPEG streaming in Chrome plus Default Streaming in 37.01 Firefox on the same platform.
I did made an update this minutes and I don't see the switching button. Isn't it rolled out by now? What version number will have the alternate streaming switch?
EDIT: now it's there. Was a matter of cache or some other strange thing...

"Real" mjpeg is very appreciated! So I will have the chance to view the stream with standard players like VLC. What is the URL to bind on the pushed mjpeg stream?

Thanks a lot!
Juergen ("follower" of raspimjpeg since this thread contained only 5 pages...)
Last edited by jussi24 on Thu Apr 16, 2015 8:19 am, edited 1 time in total.

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

Re: RPi Cam Web Interface

Thu Apr 16, 2015 8:18 am

jussi24 wrote:
btidey wrote: OK. Because of the difficulties in some browsers I have made the following changes which are in the repo.
...
There are some MJPEG stream improvements which will also be merged in shortly.
That let me have MJPEG streaming in Chrome plus Default Streaming in 37.01 Firefox on the same platform.
I did made an update this minutes and I don't see the switching button. Isn't it rolled out by now? What version number will have the alternate streaming switch?

"Real" mjpeg is very appreciated! So I will have the chance to view the stream with standard players like VLC. What is the URL to bind on the pushed mjpeg stream?

Thanks a lot!
Juergen ("follower" of raspimjpeg since this thread contained only 5 pages...)
It should be version 5.1.3. Please check if your browser cache is the problem by updating with shift+F5

jussi24
Posts: 64
Joined: Fri Jul 26, 2013 11:30 am

Re: RPi Cam Web Interface

Thu Apr 16, 2015 8:21 am

silvanmelchior wrote: It should be version 5.1.3. Please check if your browser cache is the problem by updating with shift+F5
It's there now, thanks! A cache thing or own "competence" or whatever...
Is there an URL where the pushed mjpeg stream is available for other viewers?
Thanks!

jussi24
Posts: 64
Joined: Fri Jul 26, 2013 11:30 am

Re: RPi Cam Web Interface

Thu Apr 16, 2015 8:30 am

jussi24 wrote: Is there an URL where the pushed mjpeg stream is available for other viewers?
Answer to my own question:

Code: Select all

http://[your URL here]/cam_pic_new.php?
workes fine in VLC!

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

Re: RPi Cam Web Interface

Thu Apr 16, 2015 8:59 am

morticiaskeeper wrote:Now this is getting confusing!

I've just done a side by side test to show the problem to my wife. We used an iPad and an Android Hudl2. The Android showed live video on both settings, the iPad showed LOADING on mjpeg and a still frame on default.

I closed the iPad cover down into standby mode. Opened it up again and it now gives live video :-)

Safari doesn't seem to be able to change out of mjpeg, giving LOADING even after switching to default.
Confusing indeed! Couple of comments.

These changes like others do require the javascript to be updated and some browsers are reluctant to do that preferring to use a cached version. Normally there a forced refresh will do that. Otherwise there is normally a facility to clear out browser caches which will work.

The stream switching does rely on cookies to hold the setting so that must be enabled in the browser.

If you can view page source one can also check the stream switching by looking near the top

In the default image by image mode there should be a script call setTimeout('init(0);', 100) When in MJPEG mode this should be setTimeout('init(1);', 100).

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

Re: RPi Cam Web Interface

Thu Apr 16, 2015 10:09 am

btidey wrote:
Gary Littlemore wrote:"Feature Request"

I'd like to be able to boot the 'RPi Cam Web Interface' as normal and be able to configure a timelapse job with the following, runtime X minutes, taking a picture every X milliseconds, once the runtime X minutes has completed it automatically safely shuts down and only does this again once it’s reconfigured again. So the next boot after the job has been ran it boots as normal. Not sure if this is going to be possible, I'm looking to setup up the job and then boot a pi remotely and the job run.
You can do this today within context of RPi Cam by using the PIPE controls from other programs like a bash script or python. For example, assuming the lapse delay is set up then a bash script which does
echo -n 'tl 1' >/var/www/FIFO
sleep 20m
echo -n 'tl 0' >/var/www/FIFO

would start the time lapse wait 20 minutes and then stop it.

As mentioned if you want to get picture closer than about a second then you are better using a slow fps video. Same technique could be used for starting and stopping that.

If you actually want to initiate the whole process from the web interface by manually pushing a button then that is a separate request and one maybe best done by a general run script button rather than making it specific to just one use.
I'd like to be able to configure the runtime and frames per millisecond/second and shutdown, to connect back up to a power bank and it boot to the settings I configured and shut down after its completed. Have little knowledge of linux I don't know how/what bash is.
3b+, 2b, b+, b, Zero & Zero-W

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

Re: RPi Cam Web Interface

Thu Apr 16, 2015 5:49 pm

The documentation material that was in the RPiCam.pdf has been moved to the wiki http://elinux.org/RPi-Cam-Web-Interface and removed from the code.

This makes it easier to maintain across multiple contributors.

morticiaskeeper
Posts: 101
Joined: Mon Aug 27, 2012 6:05 pm

Re: RPi Cam Web Interface

Thu Apr 16, 2015 5:56 pm

btidey wrote:
Confusing indeed! Couple of comments.

These changes like others do require the javascript to be updated and some browsers are reluctant to do that preferring to use a cached version. Normally there a forced refresh will do that. Otherwise there is normally a facility to clear out browser caches which will work.

The stream switching does rely on cookies to hold the setting so that must be enabled in the browser.

If you can view page source one can also check the stream switching by looking near the top

In the default image by image mode there should be a script call setTimeout('init(0);', 100) When in MJPEG mode this should be setTimeout('init(1);', 100).
Cookies are accepted.

In Apple land, the user mustn't be allowed to do anything too far removed from the way Apple want you to do it!

So we can't look at the page source:-)

It seems to be very erratic, sometimes LOADING appears, sometimes the livestream shows. Sometimes it streams, sometimes it shows a still frame. Putting the iPad to sleep, even for a second seems to trigger streaming rather than still frame, but refreshing the page doesn't.

I think it's an Apple foible. Luckily I've always got and Android in my pocket.

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

Re: RPi Cam Web Interface

Thu Apr 16, 2015 6:10 pm

Gary Littlemore wrote:
I'd like to be able to configure the runtime and frames per millisecond/second and shutdown, to connect back up to a power bank and it boot to the settings I configured and shut down after its completed. Have little knowledge of linux I don't know how/what bash is.
I suspect you are going to have learn at least some simple coding or scripting and configuration to achieve this. You can use one of several camera applications including RPiCam Web to achieve the basic functionality of performing a sequence of time lapse or slow fps video recording.

The extra parts you will need are setting up a simple program or script to do the basic work and inserting it into the boot sequence.

None of this is particularly complex once you get to learn a few basics.

bash is one of the scripting shells a bit like a bat file in Windows. There are lots of tutorials on the web and for what we are talking about here it is very straightforward.

For example something like this (untested)

Code: Select all

#!/bin/bash
# Set up duration here- 20 minutes
LAPSETIME=20m
#make sure everything is going by waiting 20 seconds
sleep 20
#Start the time lapse
echo -n 'tl 1' >/var/www/FIFO
sleep $LAPSETIME
#stop the time lapse
echo -n 'tl 0' >/var/www/FIFO
#and close down, wait for a bit to make sure all is finished.
sleep 10
sudo shutdown -h now

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

Re: RPi Cam Web Interface

Thu Apr 16, 2015 6:32 pm

morticiaskeeper wrote: Cookies are accepted.

In Apple land, the user mustn't be allowed to do anything too far removed from the way Apple want you to do it!

So we can't look at the page source:-)

It seems to be very erratic, sometimes LOADING appears, sometimes the livestream shows. Sometimes it streams, sometimes it shows a still frame. Putting the iPad to sleep, even for a second seems to trigger streaming rather than still frame, but refreshing the page doesn't.

I think it's an Apple foible. Luckily I've always got and Android in my pocket.
If it was working before the change to MJPEG then it worries me a bit that the stream selection method isn't fully compatible as in Default mode it should be identical to how it was before.

If you wanted to pursue it further then the attached zip has the two files of interest from just before the change was made. I.e. when it was 'working'.

If you want to try this just as a test then put the index.php into /var/www and script.js into /var/www/js. You may want to move the originals first to make it easier to restore. I'd certainly be interested if that works but the current one doesn't.
Attachments
index.zip
(6.37 KiB) Downloaded 53 times

morticiaskeeper
Posts: 101
Joined: Mon Aug 27, 2012 6:05 pm

Re: RPi Cam Web Interface

Thu Apr 16, 2015 7:18 pm

Robert

I've just copied those files back to the Raspi.

Chrome on iOS now works fine.

Safari worked, but was a little slow. never using Safari, that may be normal!

Return to “Camera board”