bikeadventure
Posts: 3
Joined: Tue Dec 06, 2016 1:09 am

Re: RPi Cam Web Interface

Tue Dec 06, 2016 9:20 pm

audio from whatever source, e.g. usb soundcard with microphone

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

Re: RPi Cam Web Interface

Tue Dec 06, 2016 9:27 pm

The search box is your friend.... search.php?keywords=Audio&t=63276&sf=msgonly
bikeadventure wrote:audio from whatever source, e.g. usb soundcard with microphone
3b+, 2b, b+, b, Zero & Zero-W

bikeadventure
Posts: 3
Joined: Tue Dec 06, 2016 1:09 am

Re: RPi Cam Web Interface

Wed Dec 07, 2016 6:14 am

Thanks, in summary: some want it, no easy solution which a dummy like me could set up ;-)

MyNameWolfgangS
Posts: 12
Joined: Wed Oct 01, 2014 4:15 pm

Re: RPi Cam Web Interface

Wed Dec 07, 2016 2:18 pm

Hi Dougie,

thanks for the advice. Works fine after I found out, that there has been a fault in the SyslogIdentifier. It should be raspimjpeg instead of raspmjpeg.

Again many thanks.
Wolfgang

edit: After reboot I get a loop. It seems, that I need something like a "waitAfterBoot" option. Can you please give me a hint?

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

Re: RPi Cam Web Interface

Wed Dec 07, 2016 3:04 pm

Change

Code: Select all

[Unit]
Description=raspmjpeg server
to

Code: Select all

[Unit]
Description=raspmjpeg server
After=networking.service
and it won't start before the network is connected.
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.

MyNameWolfgangS
Posts: 12
Joined: Wed Oct 01, 2014 4:15 pm

Re: RPi Cam Web Interface

Wed Dec 07, 2016 3:35 pm

Hi Dougie,

sorry, but this does not solve the problem. Ther raspberry is still in a boot loop.

Any other suggestions?

And again many thanks.
Wolfgang

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

Re: RPi Cam Web Interface

Wed Dec 07, 2016 3:39 pm

Try reading some systemd service file docs there's shed loads of it on the public internets.
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.

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

Re: RPi Cam Web Interface

Tue Dec 13, 2016 10:38 am

Hey all,

I am running several RPi Cam Web Interface and facing following issue:

whenever I need to free space and copy/move recorded media (images, videos or timelapse) from a RPi to my server it will get difficult to sort out which media is new and which ones old. Example:

RPi Web Cam interface by default in /etc/raspimjpeg use following name prefix:

Code: Select all

[...]
image_path /var/www/media/im_%i_%Y%M%D_%h%m%s.jpg
lapse_path /var/www/media/tl_%i_%t_%Y%M%D_%h%m%s.jpg
video_path /var/www/media/vi_%v_%Y%M%D_%h%m%s.mp4
[...]
When I create three image screenshots on 26th Nov. 2016 beginning at 14:04:47 o'clock they will be named like that:

im_0001_20161126_140447.jpg
im_0002_20161126_140459.jpg
im_0003_20161126_140504.jpg

Now I move these images from the RaspberryPi MMC card to another host inside my LAN (server) so the space is freed on RPi. Now again I create three new snapshots through RPiWebCamInterface, they are named like that:

im_0001_20161126_140641.jpg
im_0002_20161126_140652.jpg
im_0003_20161126_140728.jpg

Now again I move these images to my server. When I use the file explorer to look inside the folder on my server I will see following files listed:

im_0001_20161126_140447.jpg
im_0002_20161126_140459.jpg
im_0003_20161126_140504.jpg
im_0001_20161126_140641.jpg
im_0002_20161126_140652.jpg
im_0003_20161126_140728.jpg

