Active Topics

 



Notices


Reply
Thread Tools
Posts: 1,378 | Thanked: 1,604 times | Joined on Jun 2010 @ Göteborg, Sweden
#11
Originally Posted by lancewex View Post
I hope this becomes a reality. I believe the N800 had a program that could motion detect and record. I currently use an old iBook with webcam for home security (motion detects--records video or jpeg--emails file to my phone). When AT&T renders my 2 N900s useless for 3G, I hope there is a program to make them useful as home monitoring devices instead.
You wish is answered....http://talk.maemo.org/showpost.php?p=802228&postcount=2
 
nicolai's Avatar
Posts: 1,637 | Thanked: 4,424 times | Joined on Apr 2009 @ Germany
#12
Quick and dirty way to use the camera api from python:

import gst
bin = gst.element_factory_make("camerabin")
bin.set_property("videoenc", gst.element_factory_make("dspmp4venc"))
bin.set_property("videomux", gst.element_factory_make("hantromp4mux"))
bin.set_property("audioenc", gst.element_factory_make("nokiaaacenc"))
bin.set_state(gst.STATE_PLAYING)
bin.set_property("filename", "test.mp4")
bin.set_property("mode",1)
#starts recording
bin.emit("user-start")

# wait some time

# stops recording
bin.emit("user-stop")
bin.set_state(gst.STATE_PAUSED)
bin.set_state(gst.STATE_NULL)
 

The Following 20 Users Say Thank You to nicolai For This Useful Post:
Posts: 1,425 | Thanked: 983 times | Joined on May 2010 @ Hong Kong
#13
Here you are:

Code:
gst-launch v4l2camsrc device=/dev/video0 ! 'video/x-raw-yuv,width=800,height=480,framerate=30/1'  ! videorate ! ffmpegcolorspace ! jpegenc ! queue ! mux. avimux name=mux  ! filesink location=output.avi
You should still need to start it and break it manually as it's just a shell command.

Slide open the camera, close the camera app, start the script, put it aside; collect it later if it's not stolen, play the output.avi with mplayer, etc.

No sound, though, as I'm still not quite familiar with N900's way of dealing with sound. Please advise if anyone knows.

May be you could try nicolai's method first.
 

The Following 8 Users Say Thank You to 9000 For This Useful Post:
Posts: 54 | Thanked: 14 times | Joined on Oct 2010
#14
Originally Posted by 9000 View Post
Here you are:

Code:
gst-launch v4l2camsrc device=/dev/video0 ! 'video/x-raw-yuv,width=800,height=480,framerate=30/1'  ! videorate ! ffmpegcolorspace ! jpegenc ! queue ! mux. avimux name=mux  ! filesink location=output.avi
You should still need to start it and break it manually as it's just a shell command.

Slide open the camera, close the camera app, start the script, put it aside; collect it later if it's not stolen, play the output.avi with mplayer, etc.

No sound, though, as I'm still not quite familiar with N900's way of dealing with sound. Please advise if anyone knows.

May be you could try nicolai's method first.
a noob qustion( i did not understand you) i put same code as you posted in xterminal and give me this
"i opened the lence cover and closed camera app and put your code in xterminal"
where is video?(i could not find it in media player) how to know that it has started captruing? where the video is stored?
Attached Images
 
 
Posts: 1,425 | Thanked: 983 times | Joined on May 2010 @ Hong Kong
#15
Originally Posted by hathoda View Post
a noob qustion( i did not understand you) i put same code as you posted in xterminal and give me this
"i opened the lence cover and closed camera app and put your code in xterminal"
where is video?(i could not find it in media player) how to know that it has started captruing? where the video is stored?
From the screenshot the location is /home/user/output.avi

You know it'd grow in size so it'd use up your /home/user very soon.

Therefore, you should have cd to /home/user/MyDocs first or enter the absolute path in the command such that the video could be stored in a relative large space.

The video is start recording once you start the command, and will stop when you break it with CTRL-C. You don't see the playback because OP asked for _stealth mode_.

If you wanna see the playback while video-taking, you could use the following:

Code:
gst-launch v4l2camsrc device=/dev/video0 ! 'video/x-raw-yuv,width=800,height=480,framerate=30/1' ! tee name=t_vid ! queue ! xvimagesink  sync=false t_vid. ! queue ! videorate ! ffmpegcolorspace ! jpegenc ! queue ! mux. avimux name=mux  ! filesink location=/home/user/MyDocs/output.avi
I use the absolute path above so that the video can be stored under MyDocs.

Again, no sound! It can be done very easily, as long as I know the sound device of N900. ^^

EDIT: missed the word 'large'

Last edited by 9000; 2011-03-22 at 16:58.
 

The Following 4 Users Say Thank You to 9000 For This Useful Post:
nicholes's Avatar
Posts: 1,103 | Thanked: 368 times | Joined on Oct 2010 @ india, indore
#16
the video is not so smooth as camera app does!
however i would like to Thanks all you guys helping me (specially 9000 and nicolai) for your hard work and give your precious time for my little problem! i am now glade tooo much to be helped by all of you genius guys(specially 9000 and nicolai)
Our N900 and this community,please keep this alive.
THANKS AGAIN!
 
Posts: 1,425 | Thanked: 983 times | Joined on May 2010 @ Hong Kong
#17
NP. The original video recorder might take advantage of the hardware acceleration somehow. I just pull this command straight from gst-launch man page so it's hardly perfect. ^^

I final figure out how to process sound with gst-launch in N900, but the quality is ever lower as it took even more processing power. Just for you and others reference only:

Code:
gst-launch v4l2camsrc device=/dev/video0 ! 'video/x-raw-yuv,width=640,height=480,framerate=30/1' ! queue ! videorate ! ffmpegcolorspace ! jpegenc ! queue ! mux. pulsesrc ! audioconvert ! audioresample ! nokiaaacenc ! queue ! mux. avimux name=mux ! filesink location=/home/user/MyDocs/output.avi
(Remember, do not stop the recording so quick, as the video streaming to file is taking tooo much time)
 

The Following User Says Thank You to 9000 For This Useful Post:
Posts: 200 | Thanked: 15 times | Joined on Dec 2009 @ Săo Paulo - Brasil
#18
Someone mentioned livefocus, I installed it, but I can't find it anywhere?
Where should it be? Widget list?How can I make it work?
 
nicholes's Avatar
Posts: 1,103 | Thanked: 368 times | Joined on Oct 2010 @ india, indore
#19
Originally Posted by rmarcus View Post
Someone mentioned livefocus, I installed it, but I can't find it anywhere?
Where should it be? Widget list?How can I make it work?
after installing live focus,open your camera cover(it will also start camera aaplication in full creen mode)now tap anywhere and you will see your status bar(where you battry status and time etc. is shown) tap there(near your battry icon) there would be a new botton(it is for live focus somthing looks like a red ball) click on it and you will see live focus optios! in the right bottom corner there are two arrow to scroll down options for live focus.in otherr words you cannot see live focus unless ur camera lence cover is open.hope this helps
 
Posts: 54 | Thanked: 14 times | Joined on Oct 2010
#20
i hv checked nicolai mothode it has sound and good quality!!thanks!
 
Reply

Tags
bluetooth-pan, gstreamer, recording, spying, video


 
Forum Jump


All times are GMT. The time now is 07:56.