Active Topics

 


Reply
Thread Tools
qole's Avatar
Moderator | Posts: 7,109 | Thanked: 8,820 times | Joined on Oct 2007 @ Vancouver, BC, Canada
#1
I thought it would be a good idea to start a thread discussing some of the software and hacks people have discovered for using the cam.

So I'll start things off with two hacks.

First, a method for turning your tablet into a very nice little "mirror," for checking if you got all the mustard off from around your mouth or whatever.

You will need mplayer-v4l from this blog post. Bundyo's MPlayer 1.0 rc2 from this thread works too, but it is noticeably slower, even though it is supposed to be optimized for the tablets.

Use the following command line:

Code:
mplayer-v4l tv:// -tv driver=v4l2:width=640:height=480:noaudio -vf mirror,crop=640:384:0:48
Notes:
  • I cropped the picture to fit the screen's aspect ratio, because I think it looks better when the image fills the whole screen. If you want the camera's full image, just leave the ",crop=640:384:0:48" out of the command line.
  • This can be quite easily turned into a script and then added to your menu.
  • The picture here looks really clear and sharp, especially in bright light. Low light is fairly noisy.

Secondly, a camcorder!

If you get mencoder from Bundyo's post (linked above), you can record fairly decent, uncompressed video from the internal cam. Save it to a big flash card because it eats 140 MB per MINUTE. You will have to compress this after recording if you want to get the video down to a reasonable size....

Code:
mencoder -cache 512 tv:// -ovc copy -tv driver=v4l2:width=320:height=240:noaudio -fps 15 -oac copy -o /media/mmc1/video/test.avi

Notes:
  • I have yet to get the audio working. I have no idea how to access the mic via ALSA; what is the hardware ID? (see my post here for more)
  • I don't know how to display the video to the screen at the same time as recording it. Anyone know a way to pipe output to mplayer?
  • If you have an N800 and you want to turn the camera around and record, you will have to add the "-flip" parameter to the command above. It would probably be better to NOT use that parameter when recording (slows things down), but use it when playing (with mplayer) or encoding (with mencoder) the file.

I have managed to do similar things using the gstreamer framework, but I haven't been too happy with the results. The two big benefits of using gstreamer instead of mplayer / mencoder are
  1. You can watch the video you record using a "tee"
  2. Audio works!

EDIT: Here is my post explaining how to use GStreamer to record high-quality video and audio, along with an example. Note: audio sync is a problem.

I will keep experimenting, but I wanted to post in the hopes that other camera hackers would pitch in with some tips, and maybe someone could actually build a good video cam recorder using mencoder; after all, it supports h263 and other high-speed encoding codecs. I just haven't figured out the settings for encoding fast enough to keep up with the camera (I get about 5 seconds of 320x240 mpeg4 or wmv2 video before things fall too far behind and the file stops working).

Here is my post about taking a multi-frame averaged camera pic, good for low-light situations. It is followed by a link to an example.

Last edited by qole; 2008-04-20 at 01:06. Reason: Added link to GStreamer camcorder post, averaged pic.
 

The Following 9 Users Say Thank You to qole For This Useful Post:
heavyt's Avatar
Posts: 708 | Thanked: 125 times | Joined on Jan 2007 @ Too Close To D.C
#2
Are you saying that mencoder does a better job at video recording than Videocamera? I got a file the size of 1.6 MB for 1 minute of recording with Videocamera am I missing something in your post?
 
qole's Avatar
Moderator | Posts: 7,109 | Thanked: 8,820 times | Joined on Oct 2007 @ Vancouver, BC, Canada
#3
I think the video recorded with mencoder looks better than the video recorded with Videocamera. This is probably because the frame dimensions are 320x240. But the HQ recording comes at a cost; I can't seem to compress it on-the-fly, hence the monster file size.

The Videocamera app has audio, but there is no way to change any of the settings (codec, compression level, etc), and so I would like to find a technique for recording video that lets me choose the compression etc. Also, the audio doesn't synch properly on files from the Videocamera app.

I would also like to get VLC compiled with V4L2 support, because it worked for streaming WMV video from the built-in camera with OS2007 in the Peekaboo project...
 
linux_author's Avatar
Posts: 282 | Thanked: 69 times | Joined on Dec 2007 @ Penniless Park, Fla.
#4
motion detector?

works fine on my os2007 n800...
 
heavyt's Avatar
Posts: 708 | Thanked: 125 times | Joined on Jan 2007 @ Too Close To D.C
#5
Originally Posted by qole View Post
I think the video recorded with mencoder looks better than the video recorded with Videocamera. This is probably because the frame dimensions are 320x240. But the HQ recording comes at a cost; I can't seem to compress it on-the-fly, hence the monster file size.

The Videocamera app has audio, but there is no way to change any of the settings (codec, compression level, etc), and so I would like to find a technique for recording video that lets me choose the compression etc. Also, the audio doesn't synch properly on files from the Videocamera app.

I would also like to get VLC compiled with V4L2 support, because it worked for streaming WMV video from the built-in camera with OS2007 in the Peekaboo project...
OK, I understand your post clearly now.
 
sondjata's Avatar
Posts: 1,076 | Thanked: 176 times | Joined on Mar 2007
#6
anyone else notice that the camera on the N800 no longer auto flips the image when turned around?
 
heavyt's Avatar
Posts: 708 | Thanked: 125 times | Joined on Jan 2007 @ Too Close To D.C
#7
Originally Posted by sondjata View Post
anyone else notice that the camera on the N800 no longer auto flips the image when turned around?
Flips on my N800. I seem to remember there being a thread on this problem a year ago.

http://www.internettablettalk.com/fo...94&postcount=1

Last edited by heavyt; 2008-04-12 at 00:30. Reason: link
 
sondjata's Avatar
Posts: 1,076 | Thanked: 176 times | Joined on Mar 2007
#8
well. Mine worked fine a year ago. Heck it worked fine up until that last OS flash. Not a bug deal, just noticed it.
 
Posts: 99 | Thanked: 17 times | Joined on Mar 2008
#9
what we need is camera support for flash XD. I want to use it like a portable webcam.
 
qole's Avatar
Moderator | Posts: 7,109 | Thanked: 8,820 times | Joined on Oct 2007 @ Vancouver, BC, Canada
#10
Originally Posted by linux_author View Post
motion detector?

works fine on my os2007 n800...
Originally Posted by konfoo View Post
I have customized the [motion] 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.)...

... the stream is motion jpeg...

1. Does it work in 2008 OS? (I was careful to post in that forum, because VLC video streaming also worked great in 2007 OS via the Peekaboo project, but it hasn't been compiled for 2008)
2. Does it let you set the resolution?
3. It only takes jpeg stills or video in motion jpeg .

This has given me some new info, however; the N800's webcam has some "issues" that need to be "overcome" before recording works smoothly. The "buffer read errors" might actually explain my problems trying to record to a compressed format.

Sounds like konfoo might be a go-to guy for this kind of project, however!

EDIT: here is the motion garage project page.

Last edited by qole; 2008-04-12 at 05:09.
 

The Following User Says Thank You to qole For This Useful Post:
Reply


 
Forum Jump


All times are GMT. The time now is 22:08.