Imagine how this looks like when you have hundreds or thousands of images inside this folder. It's very difficult to find the desired pictures because the default sorting on file explorers are by "filename". Now you say "Just sort by creation date", yeah this will help but again it's very confusing if you have lots of files in there having all the same prefixes. Also imagine what the result looks like when you move these pictures in different folders on the server, it'll get more and more confusing. It will be ok though when you let RPiWebCaminterface create an extra folder for each day but I don't like this because for every year I will get 365 folders on my file system, no I don't like that.

So how did I solve that? I just modified /etc/raspimjpeg and changed the default above mentioned paths to:

Code: Select all

[...]
image_path /var/www/media/%Y%M%D_%h%m%s_im_%i.jpg
lapse_path /var/www/media/%Y%M%D_%h%m%s_tl_%i_%t.jpg
video_path /var/www/media/%Y%M%D_%h%m%s_vi_%v.mp4
[...]
this will create the file names like that:

20161126_140447_im_0001.jpg
20161126_140459_im_0002.jpg
20161126_140504_im_0003.jpg
20161126_140641_im_0001.jpg
20161126_140652_im_0002.jpg
20161126_140728_im_0003.jpg

and in my opinion this is more convenient. What do you think? Wouldn't it be nicer to have this syntax as default in /etc/raspimjpeg for future versions? Just my thoughts. Any feedback appreciated.

Thanks for listening

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

Re: RPi Cam Web Interface

Tue Dec 13, 2016 4:00 pm

Pangu wrote:Hey all,

I am running several RPi Cam Web Interface and facing following issue:

whenever I need to free space and copy/move recorded media (images, videos or timelapse) from a RPi to my server it will get difficult to sort out which media is new and which ones old. Example:

So how did I solve that? I just modified /etc/raspimjpeg and changed the default above mentioned paths to:

Code: Select all

[...]
image_path /var/www/media/%Y%M%D_%h%m%s_im_%i.jpg
lapse_path /var/www/media/%Y%M%D_%h%m%s_tl_%i_%t.jpg
video_path /var/www/media/%Y%M%D_%h%m%s_vi_%v.mp4
[...]
and in my opinion this is more convenient. What do you think? Wouldn't it be nicer to have this syntax as default in /etc/raspimjpeg for future versions? Just my thoughts. Any feedback appreciated.

Thanks for listening
When the camera is started it finds the maximum index numbers for videos and images that exist under media and uses that as the starting point for the indexes for new captures. If earlier ones are moved / purged this won't affect the numbering sequence, but if you move them all then it will indeed start again from 1.

You can certainly move the format around like you suggest. One thing worth noting is that you can also put these new settings in the uconfig file and they will then override the ones in raspimjpeg config. This means that they will survive if install is updated and the config file reverts to default.

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

Re: RPi Cam Web Interface

Tue Dec 13, 2016 9:10 pm

This was just a suggestion if it makes sense to put as "default". What about the uconfig file, where do I find this file? I did search the whole RPi for that file but didn't find it. I definitely want to make this path_prefixes "static" to ALL my RPi's...

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

Re: RPi Cam Web Interface

Tue Dec 13, 2016 9:38 pm

Pangu wrote:This was just a suggestion if it makes sense to put as "default". What about the uconfig file, where do I find this file? I did search the whole RPi for that file but didn't find it. I definitely want to make this path_prefixes "static" to ALL my RPi's...
The uconfig file lives in the web folder (e.g. /var/www or /var/www/html). It is first created when any of the settings is changed from the default held in /etc/raspimjpeg. So if, for example, the video settings are changed from the default then they are saved in this file.

The raspimjpeg process first reads the /etc/raspimjpeg config and then it reads the uconfig file overwriting any settings that it finds in there.

Normally the only settings in uconfig are those that have been changed from the web interface but if any setting is put in there it will get obeyed.

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

Re: RPi Cam Web Interface

Tue Dec 13, 2016 10:03 pm

well just checked my RPis ... there is no uconfig file under /var/www or /var/www/html although I have made the mentioned changes (image_path, video_path, tl_path) in /etc/raspimjpeg and afterwards rebooted my RPi. The change in /etc/raspimjpeg did take effect, the filenames are created accordingly.

