![]() |
[app] N800 Camera Motion Detector w/HTTP server
This is a quick compilation of Motion with V4L2 support.
Motion is a flexible motion detection and image capture application that can capture from input video devices, perform motion analysis, and output the resulting postprocessed images to files, external processes, or straight to HTTP using its built-in HTTP server. You can use it with your N800 and turn your device into a motion capture device, automated snapshot device, or anything else you can think of. http://geopacket.com/maemo/motion-20070222.jpg I have customized the binary to overcome some issues with V4L2 on the N800 (buffer read errors), and modified the motion.conf to accomodate for the N800 (hur offset, capture delay to give minimum amount of errors, etc.) To use: 1. Unzip and copy motion and motion.conf to your N800 2. Using xterm, start motion 3. Hit the IP of your N800 with a web browser on port 8081 (use firefox!) 4. To configure via the web, load Opera and hit the N800 on port 8080 You must use mozilla or firefox as the stream is motion jpeg and IE cannot parse the stream (being the pile it is). See the FAQ for more info on setting up motion to auto-ftp images, email, postprocess, redirect, draw image boxes around motion detected, ... If you file bug reports to this thread I will do my best to fix the code. CAVEATS: non-graceful termination may hang the camera device and reboot the N800 (harmless but beware). Download here http://geopacket.com/maemo/ |
Re: [app] N800 Camera Motion Detector w/HTTP server
That's excellent konfoo!
I was wondering when apps would start showing up for the camera. I'll give it a try. Can you use "motion" in a more manual mode to take pictures and short videos on demand? /Mike |
Re: [app] N800 Camera Motion Detector w/HTTP server
Yes this would be possible with a frontend. The big requirement is ffmpeg.. which I am having some trouble compiling.
|
Re: [app] N800 Camera Motion Detector w/HTTP server
Quote:
In a related question, how do I become root and what is the password? Also, what is the password for 'user'? thanks, rhackenb |
Re: [app] N800 Camera Motion Detector w/HTTP server
Is your mmc1 device mounted with exec permissions?
For becomeroot - do a search, there are a bunch of threads on different ways to get root access. |
Re: [app] N800 Camera Motion Detector w/HTTP server
Quote:
I'll search for how to become root. What I would also like to know is the password for user. Maybe I should create another user that I have control of...oh wait...I need to be root. The next thing I will do is see if I can retrieve the image from the n800 webserver using lynx on another machine. Thanks for the help. It got me started. -- rhackenb |
Re: [app] N800 Camera Motion Detector w/HTTP server
Great :)
You can try mount -o rw,exec,remount /media/mmc1 You could do this for root access: Set red pill mode, install xterm + dropbear-server, ssh into n800, login as root/rootme, passwd user, passwd root, edit /etc/sudoers and youre done. |
Re: [app] N800 Camera Motion Detector w/HTTP server
.. and then remember to go back to blue pill mode again. ;)
|
Re: [app] N800 Camera Motion Detector w/HTTP server
konfoo/TA-t3: Installing the "becomeroot" package is a lot easier than faffing around with Red Pill Mode/SSH/Blue Pill mode (or R&D mode).
|
Re: [app] N800 Camera Motion Detector w/HTTP server
I just tried this out. Way cool that you got an app to use the camera.
|
Re: [app] N800 Camera Motion Detector w/HTTP server
this is a great app, very simple to install and use. my question is does it save the pics somewhere as a file which we need to erase or just overwrites or is just a stream.
|
Re: [app] N800 Camera Motion Detector w/HTTP server
are you using api calls, or just pulling from /dev/video?
|
Re: [app] N800 Camera Motion Detector w/HTTP server
danesh - you can edit the config file to enable saving of images based on time or motion sensing. I usually save them to the mmc card. You could also automate a script to ftp/sftp/scp them to your website if need be.
schmots - standard v4l2 video capture. Nothing special to make it work on the N800 except for tweaking a few lines in the source to ignore device capture errors. |
Re: [app] N800 Camera Motion Detector w/HTTP server
Thanks for porting this app... works great!
I was curious about the 320x240 picture resolution, because I saw a comment on the web that the camera was VGA, 640x480. I changed width and height in motion.conf to those values, but motion quits before starting the web server. I then tried CIF, 352x288, and that works. Any idea why 640x480 doesn't work? The camera API example at http://www.maemo.org/platform/docs/h..._api_bora.html is configured at 640x480. |
Re: [app] N800 Camera Motion Detector w/HTTP server
It could be a simple issue with the app still being beta-level for V4L2 support. I will continue to compile new svn builds and put them online. Next step is a .install package to make things easier for you guys.
|
Re: [app] N800 Camera Motion Detector w/HTTP server
Quote:
|
Re: [app] N800 Camera Motion Detector w/HTTP server
This is very cool! :D Finally something that gives me some hope that the n800 camera will be usable down the road.
|
Re: [app] N800 Camera Motion Detector w/HTTP server
@Moonshine
Thanks for digging this up! Didn't know about it! Nice :) All it needs is some interface so we don't need to start it from the terminal... Hmm that shouldn't even be hard... we'll see... |
Re: [app] N800 Camera Motion Detector w/HTTP server
This would be awesome if it were a .deb with interface -- I am to think to get things going to well from the command line, I guess...
|
Re: [app] N800 Camera Motion Detector w/HTTP server
Great work konfoo fellah! This is brilliant. I just remembered why I love the N800 so much. It's a new toy every day.
Seriously, your work compiling this is much appreciated. Thanks! |
Re: [app] N800 Camera Motion Detector w/HTTP server
any news on this project, when the .deb will available?
|
Re: [app] N800 Camera Motion Detector w/HTTP server
See, this might be a clever app that uses the camera, but I don't get it: Why in Loki's name would I ever want to leave my tablet behind?
I'm imagining pictures of a hand, growing larger and larger and then... Poof! no more N800... |
Re: [app] N800 Camera Motion Detector w/HTTP server
I just setup motion on my N800 with os2008 and it is working great looks like if you have a sip account setup you have to shut it off or it will kill the camera. But other wise it is a great app. I even used a java code to stream it to a webserver and now you can view it in IE firefox and more .. I hope to see a front end on this app soon that will be great .
computerfreek |
Re: [app] N800 Camera Motion Detector w/HTTP server
I'm logged in as root, copied the files to /home/user, but when I try to ./motion I get "permission denied". Any thoughts?
Also, a follow-up, how would I turn it off, just close the camera? Can't wait to monitor the dog when away. But wait, that DOES mean I have to leave my nokia behind...no way. EDIT: Does this work on OS2008? I searched the "applications running on OS2008" thread but came up empty... EDIT2: I changed permissions to 777 and got it to run, but it is still failing. Do I need to have the camera out prior to running the app, do I close the internet call app that automatically pops open when the camera is enabled? Any help would be appreciated. |
Re: [app] N800 Camera Motion Detector w/HTTP server
I'd just like to point out that at $220, an N800 competes pretty well in price with dedicated video server cameras.
And in response to "why would I leave the camera behind", this will be useful for me, around the house, to monitor the kids playing when I'm in another room. |
Re: [app] N800 Camera Motion Detector w/HTTP server
Quote:
1st set your sip accounts off if you have any . 2nd open you camera/pop it out 3rd reboot your n800 4 when the system is loaded go right to xterm and start ./motion 5 it works !!! I have tested this over and over and it seems like you can only get it working from a clean start without any sip accounts runing . I know there must be a way to reset the camera VIA command line i just can;t find out how to do it . So you will have to do it the way i am for now. Computerfreek |
Re: [app] N800 Camera Motion Detector w/HTTP server
How to run it on n810 please?
I have those errors: Atlas-tablet:~# ./motion [0] Processing thread 0 - config file motion.conf [0] Unknown config option "ffmpeg_cap_new" [0] Unknown config option "ffmpeg_cap_motion" [0] Unknown config option "ffmpeg_timelapse" [0] Unknown config option "ffmpeg_timelapse_mode" [0] Unknown config option "ffmpeg_bps" [0] Unknown config option "ffmpeg_variable_bitrate" [0] Unknown config option "ffmpeg_video_codec" [0] Unknown config option "ffmpeg_deinterlace" [0] Unknown config option "movie_filename" [0] Unknown config option "timelapse_filename" [0] Unknown config option "sql_log_image" [0] Unknown config option "sql_log_snapshot" [0] Unknown config option "sql_log_mpeg" [0] Unknown config option "sql_log_timelapse" [0] Unknown config option "sql_query" [0] Thread 1 is from motion.conf [1] Thread started [0] motion-httpd/3.2.8 running, accepting connections [0] motion-httpd: waiting for data on port TCP 8080 [1] cap.driver: "omap24xxcam" [1] cap.card: "omap24xxcam" [1] cap.bus_info: "" [1] cap.capabilities=0x04000001 [1] - VIDEO_CAPTURE [1] - STREAMING [1] v4l2_select_input: name = "camera", type 0x00000002, status 00000000 [1] - CAMERA [1] Supported palettes: [1] 0: UYVY (YUYV (YUV 4:2:2), packed) [1] 1: RGBP (RGB565, le) [1] Test palette UYVY (320x240) [1] Using palette UYVY (320x240) bytesperlines 640 sizeimage 153600 colorspace 00000007 [1] found control 0x0098090e, "Red Balance", range 0,255 [1] "Red Balance", default 0, current 64 [1] found control 0x0098090f, "Blue Balance", range 0,255 [1] "Blue Balance", default 0, current 64 [1] found control 0x00980911, "Exposure Time", range 0,8191 [1] "Exposure Time", default 0, current 525 [1] found control 0x00980913, "Gain", range 0,63 [1] "Gain", default 0, current 192 [1] found control 0x08000000, "Auto Luminance Control", range 0,1 [1] "Auto Luminance Control", default 0, current 0 [1] found control 0x08000001, "Horizontal Edge Enhancement", range 0,255 [1] "Horizontal Edge Enhancement", default 0, current 4 [1] mmap information: [1] frames=4 [1] 0 length=155648 [1] 1 length=155648 [1] 2 length=155648 [1] 3 length=155648 [1] Using V4L2 [1] setting control "Gain" to 3 (ret 0 ) [1] Started stream webcam server in port 8081 [1] v4l2_next: VIDIOC_DQBUF: Input/output error [1] Resuming operation... this may be a N800 quirk [1] v4l2_next: VIDIOC_QBUF: Invalid argument [1] Video device fatal error - terminating camera thread [1] Thread exiting [1] Somebody stole the video device, lets hope we got his picture: Invalid argument [0] Motion terminating [0] httpd - Finishing: Success [0] httpd Closing |
Re: [app] N800 Camera Motion Detector w/HTTP server
@computerfreak Yup, that works, thanks!
|
Re: [app] N800 Camera Motion Detector w/HTTP server
It works once and now I am getting this error.
[1] setting control "Gain" to 3 (ret 0 ) [1] Started stream webcam server in port 8081 [1] v4l2_next: VIDIOC_DQBUF: Input/output error [1] Resuming operation... this may be a N800 quirk [1] v4l2_next: VIDIOC_QBUF: Invalid argument [1] Video device fatal error - terminating camera thread [1] Thread exiting [1] Somebody stole the video device, lets hope we got his picture: Invalid argument [0] Motion terminating Can someone help? reboot didn't work. |
Re: [app] N800 Camera Motion Detector w/HTTP server
@computerfreak: it works once I reboot from commandline. not the power off button.
I dunno maybe that conflict with another app which I installed for video recording. I know that doesn't make sense. but that how it worked.... |
Re: [app] N800 Camera Motion Detector w/HTTP server
Thank you Thank you Thank you. This is my first post. What a great machine! I had to get an n800 after a friend showed his off. Thanks everyone.
BTW: a clean boot was the last thing I tried to get it running. Dave |
Re: [app] N800 Camera Motion Detector w/HTTP server
Hello will this work on the 810 ?
|
Re: [app] N800 Camera Motion Detector w/HTTP server
hand install and pop out camera/reboot before use - worked for me just fine on my n800.
used ssh/root - no sudo/red pill/blue pill required. pretty neat - only thing i noticed was when I killed the motion app - I had to reboot again to get the app to see the hardware camera device. Is there a perfered shutdown signal or web instruction to resolve this? |
Re: [app] N800 Camera Motion Detector w/HTTP server
Oh man, I just noticed this. Someone should develop it more and put more features in. is there a step by step on how I can get images saved to a ftp site?
edit: also, i get the same error as atlas95 mentioned above, does anyone know how to fix it? Or rather, how do I know if it's loaded? does it say motion application loaded? edit2: some fiddling around Code:
|
Re: [app] N800 Camera Motion Detector w/HTTP server
is there any way to set this up so it could be pluged in to a usb i guess otg style...
|
Re: [app] N800 Camera Motion Detector w/HTTP server
I keep gettiing that same error, has anyone found how to fix it?
|
Re: [app] N800 Camera Motion Detector w/HTTP server
I also get the 'Someone stole the video device!' error as well. I've looked through the conf as much as I can but I can't see anything that seems helpful. When it works, it works just fine, and exactly as intended, but after you kill it, you have about a 1% chance of being able to start it back up again unless you reboot the tablet from the console.
Meanwhile, other camera apps continue to work perfectly fine, including the Nokia Camera application, Gizmo, and even Gstreamer can accept the camera just fine. But even after running those and going back to try to run Motion again, it still complains about Someone stole the video device. Perhaps Motion needs some flushing or something when it shuts down to ensure that when it tries to start up, there aren't any temp files being left anywhere that are causing it. |
Re: [app] N800 Camera Motion Detector w/HTTP server
See this post http://www.internettablettalk.com/fo...ad.php?t=20309 for a working OS2008 webcam software it works great for motion and just as a webcam .. easy to install and very easy to use all web interface based and no command lines to deal with...
computerfreek274 |
All times are GMT. The time now is 17:36. |
vBulletin® Version 3.8.8