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

Re: RPi Cam Web Interface

Mon Jun 01, 2015 9:22 am

Latest change from miraaz merged into installer adds a separate config file which is being used to save local install choices like the subfolder used so they don't have to be entered each time.

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

Re: RPi Cam Web Interface

Mon Jun 01, 2015 9:48 am

btidey wrote:
johng wrote: I downloaded last thing last night so definitely after May 30 12.20 but I'd edited raspimjpeg since so I got 66731 May 31 11:32. I've reinstalled just now, install not update, to be sure and got 66731 May 31 22:14 without touching raspimjpeg.
Preview shows /var/www//media/Titcam and log on restarting shows

Code: Select all

/var/www/media/{2015/05/31 22:24:18} RaspiMJPEG Version 5.2.1
/var/www/media/{2015/05/31 22:24:19} recommended video buffers 1
/var/www/media/{2015/05/31 22:24:19} h264 buffers set to recommended 1
/var/www/media/{2015/05/31 22:24:19} Set up internal detect width=121 height=68
/var/www/media/{2015/05/31 22:24:19} MJPEG streaming, ready to receive commands
/var/www/media/{2015/05/31 22:24:19} send smd 9
/var/www/media/{2015/05/31 22:24:19} DEBUG 3
[2015/05/31 22:24:20] RaspiCam support started
[2015/05/31 22:24:20] Capture Pipe already exists /var/www/FIFO1
Log OK from then on but no movement so not much action.
I'm not sure that is right. The ones in curly braces come from raspimjpeg and show the /var/www/media. THe ones in square brackets come from web side and never had this problem.

I don't think your raspmimjpeg is the latest one with this fixed. It is definitely 67926 (now dated 31/05 21:02). If you are not getting that one then something is going wrong with your install procedure.

Are you doing the separate 'update' followed by 'install'? Doing just 'install' just installs what is in the local folder now; it odes not by itself do a fetch. You have to do 'update' first to get new version from repository. This was noted a few posts back as a way of making sure that the update was a full update rather than the partial one that could happen before.
Aha! I'd missed this one. Have updated then installed and now getting raspimjpeg at 62976 and all OK. Thanks and humble apologies.

Rusakko
Posts: 35
Joined: Fri Dec 14, 2012 6:18 pm

Re: RPi Cam Web Interface

Mon Jun 01, 2015 10:20 am

Great work, thank you. I'm now using this with my bird nest camera.
One "request" or question, is it possible to add sound to videos? Preferably if I could add small mic to GPIO pins and record sound to the video. If not for web stream but at least for saved videos. Both would be nice of course :)

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

Re: RPi Cam Web Interface

Mon Jun 01, 2015 11:53 am

btidey wrote:Latest change from miraaz merged into installer adds a separate config file which is being used to save local install choices like the subfolder used so they don't have to be entered each time.
I have been putting all changes into uconfig and that works perfectly and persists through update/installs. The only thing is that I have still to remember to put the mounts and binds back into rc.local as it is rewritten on update/install.

BleepandBooster
Posts: 4
Joined: Mon Feb 10, 2014 1:42 pm

Re: RPi Cam Web Interface

Mon Jun 01, 2015 1:03 pm

Hello,
I have been using the RPi Cam Web Interface successfully for some time. Today I followed the instructions to upgrade to the latest version of the software and I no longer get the mjpeg stream in the browser, it just says 'Loading' in red text. The page is loading into the browser fine (apart from the stream) but the camera control buttons are just coloured boxes with no text in them.

The original setup was working well this morning and since the upgrade I have tested the camera with Raspistill which is working fine.

Any suggestions?

Thanks.

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

Re: RPi Cam Web Interface

Mon Jun 01, 2015 1:37 pm

BleepandBooster wrote:Hello,
I have been using the RPi Cam Web Interface successfully for some time. Today I followed the instructions to upgrade to the latest version of the software and I no longer get the mjpeg stream in the browser, it just says 'Loading' in red text. The page is loading into the browser fine (apart from the stream) but the camera control buttons are just coloured boxes with no text in them.

The original setup was working well this morning and since the upgrade I have tested the camera with Raspistill which is working fine.

Any suggestions?

Thanks.
Coloured buttons with no text normally means that no status_mjpeg.txt file is being generated in the web folder /var/www as this is what determines button states.

This in turn suggests that raspimjpeg is not running properly as this is what generates that status file.

