Mai
Posts: 14
Joined: Thu Jun 18, 2015 3:21 pm

Re: RPi Cam Web Interface

Tue Mar 13, 2018 3:07 pm

Why is there no sound? I have a usb mic and there doesn't even seem to be any mention of sound in the wiki pages!

Mai
Posts: 14
Joined: Thu Jun 18, 2015 3:21 pm

Re: RPi Cam Web Interface

Tue Mar 13, 2018 3:16 pm

The idea of this program is awesome. The implementation, no so much.
Full of bugs. Hangs all the time, or stops recording leaving files open saying "Busy",....
No one is working on the code for months now. Any request for support falls on deaf ears.
If you have weeks of time to burn, you've got the right program to do it with.

RDPUser
Posts: 142
Joined: Tue Jan 30, 2018 12:18 pm

Re: RPi Cam Web Interface

Tue Mar 13, 2018 9:45 pm

Mai wrote:
Tue Mar 13, 2018 3:16 pm
The idea of this program is awesome. The implementation, no so much.
Full of bugs. Hangs all the time, or stops recording leaving files open saying "Busy",....
No one is working on the code for months now. Any request for support falls on deaf ears.
If you have weeks of time to burn, you've got the right program to do it with.
What are you saying? The support is great!
Tip: Start from a fresh / clean Raspian Stretch installation, that will solve many problems. When I had problems with RPi Cam Webinterface, I've tested under a fresh installation and most problems were gone. Especially if you've tried other Video features like setting up program "motion" could lead to problems.
So please try with a clean Raspian Stretch and follow the instructions there https://elinux.org/RPi-Cam-Web-Interface

If then there are problems left, you can report them here.

RDPUser
Posts: 142
Joined: Tue Jan 30, 2018 12:18 pm

Re: RPi Cam Web Interface

Tue Mar 13, 2018 9:45 pm

Mai wrote:
Tue Mar 13, 2018 3:07 pm
Why is there no sound? I have a usb mic and there doesn't even seem to be any mention of sound in the wiki pages!
Standard Raspi-Cam/raspivid provides also no sound!

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

Re: RPi Cam Web Interface

Wed Mar 14, 2018 9:38 am

RDPUser wrote:
Mon Mar 12, 2018 11:59 pm
Thank you very much for all your help.

I tried to work with tempfile as you said.
As soon as this script is started user annotation text disappears and even after stopping and putting something else inside it, it won't come back. You have to reboot PI to get it back to work. What am I doing wrong?
I'll see if I can simulate that. I can't think of a reason why it should stop altogether.

Doing a ./start.sh from the RPi_Cam_Web_Interface folder should recover most things rather than a reboot. It stops the software and restarts it.

I have also added a debug.sh script. This does the same as start.sh but allows the software console output to appear in the terminal. This means that any unusual error reports can be seen.

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

Re: RPi Cam Web Interface

Wed Mar 14, 2018 9:45 am

Mai wrote:
Tue Mar 13, 2018 3:07 pm
Why is there no sound? I have a usb mic and there doesn't even seem to be any mention of sound in the wiki pages!
There is no direct method for incorporating a sound stream into the h264 recordings that the MMAL camera interface provides.

Some users have added sound by kicking off a separate sound recording and then incorporating it into the .mp4 recordings during the MP4Box operation. The macros and Mp4 command line configuration provide hooks to allow this to be done. However, there is a significant problem in getting video and sound in sync. It is possible to reasonable (but not perfect sync) by avoiding use of the pre-capture video buffer.

If anybody wants to integrate this further then please look at the source code and make any changes necessary.

n0s3
Posts: 1
Joined: Sun Mar 18, 2018 12:40 pm

Re: RPi Cam Web Interface

Sun Mar 18, 2018 12:48 pm

