mikerr
Posts: 2774
Joined: Thu Jan 12, 2012 12:46 pm
Location: UK
Contact: Website

Raspicam Remote - view Pi camera on Android

Sun Jan 26, 2014 12:04 am

I have a few Pi's with camera and wanted an easy way to remotely view/position them,
so I made an android app:

RaspiCAM Remote is a free android app to view the Raspberry Pi camera module on your Android Device.
- NO software needs to be installed or configured on the Raspberry Pi - uses standard NOOBS setup
- support for USB cameras too
- Pictures from the Raspberry Pi Camera can be saved to your phone's gallery.
- Continuous video mode (and 30fps streaming) for camera monitoring on your Android device
- easily configure and test the raspberry pi camera's built in image filters.
- works in landscape or portrait mode, tap to show/hide controls.

Simply type in the ip address of your Raspberry Pi to connect and view straight away.
Can even view the Raspberry Pi Camera remotely over the internet if you setup port forwarding (port 22)

http://www.youtube.com/watch?v=E2bvU7xVn_I
https://play.google.com/store/apps/deta ... iremotecam


[my last post was lost in "the great Raspberry pi forum wipeout of 2014" so here it is again ; ) ]

Anyway, comments and requests welcome !
Last edited by mikerr on Wed Mar 19, 2014 11:36 am, edited 1 time in total.

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

Re: Raspicam Remote - view Pi camera on Android

Sun Jan 26, 2014 12:06 am

Can you publish the source code for your Android app so that we can hack it?

(I asked that before the Great Forum Disaster of 2014.)
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.

User avatar
redhawk
Posts: 3465
Joined: Sun Mar 04, 2012 2:13 pm
Location: ::1

Re: Raspicam Remote - view Pi camera on Android

Sun Jan 26, 2014 12:19 am

I'm assuming the video stream is using rtsp in which case all you need to do is call the stock video player with the rtsp link i.e.
am start -a android.intent.action.VIEW -t video/mp4 -n com.cooliris.media/.MovieView -d rtsp://ip_of_pi/plus_any_other_commandline_stuff

Richard S.

mikerr
Posts: 2774
Joined: Thu Jan 12, 2012 12:46 pm
Location: UK
Contact: Website

Re: Raspicam Remote - view Pi camera on Android

Sun Jan 26, 2014 12:47 pm