Check the schedule log file first to see if there is any clues in there. Then check to see if raspimjpeg is running (ps -A); you should see two instances. If not then try running the install script with 'start' as the action again and seeing if you get anything returned on the console.

You can also eliminate any issues with local settings by making sure you have default raspimjpeg config in /etc and remove any uconfig file you have in the web folder. Keep copies of those so you can restore any of your own config once it is running again.

BleepandBooster
Posts: 4
Joined: Mon Feb 10, 2014 1:42 pm

Re: RPi Cam Web Interface

Mon Jun 01, 2015 4:06 pm

Many thanks for your reply btidey. I am new to this sort of troubleshooting - usually it all just works!

I am not sure where to look for the schedule log file. I looked in var/log but there is no schedule log. I can see only one instance of raspimjpeg running in ps -A. Sorry but I don't understand what you mean when you wrote 'try running the install script with 'start' as the action again and seeing if you get anything returned on the console.'

In /etc there are no uconfig files that I can see, just raspimjpeg and raspimjpeg.bak

Thanks again.

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

Re: RPi Cam Web Interface

Mon Jun 01, 2015 4:09 pm

Rusakko wrote:Great work, thank you. I'm now using this with my bird nest camera.
One "request" or question, is it possible to add sound to videos? Preferably if I could add small mic to GPIO pins and record sound to the video.
AFAIK there is no easy way to do this. The GPIO pins are digital only, while a mic is low-level analog. You can use a USB soundcard or USB mic, but synchronization of that to video may be non-trivial.

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

Re: RPi Cam Web Interface

Mon Jun 01, 2015 4:20 pm

BleepandBooster wrote:Many thanks for your reply btidey. I am new to this sort of troubleshooting - usually it all just works!

I am not sure where to look for the schedule log file. I looked in var/log but there is no schedule log. I can see only one instance of raspimjpeg running in ps -A. Sorry but I don't understand what you mean when you wrote 'try running the install script with 'start' as the action again and seeing if you get anything returned on the console.'

In /etc there are no uconfig files that I can see, just raspimjpeg and raspimjpeg.bak

Thanks again.
You can see the scheduler log from the web interface by clicking on Sheculer settings abd Show Log. This log actually gathers log events fro several places including the raspimjpeg program.

There should be 2 copies of raspimjpeg running if it is a recent version and all is working OK. Make sure you follow the new instructions on the wiki. You have to run the script first with update as the command as this collects the new version and then you run it again with install as the command as this does the actual install of the new stuff. After this the program is NOT running. You need to either reboot (which will start it up) or run the script a 3rd time with start as the command.

The uconfig file will be in /var/www (or a subfolder if you installed below ) as it collects the configuration changes made from the web interface.

Running the script using start (instead of say install) actually first stops any bits of the software still running and then starts it up again. When you do this you should see a little bit of output on the terminal window you run that command from. That could include any errors if something is going wrong.

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

Re: RPi Cam Web Interface

Mon Jun 01, 2015 4:27 pm

I have updated the installer script with commands for the nginx install done by slabua some time ago. These are completely separate from the normal Apache based ones which remain completely unchanged.

There is a remove_nginx and an install_nginx which are used in place of the normal remove and install if you want to use nginx instead of Apache.

I have NOT tested these at all but am happy to make any adjustments as required if somebody wants to try it out.

Once proven then the wiki can be updated.

erik123
Posts: 20
Joined: Thu May 28, 2015 7:42 pm

Re: RPi Cam Web Interface

Mon Jun 01, 2015 5:57 pm

Just a question, I have a raspberry pi2 with version 65767 may 24 and an other with version 67926 june 1. I was staring to top on both running machines. The older version raspimjpeg is about 2.5 or % CPU load the new machine is abut 6 % CPU load. Both with motion on. The older version get some extra work with my own program in handling the video files, but that does not seem to be the difference.

The new machine motion does not want to start automatic.

IN the old machine I have a log file, in my simple program I ping to the machine from jet an other ( banana)pi after some other checks I move the files to an hard disk. A few time per day this ping fails, after that with the next ping every thing is as usual. it seem like the machine is blokked by somthing for more than 10 seconds.

Is this helpful information?

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

Re: RPi Cam Web Interface

Mon Jun 01, 2015 8:30 pm