btidey wrote:
Sat May 23, 2015 10:34 am
For anybody interested in detection algortihms it is also possible to save the vector data used to a file for development purposes. There is a control under motion settings for this. When on then the vector data from about 4 seconds before a video capture and for the whole of the video is saved in a file with same name as the mp4 but with an extra .dat extension. Do not turn this on unless you are interested as these files are about 50% of the video so take up quite a lot of room. You can get the files by downloading the video as a zip. The .dat files are binary vector data just as sequential frames. Each frame is 4 bytes * vector_width * vector_height. E.g. for a 1920x1080 video the vector is 121x 68 so a frame is 32912 bytes. The 4 bytes are a 8bit x vector, 8 bit y vector and a 16 bit SAD value. Currently we are just doing simple sums on the x and y vectors.
hey btidey,
i am looking for information about the .dat file created by the internal motion detection thing.

my video has a res of 1296x972, i cant figure out how to interpret the resulting .dat file. I cant find any documentation... and my reserve engineering skills are limited. I tried some values and it seems that my motion file is 82x61, but still i got a wrong duration.
I think i decode it correct by (x(1byte), y(1byte), sum(2byte)).

how can i find out the resolution of the .dat file. The quoted post, is the only thing i can find covering the .dat file!

Can you or somebody else tell me how to investigate this further? i need the motion vectors and dont want to compute them again due to limited resources/

Regards
n0s3

Tia
Posts: 18
Joined: Thu Nov 09, 2017 4:11 am

Re: RPi Cam Web Interface

Sun Mar 18, 2018 5:39 pm

silvanmelchior wrote:
Fri Dec 13, 2013 4:14 pm
Installation instructions and all other information is now here:

http://elinux.org/RPi-Cam-Web-Interface
Just wanted to thank you for the awesome installation guide on elinux.org! It was very easy to use with its well-detailed instructions! I appreciate the efforts you made to put every bit of the explanation there.

Wilson11
Posts: 6
Joined: Sun Mar 18, 2018 8:38 pm

Re: RPi Cam Web Interface

Sun Mar 18, 2018 8:44 pm

I have followed the instructions at ilinux, and when I got to the stage of running ./install.sh I got a message that bash: php: command not found. Following advice on old threads it looks like when I get the message:

unable to locate package php7.0

that it is missing from my install.

I ran update, but the problem still exists. Any suggestions on whether I am actually missing php, and if so, how to get it on my system.

Its a new pi 3 with a fresh install from noobs, and all the updates done.

Thanks,
Tim

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

Re: RPi Cam Web Interface

Sun Mar 18, 2018 9:38 pm

n0s3 wrote:
Sun Mar 18, 2018 12:48 pm
btidey wrote:
Sat May 23, 2015 10:34 am
For anybody interested in detection algortihms it is also possible to save the vector data used to a file for development purposes. There is a control under motion settings for this. When on then the vector data from about 4 seconds before a video capture and for the whole of the video is saved in a file with same name as the mp4 but with an extra .dat extension. Do not turn this on unless you are interested as these files are about 50% of the video so take up quite a lot of room. You can get the files by downloading the video as a zip. The .dat files are binary vector data just as sequential frames. Each frame is 4 bytes * vector_width * vector_height. E.g. for a 1920x1080 video the vector is 121x 68 so a frame is 32912 bytes. The 4 bytes are a 8bit x vector, 8 bit y vector and a 16 bit SAD value. Currently we are just doing simple sums on the x and y vectors.
hey btidey,
i am looking for information about the .dat file created by the internal motion detection thing.

my video has a res of 1296x972, i cant figure out how to interpret the resulting .dat file. I cant find any documentation... and my reserve engineering skills are limited. I tried some values and it seems that my motion file is 82x61, but still i got a wrong duration.
I think i decode it correct by (x(1byte), y(1byte), sum(2byte)).

how can i find out the resolution of the .dat file. The quoted post, is the only thing i can find covering the .dat file!

Can you or somebody else tell me how to investigate this further? i need the motion vectors and dont want to compute them again due to limited resources/

Regards
n0s3
The vector data is the information used by the h264 encoding process. This splits the image into 16x16 pixel tiles and then works out how they are moving from frame to frame.

So the resolution is about 16 times less than the video resolution but rounded up and the width uses an extra tile

The .dat file is just a binary file which contains 4 * vw * vh bytes per frame.