So what? :)

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

Re: RPi Cam Web Interface

Tue Dec 13, 2016 10:29 pm

Pangu wrote:well just checked my RPis ... there is no uconfig file under /var/www or /var/www/html although I have made the mentioned changes (image_path, video_path, tl_path) in /etc/raspimjpeg and afterwards rebooted my RPi. The change in /etc/raspimjpeg did take effect, the filenames are created accordingly.

So what? :)
uconfig is only created the first time a setting is changed from the default settings as held in /etc/raspimjpeg from the web interface. If you have never changed anything via the web interface it won't exist but you can also just create it manually. If you have installed in your own subfolder under /var/www then it would be in there.

Note that changing anything in /etc/raspimjpeg will not affect the uconfig file but the latter still has precedence.

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

Re: RPi Cam Web Interface

Wed Dec 14, 2016 7:28 am

btidey wrote:uconfig is only created the first time a setting is changed from the default settings as held in /etc/raspimjpeg from the web interface.
for example? what setting do I need to change through WebUI so it'll create a uconfig?

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

Re: RPi Cam Web Interface

Wed Dec 14, 2016 8:53 am

Pangu wrote:
btidey wrote:uconfig is only created the first time a setting is changed from the default settings as held in /etc/raspimjpeg from the web interface.
for example? what setting do I need to change through WebUI so it'll create a uconfig?
Any change under camera settings (or internal motion settings) that is different from the "default value" as defined in raspimjpeg should result in that being added to uconfig and the file created if it didn't exist before. This is how changes made on the Web GUI are persisted. If you make a change which sets the value back to the "default" value then its corresponding entry in uconfig is removed but the file doesn't get deleted even if it becomes empty.

For example if time lapse interval is changed from its default of 3 seconds to say 1 second then uconfig will get written (and created if required) with an entry
tl_interval 10

If you are not getting a uconfig file then something is wrong and the web changes won't stick.

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

Re: RPi Cam Web Interface

Wed Dec 14, 2016 12:22 pm

Ah now I got it :-) thank you for clarifying that. I have a uconfig now and I did put the desired filename prefixes in there to persist an update.

GOPI56
Posts: 29
Joined: Sat Aug 13, 2016 10:13 am
Location: Malaysia

Re: RPi Cam Web Interface

Sun Dec 18, 2016 4:10 am

Hi All,
I would like to suggest a function where the system will send email together with the captured image when motion is detected. Thank you.

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

Re: RPi Cam Web Interface

Mon Dec 19, 2016 1:16 pm

GOPI56 wrote:Hi All,
I would like to suggest a function where the system will send email together with the captured image when motion is detected. Thank you.
That's already on the Wiki, see http://elinux.org/RPi-Cam-Web-Interface
3b+, 2b, b+, b, Zero & Zero-W

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

Re: RPi Cam Web Interface

Mon Dec 19, 2016 1:31 pm

GOPI56 wrote:Hi All,
I would like to suggest a function where the system will send email together with the captured image when motion is detected. Thank you.
Yes. Use the job macros as suggested.

I'll look at including an example email macro in the install to make it easier. It needs to use an email sender program like ssmtp, mutt or one could use a python program.

czar1na
Posts: 129
Joined: Wed Dec 14, 2016 9:46 am

Re: RPi Cam Web Interface

Wed Dec 21, 2016 1:35 am

Hi, I know there have been numerous discussions about the lack of audio support, but, I haven't been able to find an answer to my q yet.

My use case is that I need livestreaming video+audio from my RPi cam with USB soundcard. I am surprised this is not still not supported - smart phone livestreams always include audio.

The previous posts I have read discuss merging audio and video files after recording is done, but I am doing livestreaming, so I need both merged in real-time.

Is there any guidance about how to do this? Even solutions that don't involve RPi-cam-web-interface?