erik123 wrote:Just a question, I have a raspberry pi2 with version 65767 may 24 and an other with version 67926 june 1. I was staring to top on both running machines. The older version raspimjpeg is about 2.5 or % CPU load the new machine is abut 6 % CPU load. Both with motion on. The older version get some extra work with my own program in handling the video files, but that does not seem to be the difference.

The new machine motion does not want to start automatic.

IN the old machine I have a log file, in my simple program I ping to the machine from jet an other ( banana)pi after some other checks I move the files to an hard disk. A few time per day this ping fails, after that with the next ping every thing is as usual. it seem like the machine is blokked by somthing for more than 10 seconds.

Is this helpful information?
Thanks. I'm not aware of any change that would have made much difference to the CPU load but I'll check into that a bit further My other start point would be to look for any other differences as well. Can you see any difference between /etc/raspimjpeg and uconfig between the machines. For example, having the circular buffer on will increase load a bit. It might also be worth doing a ps -A dump on both machines and seeing whether there is any marked difference in other processes running.

Raspimjpeg shouldn't be having any impact on networking / pings unless you are doing remote mounts.

I have all my cameras on B's, my Pi2 is reserved for compiling!. On the B's I typically see about 6% going up to 9% with internal motion detection on.

BleepandBooster
Posts: 4
Joined: Mon Feb 10, 2014 1:42 pm

Re: RPi Cam Web Interface

Tue Jun 02, 2015 9:25 am

For btidey - Updating and reinstalling the script did the trick!

Many thanks for your help.

huzeyfe
Posts: 1
Joined: Tue Jun 02, 2015 9:57 am

Re: RPi Cam Web Interface

Tue Jun 02, 2015 10:14 am

Hi, firstly this works great and is the best when compared to other stuff around, and thank u for this awesome interface. I just wanna know that, is it possible to embed audio on this streaming? While i am streaming this video through network, how can i also stream audio which is received from microphone at the same time? Is it possible or should i try something else like ffmpeg in order to stream video and audio? I would really appreciate your suggestions.

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

Re: RPi Cam Web Interface

Tue Jun 02, 2015 12:08 pm

huzeyfe wrote:Hi, firstly this works great and is the best when compared to other stuff around, and thank u for this awesome interface. I just wanna know that, is it possible to embed audio on this streaming? While i am streaming this video through network, how can i also stream audio which is received from microphone at the same time? Is it possible or should i try something else like ffmpeg in order to stream video and audio? I would really appreciate your suggestions.
Hi,

6 posts ago... viewtopic.php?f=43&t=63276&view=unread#p768364
3b+, 2b, b+, b, Zero & Zero-W

loadbang
Posts: 36
Joined: Mon Aug 13, 2012 4:56 pm

Re: RPi Cam Web Interface

Tue Jun 02, 2015 1:40 pm

I'm just installing but it appears to stop at installing motion.

Code: Select all

Setting up motion (3.2.12+git20140228-4+b2) ...
Tried multiple times.

/sbin/init seems to be running at 100% CPU.

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

log claims file is saved; but file is gone?

Tue Jun 02, 2015 2:06 pm

Here's another weird one: I was watching the preview page when event 10474 happened. The log says it was recorded. However, the file is missing from /var/www/media. I have it setup to remove files older than 40 hours, and over 2 GB. Surely it is not deleting the newest file, instead of the oldest file? Is there a problem with event numbers exceeding 4 digits? are they sorted by filename order instead of by date?

Code: Select all

[2015/06/02 06:52:35] Start capture requested
[2015/06/02 06:52:35] Send ca 1
{2015/06/02 06:52:36} Capturing started
[2015/06/02 06:52:40] Stop capture requested
[2015/06/02 06:52:40] Send ca 0
{2015/06/02 06:52:40} Capturing stopped
{2015/06/02 06:52:40} Add /var/www/media/vi_10474_20150602_065236.mp4 to Box Queue at pos 3
{2015/06/02 06:52:40} Start boxing /var/www/media/vi_10474_20150602_065236.mp4 from Box Queue at pos 3
{2015/06/02 06:52:41} DEBUG 3
{2015/06/02 06:52:41} Finished boxing /var/www/media/vi_10474_20150602_065236.mp4 from Box Queue at pos 3
[2015/06/02 06:52:48] Scheduled management tasks. Next at 1433253528
[2015/06/02 06:52:48] Purged 2 Files