DougieLawson wrote:Can you publish the source code for your Android app so that we can hack it?
Not at the moment (though I might put something up on http://github.com/mikerr)
redhawk wrote:I'm assuming the video stream is using rtsp in which case all you need to do is call the stock video player with the rtsp link i.e.
am start -a android.intent.action.VIEW -t video/mp4 -n com.cooliris.media/.MovieView -d rtsp://ip_of_pi/plus_any_other_commandline_stuff
That would need RTSP server installing on Pi first.
I wanted zero software or config needed on the Pi for this.

Stupotmcdoodlepip
Posts: 21
Joined: Sun Jan 26, 2014 6:25 pm

Re: Raspicam Remote - view Pi camera on Android

Sun Jan 26, 2014 6:33 pm

Nice - this might come in handy for an astronomy camera I'm trying to make :)
You can use VLC to handle the RTSP streaming stuff. I'm trying to play with that at the moment, but the Android side is proving difficult.
Anyway, as an example, you can use something like this to stream the RaspiCam over RTSP:

Code: Select all

raspivid -o - -t 9999999 -w 1280 -h 1024 -b 500000 -fps 20|cvlc -vvv stream:///dev/stdin --sout '#rtp{sdp=rtsp://:8554/}' :demux=h264
You can view this easily using VLC on (so far) any platform (including Android VLC) by opening a network stream like:

Code: Select all

rtsp://192.168.1.94:8554/
where the IP is that of your RPi.

However, the standard videoview / mediacontroller stuff in Android doesn't like the format.

I'll let you know if I get it working. If you're interested, that is?

Cheers,
Stu
Last edited by Stupotmcdoodlepip on Sun Jan 26, 2014 7:09 pm, edited 1 time in total.

User avatar
bugsy_malone 666
Posts: 289
Joined: Mon Dec 17, 2012 10:50 pm
Location: Basingstoke UK

Re: Raspicam Remote - view Pi camera on Android

Sun Jan 26, 2014 6:58 pm

This is fairly useful if your connected to a network, I wonder how difficult it would be to have a bluetooth version?

Currently I am looking at the fact when you have a headless install 20ft up a tree or something for surveillance or wildlife watching in a remote spot, its often hard to setup. I have a bluetooth terminal app which I have been finding useful to do some minor things with, but if video frames could be transmitted would be awesome.

ethanol100
Posts: 583
Joined: Wed Oct 02, 2013 12:28 pm

Re: Raspicam Remote - view Pi camera on Android

Mon Jan 27, 2014 1:58 pm

You could use bluetooth PAN for networking (if your android phone supports it). But the bandwidth is too small to receive a video stream. Bluetooth v2.0 + EDR has a practical data transfer rate of about 2.1 Mbit/s (~269 kB/s). One full frames would take several seconds.

I use bluetooth with PAN to remote control my raspicam via ssh. And transfering pictures takes ages.

But if you just want to get some pictures over bluetooth you could use obexftp to send or obexftpd tp browse your pictures over bluetooth without the need of a PAN.

bantammenace2012
Posts: 122
Joined: Mon May 28, 2012 12:18 pm

Re: Raspicam Remote - view Pi camera on Android

Mon Jan 27, 2014 6:15 pm

I am using Dave Jones' Picamera/picroscopy remotely and it is not logistically possible for me to attach a monitor to preview the image. I want to take photos/start videoing when an object of interest enters the field of view. I therefore need to see what the camera preview sees. Latency or image quality isn't likely to be too big a problem as the Picamera has a 10 second rolling video buffer.
I have looked at purchasing a WHDI system to do this. Something like the Nyrius ARIES™ Pro Wireless HD for Laptops Model #: NPCS550.
Before spending anything I have been trying Raspicam Remote. It works for individual image grabs but in my setup I think the default image sizes from the Raspberry Pi are too big to handle in continuous grab mode (My Pi is setup as a wireless access point transmitting to my android smartphone). I know there are some settings in Picamera to reduce the size and resolution of the Preview image and I shall play with these to see what difference it makes. Are there any settings in Raspicam Remote that I might also look at tweaking, and if so where are they ?
Has anyone any optimum settings for their setup which they would like to share ?

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

Re: Raspicam Remote - view Pi camera on Android

Mon Jan 27, 2014 8:37 pm

Raspicam Remote sounds impressive that it can do this without installing anything on the Pi.

If you don't mind installing stuff, I have found that the RPi Cam Web Interface works quite well, including to an Andoid phone. If you have a good network connection it can be quite a bit faster then 2 fps. It uses MJPEG instead of H.264 for the preview, so you do need a good connection for a decent framerate. If it's too slow, you can speed it up by changing the startup in /etc/rc.local to use a smaller MJPEG resolution. http://www.raspberrypi.org/phpBB3/viewt ... 43&t=63276

mspohr
Posts: 16
Joined: Wed Oct 17, 2012 4:27 pm

Re: Raspicam Remote - view Pi camera on Android

Mon Feb 17, 2014 10:27 pm

Having a problem with the latest update 1.07.
It connects and causes the camera light to blink red when it's "grabbing an image" but it doesn't display the image on the screen. Continuous mode causes the camere red light to blink but the screen is black. The screen is just black.
I've tried this with a Nexus 7 and a Nexus One.
This used to work with earlier versions.

mikerr
Posts: 2774
Joined: Thu Jan 12, 2012 12:46 pm
Location: UK
Contact: Website

Re: Raspicam Remote - view Pi camera on Android

Tue Feb 18, 2014 8:30 pm

1.07 was mainly the touch based live-zoom & pinch to rotate controls, (http://www.youtube.com/watch?v=jA0Ws_qF2vI)
and as a consequence the image can be moved off screen

If there's no error message, it's possible it the image may be may be offscreen - I did see a few problems with the image jumping on first press.
try dragging a part of the screen to see if you can pull the image on...

The freeform rotate is too slow on some older phones, so I've added an option to turn it off in 1.08
which should be live on the play store anytime now.
Android app - Raspi Card Imager - download and image SD cards - No PC required !

mspohr
Posts: 16
Joined: Wed Oct 17, 2012 4:27 pm

Re: Raspicam Remote - view Pi camera on Android

Tue Feb 18, 2014 10:18 pm

The application automatically updated itself overnight but it still says v1.07.
It's working now (including zoom and rotate).
Thank you.

User avatar
redhawk
Posts: 3465
Joined: Sun Mar 04, 2012 2:13 pm
Location: ::1

Re: Raspicam Remote - view Pi camera on Android

Wed Feb 19, 2014 10:48 am

I had a play with Raspicam today and as I understand this app supports USB webcams.
Unfortunately it didn't work for me, I enabled "Use USB camera" settings but it's still running raspistill and grabbing no images.
My USB webcam is working (/dev/video0) I just tested it with fswebcam so I'm a little puzzled.
Other than that the program looks pretty nice just a pity I cannot get the USB cam working.

In future releases could you add options for continuous mode delay duration and support for multiple USB webcams ( /dev/video0 /dev/video1 ) (and switch between multiple sources) etc.

Richard S.

mikerr
Posts: 2774
Joined: Thu Jan 12, 2012 12:46 pm
Location: UK
Contact: Website

Re: Raspicam Remote - view Pi camera on Android

Wed Feb 19, 2014 1:57 pm

You're right, a change in code has broken USB support in that release :oops:
its back n working now (as soon as google play updates)

Note USB cam support does need mplayer installed on your Pi
redhawk wrote: In future releases could you add options for continuous mode delay duration
and support for multiple USB webcams ( /dev/video0 /dev/video1 ) (and switch between multiple sources) etc.
Delay time is in there now (for raspistill, as it's passed through to the -t parameter), it's ignored for usb at present.

Good idea to change from just raspistill/usb to multiple dev/video* sources
- it'll probably be better to put that on the main menu for fast switching
Android app - Raspi Card Imager - download and image SD cards - No PC required !

mspohr
Posts: 16
Joined: Wed Oct 17, 2012 4:27 pm

Re: Raspicam Remote - view Pi camera on Android

Wed Feb 19, 2014 4:39 pm

I'm having some problems apply the effects to the photos. Sometimes when I go to settings and choose an effect such as watercolor, etc. it is applied to the image. Sometimes the effect is not applied. I'm trying to figure out exactly what circumstances apply the effect. It seems that when I save an image then apply an effect, it works (often for several effects) but then it stops for some reason. After some other fiddling (change size or orientation of tablet, it might start working again.
After choosing the effect in settings, it always says "effect applied" then "grabbing image".

mikerr
Posts: 2774
Joined: Thu Jan 12, 2012 12:46 pm
Location: UK
Contact: Website

Re: Raspicam Remote - view Pi camera on Android

Wed Feb 19, 2014 5:58 pm

Effects applied in settings override those in the popup menu. (Which is a bug)

A workaround is to clear "commandline settings",
or put -hf in that box.
Android app - Raspi Card Imager - download and image SD cards - No PC required !

mspohr
Posts: 16
Joined: Wed Oct 17, 2012 4:27 pm

Re: Raspicam Remote - view Pi camera on Android

Wed Feb 19, 2014 10:15 pm

Still having a lot of problems applying different effects. Most of the time is just get stuck on one effect and won't change effect when I select it from the "tool" menu.
I have gone to the "settings" menu and there are no parameters listed in the "extra command line options" so those are not overriding. If I set the effect in the "settings" screen, it puts a parameter there but doesn't apply it. (Just noticed that it does apply the effect from settings but after about 60 seconds... maybe just slow here? ... other effects seem to be applied quickly (when they work).
Still the problem when change effect from tools button... most of the time doesn't change.
Settings seems to be stuck on oilpaint now... I delete it from the Extra box and Save but it comes back when I open Settings again.

mikerr
Posts: 2774
Joined: Thu Jan 12, 2012 12:46 pm
Location: UK
Contact: Website

Re: Raspicam Remote - view Pi camera on Android

Thu Feb 20, 2014 5:35 pm

A new version 1.09 should be available on the play store now.

It has a more streamlined method of applying settings, so there should be less problems.
Android app - Raspi Card Imager - download and image SD cards - No PC required !

User avatar
redhawk
Posts: 3465
Joined: Sun Mar 04, 2012 2:13 pm
Location: ::1

Re: Raspicam Remote - view Pi camera on Android

Thu Feb 20, 2014 9:34 pm

I've updated Raspicam and I still cannot capture from USB webcam. :?
According to my logcat trace it looks like you're attempting to capture images via mplayer which is not present on my system.
Is there any chance you could add support to fswebcam I don't want to install the mplayer app unless it was really necessary.

In the meantime I've knocked up a dirty hack to get fswebcam working just in case other people may need it.
A bash script called mplayer needs to be placed somewhere in the path i.e. sudo nano /bin/mplayer and made executable with: sudo chmod +x /bin/mplayer

Code: Select all

#!/bin/bash
size="640x480"
tmp="/tmp/00000001.jpg"
sudo fswebcam -q -S 5 -r $size $tmp > /dev/null 2>&1
Richard S.

mikerr
Posts: 2774
Joined: Thu Jan 12, 2012 12:46 pm
Location: UK
Contact: Website

Re: Raspicam Remote - view Pi camera on Android

Thu Feb 20, 2014 10:10 pm

I did mention it needs mplayer for USB cams in my reply above, but you found out the long way ;)

My original aim of this app was to have something that needed no setup or install of any kind on the pi.
Mainly for ease of use over multiple pi's. I can point it at a fresh install and get pictures without ever logging into the pi manually.

While I achieved that for the Pi Camera, I couldn't find a way to get jpeg's out of a USB / v4l source with just the NOOBs install
hence using mplayer which is "often" installed.

It could easily be adapted to fswebcam (and maybe better if that can push jpegs faster than mplayer)

[edit] ah, good work with that script - the app calls:

Code: Select all

mplayer tv://driver=v4l -vo jpeg:outdir=/tmp  -frames 1 -really-quiet -nolirc >/dev/null;cat /tmp/00000001.jpg
so your script will work fine.
Android app - Raspi Card Imager - download and image SD cards - No PC required !

mspohr
Posts: 16
Joined: Wed Oct 17, 2012 4:27 pm

Re: Raspicam Remote - view Pi camera on Android

Sat Feb 22, 2014 5:15 pm

I just wanted to let you know that the new 1.09 version is working great. It seems to have taken care of all of the issues with setting effects.
Thanks very much for being so responsive and taking care of the problems.
I love this software. It's simple to use and works great!

mspohr
Posts: 16
Joined: Wed Oct 17, 2012 4:27 pm

Re: Raspicam Remote - view Pi camera on Android

Mon Feb 24, 2014 11:23 pm

I'm feeling a bit confused because I can't find images saved to "Gallery".
My SD card has a DCIM folder with most of the photos and several sub-directories "100ANDRO", "100MEDIA", "Camera". The saved images don't seem to be in any of these directories and don't show up in the Gallery application.
Is there some special place the images are saved? I know I've saved (and found) images before so I'm thinking that I'm just lost and confused.
Is it possible to define a specific place to save images?

Roto36
Posts: 4
Joined: Sun Feb 09, 2014 4:47 am

Re: Raspicam Remote - view Pi camera on Android

Fri Feb 28, 2014 12:31 am

Successfully connected with my new (Galaxy S4 mini) android phone. After 1 to 3 seconds (and not touching anything else) the image sets itself to "emboss" and does not allow any further changes. Tested on my Galaxy tab3 and had no problems at all. Any idea what this could be?

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

Re: Raspicam Remote - view Pi camera on Android

Tue Mar 04, 2014 7:11 pm

I found an interesting bug.

If I add parms "-g -gs teapot -t 0" in this Android app's setting's page then even when I've closed it, disconnected from the RPi there's a copy of raspistill still running. I have to log on and kill that.

I finally worked out how this thing works. You're passing a raspistill command into the RPi using ssh and piping the output back to the Android app.
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.

mikerr
Posts: 2774
Joined: Thu Jan 12, 2012 12:46 pm
Location: UK
Contact: Website

Re: Raspicam Remote - view Pi camera on Android

Tue Mar 04, 2014 8:56 pm

I finally worked out how this thing works. You're passing a raspistill command into the RPi using ssh and piping the output back to the Android app.
Did the fact that port 22 is mentioned everywhere give it away ? :D
DougieLawson wrote:I found an interesting bug.

If I add parms "-g -gs teapot -t 0" in this Android app's setting's page then even when I've closed it, disconnected from the RPi there's a copy of raspistill still running. I have to log on and kill that.
.
-t 0 means "run forever, never outputting a file", and the texture mapping options -g -gs teapot" only work on the Pi's GPU to the locally connected HDMI/composite screen,
they aren't passed through to the jpeg (as you'll notice if you put -t 100 or so)

So that whole line is a little off the wall, but granted it should be caught and cleaned up by the app (and that is a bug)
maybe remove the whole extra options box - it was originally there for flexibility, before many of the GUI elements were added.
Roto36 wrote:Successfully connected with my new (Galaxy S4 mini) android phone. After 1 to 3 seconds (and not touching anything else) the image sets itself to "emboss" and does not allow any further changes. Tested on my Galaxy tab3 and had no problems at all. Any idea what this could be?
Has the S4 mini had previous versions of the app on it ? An update keeps settings, and it's possible it's carried over a bad setting.
Going to google play and uninstalling, then installing again may fix as that removes all user settings.
Android app - Raspi Card Imager - download and image SD cards - No PC required !

Return to “Camera board”