boxgrove
Posts: 13
Joined: Mon Jun 25, 2012 3:31 pm

Re: RPi Cam Web Interface

Thu Dec 29, 2016 1:42 pm

Having real trouble with pan tilt using servo blaster.... Really reluctant to start troubleshooting as I've already managed to bake an old pi whilst messing around with servos.

Has anyone had much luck integrating the pimoroni pan tilt hat? Look's like it would be a great solution for simple pan-tilt (any for noobs like me?)

https://shop.pimoroni.com/products/pan-tilt-hat

Python library for it here... https://github.com/pimoroni/pantilt-hat

droogmic
Posts: 3
Joined: Sat Dec 31, 2016 11:34 am

Re: RPi Cam Web Interface

Sat Dec 31, 2016 12:00 pm

Hi All,

Great piece of software.
Didn't see if anyone else had done this yet, but I managed to dockerize the application, so both the installatiion and running of the application can be done in a docker container. Very useful if you are trying to run several possiby conflicting web services.

https://github.com/droogmic/rpi-cam-web-docker

I had to hardcode several workarounds to get it to work (see the Dockerfile), the weirdest of which was having to change the status_file location in the raspimjpeg config from /dev/shm/.. to /run/shm/.., the latter being used by install.sh and the front end. Are these usually linked on a pi?
Last edited by droogmic on Sun Jan 01, 2017 5:01 pm, edited 1 time in total.

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

Re: RPi Cam Web Interface

Sat Dec 31, 2016 4:23 pm

droogmic wrote:Hi All,

Great piece of software.
Didn't see if anyone else had done this yet, but I managed to dockerize the application, so both the installatiion and running of the application can be done in a docker container. Very useful if you are trying to run several possiby conflicting web services.

https://github.com/droogmic/rpi-cam-web-docker

I had to hardcode several workarounds to get it to work (see the Dockerfile), the weirdest of which was having to change the status_file location in the raspimjpeg config from /dev/shm/.. to /run/shm/.., the latter being used by install.sh and the front end. Are these usually linked on a pi?

Thanks,

Michael
Thanks for posting that. Looks interesting.

The folder /run/shm is linked to the folder /dev/shm on the pi by default, so they can be used interchangeably. Actually not particularly useful and a bit confusing.

As far as I can see it is only really the install which uses the /run/shm variant so it should be possible to change that to use the /dev/shm one.

You reference the 'front end' using the /run/shm one but I can't find that at the moment. It could be that is indirectly being used because for example the status_mjpeg.txt file in the web install folder is linked by the installer to the /run/shm version but if the install was changed to use /dev/shm this would have no impact.

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

Re: RPi Cam Web Interface

Sat Dec 31, 2016 5:30 pm

btidey wrote: As far as I can see it is only really the install which uses the /run/shm variant so it should be possible to change that to use the /dev/shm one.

You reference the 'front end' using the /run/shm one but I can't find that at the moment. It could be that is indirectly being used because for example the status_mjpeg.txt file in the web install folder is linked by the installer to the /run/shm version but if the install was changed to use /dev/shm this would have no impact.
I have changed the install.sh so only the /dev/shm is used.

This version should also eliminate some confusing but harmless 'process not found' messages appearing on the terminal

droogmic
Posts: 3
Joined: Sat Dec 31, 2016 11:34 am

Re: RPi Cam Web Interface

Sun Jan 01, 2017 4:59 pm

Thanks for the quick reply,

Indeed by front end I think I was extrapolating from install.sh (not knowing they were linked on the pi, i should have just tested it), I need to do a bit more testing but I think your latest commit fixed that.
The other things you I did were stripping all "sudo"s and having to "ldconfig" the mmal libs.

I just want to check, did you mean to do

Code: Select all

sudo killall raspimjpeg >2 /dev/null
vs

Code: Select all

sudo killall raspimjpeg 2>/dev/null
in your latest commit?

Return to “Camera board”