$ ls vi_1047*
vi_10470_20150602_052815.mp4.v10470.th.jpg
vi_10471_20150602_064126.mp4
vi_10471_20150602_064126.mp4.v10471.th.jpg
vi_10472_20150602_064805.mp4
vi_10472_20150602_064805.mp4.v10472.th.jpg
vi_10473_20150602_065117.mp4
vi_10473_20150602_065117.mp4.v10473.th.jpg
[email protected] /var/www/media $ du
2626272 .

erik123
Posts: 20
Joined: Thu May 28, 2015 7:42 pm

Re: RPi Cam Web Interface

Tue Jun 02, 2015 5:18 pm

btidey wrote:
erik123 wrote:Just a question, I have a raspberry pi2 with version 65767 may 24 and an other with version 67926 june 1. I was staring to top on both running machines. The older version raspimjpeg is about 2.5 or % CPU load the new machine is abut 6 % CPU load. Both with motion on. The older version get some extra work with my own program in handling the video files, but that does not seem to be the difference.

The new machine motion does not want to start automatic.

IN the old machine I have a log file, in my simple program I ping to the machine from jet an other ( banana)pi after some other checks I move the files to an hard disk. A few time per day this ping fails, after that with the next ping every thing is as usual. it seem like the machine is blokked by somthing for more than 10 seconds.

Is this helpful information?
Thanks. I'm not aware of any change that would have made much difference to the CPU load but I'll check into that a bit further My other start point would be to look for any other differences as well. Can you see any difference between /etc/raspimjpeg and uconfig between the machines. For example, having the circular buffer on will increase load a bit. It might also be worth doing a ps -A dump on both machines and seeing whether there is any marked difference in other processes running.

Raspimjpeg shouldn't be having any impact on networking / pings unless you are doing remote mounts.

I have all my cameras on B's, my Pi2 is reserved for compiling!. On the B's I typically see about 6% going up to 9% with internal motion detection on.
One mystery solved one stil not clear.

I compared raspimjpeg on both machines. in the newest there is on extra line below videa_buffer 0 with h264_buffer 0,
macros_path /var/www/macros
boxing_path
subdir_char @
the line boxing_path without argument is added in the newest,
And shame on me motion detect was set to false, although I am sure it was set to true, but now it is set to true and it works perfect and starts as is should.

Uconfig is empty on both machines, and top gives also today about a factor 2 difference between the "old" and the "new" raspberry pi2

erik123
Posts: 20
Joined: Thu May 28, 2015 7:42 pm

Re: RPi Cam Web Interface

Tue Jun 02, 2015 7:46 pm

I was looking at "top" in my raspberry b+, and captured just after stopping the screen of "top" the alive file is just before it stopped, the dead file is just after it stopped. In "top" you see the raspimjpeg process disapear, than a while later my check program sees this and reset the pi. It was a Lucky timing to get both events just behind each other

the log file of that same moment is

Code: Select all

[2015/06/02 20:57:04] Start capture requested
[2015/06/02 20:57:04] Send ca 1
{2015/06/02 20:57:04} Capturing started
[2015/06/02 20:57:08] Stop capture requested
[2015/06/02 20:57:08] Send ca 0
{2015/06/02 20:57:09} Capturing stopped
{2015/06/02 20:57:09} Add /var/www/media/vi_0004_20150602_205704.mp4 to Box Queue at pos 4
[2015/06/02 20:57:10] Start capture requested
[2015/06/02 20:57:10] Send ca 1
{2015/06/02 20:57:10} Capturing started
[2015/06/02 20:57:14] Stop capture requested
[2015/06/02 20:57:14] Send ca 0
{2015/06/02 20:57:15} Capturing stopped
{2015/06/02 20:57:15} Add /var/www/media/vi_0005_20150602_205710.mp4 to Box Queue at pos 5
[2015/06/02 20:57:16] Start capture requested
[2015/06/02 20:57:16] Send ca 1
{2015/06/02 20:57:17} Capturing started
{2015/06/02 20:57:21} Finished boxing /var/www/media/vi_0003_20150602_205651.mp4 from Box Queue at pos 3
{2015/06/02 20:57:21} Start boxing /var/www/media/vi_0004_20150602_205704.mp4 from Box Queue at pos 4
[2015/06/02 20:57:29] Stop capture requested
[2015/06/02 20:57:29] Send ca 0
{2015/06/02 20:17:30} RaspiMJPEG Version 5.2.1
{2015/06/02 20:17:30} MJPEG streaming, ready to receive commands
{2015/06/02 20:17:31} External motion detection stopped
{2015/06/02 20:58:58} External motion detection started
{2015/06/02 20:58:59} send smd 9
[2015/06/02 20:59:00] RaspiCam support started
[2015/06/02 20:59:00] Capture Pipe already exists /var/www/FIFO1
[2015/06/02 20:59:00] Scheduler loop is started
[2015/06/02 20:59:00] Reload parameters command requested
[2015/06/02 20:59:00] Scheduler loop is started
[2015/06/02 20:59:01] New period detected 0
[2015/06/02 20:59:01] Scheduled management tasks. Next at 1433275141
[2015/06/02 20:59:03] Start capture requested
at 20:57:29 all was OK, at 20:57:36 top screen shows rasmpimjpeg is disapeard, and in the log just 20:57:29 you see three time stamps completly wrong.
I do not know what a ps -A dump sorry I am new to this trade, but I hope this can help you .
Attachments
raspimjpeg dead.zip
(48.37 KiB) Downloaded 76 times
raspimjpeg alive.zip
(60.99 KiB) Downloaded 77 times

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