However, a buffer is used to hold 100 frames of vector data prior to the start of the video recording. This is done so that vector data leading up to a motion trigger may be analysed to see how the motion triggering occurred. It can also be used to try out adjustments to the motion trigger calculations off-line. If you want to see the motion data lined up against the video data then you need to ignore the first 100 names of vector data.

To give an example, I recorded a short video clip at 1296 x 972 which contained 31 video frames (~1.25 seconds). The .dat file was 2621048 bytes.
This is 131 * 82 * 61 * 4 , i.e. 31 + 100 frames of vector data.

I have added a bit to the wiki on this.

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

Re: RPi Cam Web Interface

Sun Mar 18, 2018 9:47 pm

Wilson11 wrote:
Sun Mar 18, 2018 8:44 pm
I have followed the instructions at ilinux, and when I got to the stage of running ./install.sh I got a message that bash: php: command not found. Following advice on old threads it looks like when I get the message:

unable to locate package php7.0

that it is missing from my install.

I ran update, but the problem still exists. Any suggestions on whether I am actually missing php, and if so, how to get it on my system.

Its a new pi 3 with a fresh install from noobs, and all the updates done.

Thanks,
Tim
The ./install does try to install php. The version used is in the table of settings and defaults to 7.

If this has failed then it is possible that this is a temporary failure of the raspberry repository and a later install will fix it.

You can manually try installing by running

sudo apt-get install php7.0 php7.0-cli libapache2-mod-php7.0

It is also possible that the version number in the repositories has changed recently. I'll check that.

Note that I would recommend using a plain raspbian install rather than NOOBS. This is just as easy to do and leaves more SD card space for recordings.

ksdehoff
Posts: 8
Joined: Fri Apr 12, 2013 2:26 am

Re: RPi Cam Web Interface

Sun Mar 18, 2018 10:02 pm

Everything is working well for me. I have upgraded to an IR-CUT camera that needs a gpio command to enable/disable the ir filter. I was wondering if there is some way to use the scheduler to make the gpio call. Currently I have an external scheduler doing the day/night switch via a simple php script on the pi but being able to do it all in the built in scheduler would be fantastic. Any suggestions?

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

Re: RPi Cam Web Interface

Sun Mar 18, 2018 10:12 pm

ksdehoff wrote:
Sun Mar 18, 2018 10:02 pm
Everything is working well for me. I have upgraded to an IR-CUT camera that needs a gpio command to enable/disable the ir filter. I was wondering if there is some way to use the scheduler to make the gpio call. Currently I have an external scheduler doing the day/night switch via a simple php script on the pi but being able to do it all in the built in scheduler would be fantastic. Any suggestions?
In the period start commands you can put a series of commands separated by ';'

One of these commands can be sy macroname where macroname is a file in the macros folder

So you could have day.sh and night.sh in the macros folder and include sy day.sh and sy night.sh in the appropriate period starts.

Note that macros files must be owned by user www-data and given execute permissions.

The macros will run with the limited permissions of user www-data but these can be extended as required. For example to use gpio then user www-data should be added to the gpio group so that it can access gpio

Wilson11
Posts: 6
Joined: Sun Mar 18, 2018 8:38 pm

Re: RPi Cam Web Interface

Sun Mar 18, 2018 10:15 pm

Thanks Btidey, I tired that manual install and it came up as unable to locate either php7.0 or php7.0-cli

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

Re: RPi Cam Web Interface

Sun Mar 18, 2018 10:37 pm

Wilson11 wrote:
Sun Mar 18, 2018 10:15 pm
Thanks Btidey, I tired that manual install and it came up as unable to locate either php7.0 or php7.0-cli
I just tried with raspbian stretch 18-03-2018 and it worked Ok. I don't use noobs but I would have expected it to work. I would still use a plain raspbian OS install.

It is also possible that you have a network issue causing access to the raspberry repositories to fail.

Wilson11
Posts: 6
Joined: Sun Mar 18, 2018 8:38 pm

Re: RPi Cam Web Interface

Sun Mar 18, 2018 11:30 pm

Thanks again. How do I know if I have stretch?

Wilson11
Posts: 6
Joined: Sun Mar 18, 2018 8:38 pm