Re: log claims file is saved; but file is gone?

Tue Jun 02, 2015 9:18 pm

jbeale wrote:Here's another weird one: I was watching the preview page when event 10474 happened. The log says it was recorded. However, the file is missing from /var/www/media. I have it setup to remove files older than 40 hours, and over 2 GB. Surely it is not deleting the newest file, instead of the oldest file? Is there a problem with event numbers exceeding 4 digits? are they sorted by filename order instead of by date?
The purge scans for files and then sorts them by their file timestamp so there shouldn't be any dependence on the name of the file or the length of the index digits.

I'll see if I can double check it somehow.

KarolGT
Posts: 12
Joined: Tue Jan 27, 2015 3:31 pm

Re: RPi Cam Web Interface

Tue Jun 02, 2015 11:36 pm

Hi

After update to RPi Cam Control v6.0.1

my /var/www/FIFO is not receiving data, from console and even from web interface.
(I was monitoring logs, and changing something in www didn't change anything in the logs)

fortunately I had one old package and I copied previous version of /etc/raspimjpeg and now it is working.

I remove everything (using the script), update raspberry firmware, kernel etc, but still the same.
Anyone else has the same problem?

User avatar
Dehumanizer
Posts: 2
Joined: Wed Jun 03, 2015 8:58 am

Re: RPi Cam Web Interface

Wed Jun 03, 2015 9:05 am

Hello all,

this might be a stupid question, but is there a raspimjpeg source code available? I have only found some old version somewhere but not the current one...

By the way, is there any way how to move the annotation to some other position? That's also why I wanted to take a look at the source to see if I can hack it in somehow.

nthnm
Posts: 15
Joined: Wed Apr 01, 2015 9:35 pm

Re: RPi Cam Web Interface

Wed Jun 03, 2015 10:12 am

I can't remember if this has been brought up already, but would it be possible to have the media files created with permissions 664 rather than 644? 664 would mean that I can add www-data to my user, then I don't need to sudo all the time to edit things. Or is there some security reason that this would be a bad idea?

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

Re: RPi Cam Web Interface

Wed Jun 03, 2015 10:21 am

I know I've seen this query somewhere before but I can't find it again. My cam time is out by an hour showing GMT not BST, how can I change it please?
3b+, 2b, b+, b, Zero & Zero-W

User avatar
DougieLawson
Posts: 36554
Joined: Sun Jun 16, 2013 11:19 pm
Location: Basingstoke, UK
Contact: Website Twitter

Re: RPi Cam Web Interface

Wed Jun 03, 2015 10:42 am

Gary Littlemore wrote:I know I've seen this query somewhere before but I can't find it again. My cam time is out by an hour showing GMT not BST, how can I change it please?
Set the time zone for the whole system. It defaults to UTC/GMT

sudo dpkg-reconfigure tzdata # or choose the menu option from sudo raspi-config

Once you change the zone you may need to reset the clock and restart ntp.
sudo date --set '2015-06-03 11:42:00'
sudo /etc/init.d/ntp stop
sudo /etc/init.d/ntp start
Note: Having anything humorous in your signature is completely banned on this forum. Wear a tin-foil hat and you'll get a ban.

Any DMs sent on Twitter will be answered next month.

This is a doctor free zone.

Return to “Camera board”