Re: RPi Cam Web Interface

Sun Mar 18, 2018 11:49 pm

It says

Reading package lists...done
E: unable to locate package php7.0
E: unable to find any package by refer 'php7.0'
E: unable to find any packages by regent 'libapache2- mod-php7.0'

My version is
4.9.35-v7+ #1014 smp

Wilson11
Posts: 6
Joined: Sun Mar 18, 2018 8:38 pm

Re: RPi Cam Web Interface

Mon Mar 19, 2018 12:57 am

I got it to install and the video works. I had to instead do

Sudo apt-get install apache2 php7.0

And that installed. If I add the rest, it wouldn't work

By the way, the streaming video works fantastic. Just took my robot out for a drive and this is just what I was after. I am using node red to control an arduino, that controls the robot.

bullockbob
Posts: 28
Joined: Wed Aug 23, 2017 10:37 am

Re: RPi Cam Web Interface

Mon Mar 19, 2018 7:47 am

Trying to install on a headless Pi Zero W, latest Raspbian with updates.

During the install script I got this ...

Unpacking libflite1:armhf (2.0.0-release-3) ...

Message from [email protected] at Mar 19 07:33:12 ...
kernel:[ 835.948907] Internal error: Oops - BUG: 0 [#1] ARM

Message from [email protected] at Mar 19 07:33:12 ...
kernel:[ 835.976851] Process ksoftirqd/0 (pid: 3, stack limit = 0xd7100188)

Message from [email protected] at Mar 19 07:33:12 ...
kernel:[ 835.978772] Stack: (0xd7101f40 to 0xd7102000)

<etc...>

Any ideas?

Thanks

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

Re: RPi Cam Web Interface

Mon Mar 19, 2018 8:58 am

Wilson11 wrote:
Mon Mar 19, 2018 12:57 am
I got it to install and the video works. I had to instead do

Sudo apt-get install apache2 php7.0

And that installed. If I add the rest, it wouldn't work

By the way, the streaming video works fantastic. Just took my robot out for a drive and this is just what I was after. I am using node red to control an arduino, that controls the robot.
OK. Good to hear it is working now. Not sure why you had package install issues. When I tested with latest Rasbian the version installed is 4.9.80-v7+ #1098

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

Re: RPi Cam Web Interface

Mon Mar 19, 2018 9:04 am

bullockbob wrote:
Mon Mar 19, 2018 7:47 am
Trying to install on a headless Pi Zero W, latest Raspbian with updates.

During the install script I got this ...

Unpacking libflite1:armhf (2.0.0-release-3) ...

Message from [email protected] at Mar 19 07:33:12 ...
kernel:[ 835.948907] Internal error: Oops - BUG: 0 [#1] ARM

Message from [email protected] at Mar 19 07:33:12 ...
kernel:[ 835.976851] Process ksoftirqd/0 (pid: 3, stack limit = 0xd7100188)

Message from [email protected] at Mar 19 07:33:12 ...
kernel:[ 835.978772] Stack: (0xd7101f40 to 0xd7102000)

<etc...>

Any ideas?

Thanks
That's a low level kernel panic during a standard package install which is not directly associated with the camera software itself but indicative of something more fundamental like a corrupt file fetch from the repositories.

I would start again with fresh Raspbian OS.

bullockbob
Posts: 28
Joined: Wed Aug 23, 2017 10:37 am

Re: RPi Cam Web Interface

Mon Mar 19, 2018 9:07 am

btidey wrote:
Mon Mar 19, 2018 9:04 am
bullockbob wrote:
Mon Mar 19, 2018 7:47 am
Trying to install on a headless Pi Zero W, latest Raspbian with updates.

During the install script I got this ...

Unpacking libflite1:armhf (2.0.0-release-3) ...

Message from [email protected] at Mar 19 07:33:12 ...
kernel:[ 835.948907] Internal error: Oops - BUG: 0 [#1] ARM

Message from [email protected] at Mar 19 07:33:12 ...
kernel:[ 835.976851] Process ksoftirqd/0 (pid: 3, stack limit = 0xd7100188)

Message from [email protected] at Mar 19 07:33:12 ...
kernel:[ 835.978772] Stack: (0xd7101f40 to 0xd7102000)

<etc...>

Any ideas?

Thanks
That's a low level kernel panic during a standard package install which is not directly associated with the camera software itself but indicative of something more fundamental like a corrupt file fetch from the repositories.

I would start again with fresh Raspbian OS.
And a new sd card as well I think. Mmm, thanks for the reply.

User avatar
RichShumaker
Posts: 168
Joined: Tue Jul 31, 2012 4:16 pm
Location: Sunny Southern CA near downtown LA
Contact: Website Facebook Google+ Twitter YouTube

Camera Module Issues

Mon Mar 19, 2018 8:01 pm

First I wanted to say I love this software.
I made a tutorial for building a RasPi ZeroW Camera Rig using this software, http://www.instructables.com/id/Pi-Zero ... Introduct/

I am about to create an update video using OTG as I finally got it to work on my Pi Zero, woohoo.
This makes the PiZero into the best web cam ever, heheh.

Now for the bad news and why I am here, I am having an issue with one of my Pi Zero Camera Rigs now.
My camera module broke, not the connector, the module actually came unglued from the board and the pins came loose.
https://www.instagram.com/p/BghFk38H6MV/
Now when I hook a new Pi Camera I get the same error.
Here is the classic error, which usually means the cable is not seated correctly,
https://cdn.instructables.com/F97/27WK/ ... .LARGE.jpg
I have tried new cameras and new cables, still get the error.

Does anyone know if the camera module detaches if it shorts out the Pi hardware?
When I plug in the Pi Zero the camera module flashes red for a split second.

Is there any type of diagnostic software I can run to get an idea of what has gone sideways?

Thanks everyone for your help.
Rich Shumaker
http://www.instructables.com/id/Pi-Zero-W-NoIR-8MP-Camera-Build-Overview-Introduct/

User avatar
RichShumaker
Posts: 168
Joined: Tue Jul 31, 2012 4:16 pm
Location: Sunny Southern CA near downtown LA
Contact: Website Facebook Google+ Twitter YouTube

Re: RPi Cam Web Interface

Tue Mar 20, 2018 10:35 am

I continued to break PiZero Camera clips and I only had one working camera out of three.
Also I broke a camera off, actually I think it de-laminated from the heat.

Then I figured out how to press the camera board back on and the glue stuck the module while the cable pressed in.
I found that the top connector to the camera module had come loose on my other camera as well.
This was the cause of my errors and I thought it was the ribbon cable, d'oh!!!

i used some electrical tape(badly) and I held the ribbon cable in.
After that, I pressed the broken connector in and added a second piece of electrical tape to hold the other side.

I was able to fix all three RasPi Zero W Camera Rigs with new and improved OTG running RPi_Cam_Web_Interface Software.
Now I just need to figure out how to fix the overheating, heheh.

I hope to have the OTG / Pi Fix video done soon.
If I can solve the overheating issue I will definitely be live streaming with these cameras.
And if I don't figure it out and I stream I might have some fun Live Shows.
Attachments
29417000_152791228873047_9066972774160924672_n.jpg
29417000_152791228873047_9066972774160924672_n.jpg (88.68 KiB) Viewed 3463 times
28752618_428562670906845_857429489808834560_n.jpg
28752618_428562670906845_857429489808834560_n.jpg (141.71 KiB) Viewed 3463 times
Rich Shumaker
http://www.instructables.com/id/Pi-Zero-W-NoIR-8MP-Camera-Build-Overview-Introduct/

User avatar
SlowBro
Posts: 165
Joined: Sat Feb 18, 2017 1:30 am

Re: RPi Cam Web Interface

Tue Mar 20, 2018 9:05 pm

Can this interface be shared without opening the firewall? So could the Pi push a stream to a web server running on AWS without altering the local firewall, and then I view the stream on my phone?

I think the only way to do this is with an RTMP server such as Red5, Wowza, or Nginix with the RTMP plugin. But maybe you know a better way.

Return to “Camera board”