![]() |
[Solved] [Maemo 5] Keeping record of last two minute Audio/video recording?
Hi,
I want to use N900 as a third empire video rec. of a cricket match. to do this somehow N900 should keep video record of last two or three minute only .rest should be delete so thus whatever happens in the match recently (just two minute before) i can see reply of it. i hope i have present what i want in good words.(actually my English is not good) video rec. SOLVED:- here is how to do this you need rootsh and leafpad installed open leafpad and paste the code Thanks to skykooler and int_ua for their hard work Code:
#!/usr/bin/env python now open your camera shutter and close camera app. go to xterminal and type sudo gainroot and go to directory where you saved record.py and type Code:
chmod 755 record.py; ./record.py |
Re: Keeping record of last two minute video recording?
That's an interesting question. As a workaround (but not solution) I can propose to record 1 minute intervals with sh script and drop all except last N of them. But, again, it's just the first thing that comes to my mind. Will look through gst sinks.
|
Re: [Maemo 5] Keeping record of last two minute video recording?
Maybe leaky queue?..
|
Re: [Maemo 5] Keeping record of last two minute video recording?
Quote:
|
Re: [Maemo 5] Keeping record of last two minute video recording?
Quote:
update.sh: Code:
#!/bin/bash Code:
#!/bin/bash Anyone want to figure out the gstreamer command? |
Re: [Maemo 5] Keeping record of last two minute video recording?
Would be a good idea for an app, could be used in cars too! keep recordings of any potential accident you may have...
|
Re: [Maemo 5] Keeping record of last two minute video recording?
The gstreamer command was somewhere on the forums. nicholes, what about pycam that I've seen in your earlier thread? Can it be limited to 1 minute? However, there was pure sh code which is much much simpler.
|
Re: [Maemo 5] Keeping record of last two minute video recording?
Quote:
can this help somehow? |
Re: [Maemo 5] Keeping record of last two minute video recording?
Quote:
Code:
chmod 755 record.py; ./record.py Code:
import gst |
Re: [Maemo 5] Keeping record of last two minute video recording?
Great start :)
Just move STATE_PLAYING into while loop and fix prints, please :) |
Re: [Maemo 5] Keeping record of last two minute video recording?
let's start garage project for this, I can't wait to post commits :)
Or some git* |
Re: [Maemo 5] Keeping record of last two minute video recording?
But 3 seconds are lost on each video.
|
Re: [Maemo 5] Keeping record of last two minute video recording?
Maybe let's talk on #maemo@freenode?
|
Re: [Maemo 5] Keeping record of last two minute video recording?
Quote:
|
Re: [Maemo 5] Keeping record of last two minute video recording?
Quote:
python (after pressing enter) should i paste your code (whole code) at once or i should paste this only..... Code:
import gst Code:
Code:
chmod 755 record.py; ./record.py |
Re: [Maemo 5] Keeping record of last two minute video recording?
Quote:
Code:
chmod 755 record.py; ./record.py |
Re: [Maemo 5] Keeping record of last two minute video recording?
2 Attachment(s)
Quote:
than i try to run it but first permission denied and import not found so i sudo gainroot and than run it but still import not found there are screen shot for you thanks in advance! |
Re: [Maemo 5] Keeping record of last two minute video recording?
Oops, add
Code:
#!/usr/bin/env python |
Re: [Maemo 5] Keeping record of last two minute video recording?
Quote:
Thanks to all of you guys and devlopers. speacial Thanks to skykooler and int_ua |
Re: [Solved] [Maemo 5] Keeping record of last two minute video recording?
I just finished first attempt to get gst-launch working and queue works as expected with this code:
Code:
gst-launch v4l2src device=/dev/video0 ! queue leaky=upstream min-threshold-time=10000000000 ! autovideosink Now it would be great to try to use queue sink in the above python code instead of moving files :) That's all for today, I hope we will finish it tomorrow :) |
Re: [Solved] [Maemo 5] Keeping record of last two minute video recording?
I wouldn't say that it's solved because there is no adequate mechanism to save current state in separate files and to stop recording. And I didn't find an easy way to do this yet.
|
Re: [Solved] [Maemo 5] Keeping record of last two minute video recording?
a few question
1. how do i save videos in MyDocs/.videos folder? 2.if i want to extend the time of current.mp4 should i edit the line ... time.sleep(60) and change it to> time.sleep(120) for two minute....? 3. is there any way we can make a shortcut for this? 4.(if no shortcut) can we somehow get rid of sudo gainroot (it is frustrating) every time? |
Re: [Solved] [Maemo 5] Keeping record of last two minute video recording?
1. Just run the script in needed folder :)
2. Yes. 3. Since it doesn't have any adequate controls yet I wouldn't recommend using it without terminal. 4. Why do you use root? It's not required. Did you try to use it? It's not ready for general usage, isn't it? |
Re: [Solved] [Maemo 5] Keeping record of last two minute video recording?
3 Attachment(s)
Hi,
as you said "4. Why do you use root? It's not required." in my case i have to use sudo gainroot. And another thing, if record.py in MyDocs, even after sudo gainroot,it does not start camera and shows "permission denied" thus i cannot save my videos in Mydocs folder to use record.py in my phone. Record.py should be in root folder(home/user) |
Re: [Solved] [Maemo 5] Keeping record of last two minute video recording?
Quote:
|
Re: [Solved] [Maemo 5] Keeping record of last two minute video recording?
Quote:
Code:
$ python record.py Code:
$ cd MyDocs/.videos/or/whatever/wherever And /home/user is not root folder, it's users' $HOME directory. $HOME for user root is typically /root and the root directory is / |
Re: [Solved] [Maemo 5] Keeping record of last two minute video recording?
Quote:
|
Re: [Solved] [Maemo 5] Keeping record of last two minute video recording?
can you do the same for voice recording ??
Keeping record of last two minute voice recording! i started a thread regarding this in past but i didn't get it. can you help? |
Re: [Solved] [Maemo 5] Keeping record of last two minute video recording?
Quote:
|
Re: [Solved] [Maemo 5] Keeping record of last two minute video recording?
Quote:
|
Re: [Solved] [Maemo 5] Keeping record of last two minute video recording?
Code:
import gst |
Re: [Solved] [Maemo 5] Keeping record of last two minute video recording?
1 Attachment(s)
It does not work for me.
|
Re: [Solved] [Maemo 5] Keeping record of last two minute video recording?
Quote:
|
Re: [Solved] [Maemo 5] Keeping record of last two minute video recording?
Quote:
nothing worked. the error is same as above, and the error comes exactly after 60 seconds. |
Re: [Solved] [Maemo 5] Keeping record of last two minute Audio/video recording?
Just noticed the Camdrive application for Harmattan:
http://talk.maemo.org/showthread.php?t=84606 Looks very nice. Maybe it'll work with MeeCoLay on N900: http://talk.maemo.org/showthread.php?t=84482 |
Re: [Solved] [Maemo 5] Keeping record of last two minute Audio/video recording?
Quote:
will it running via MeeCoLay on n900 or you are going to prot it to maemo? BTW the GUI look cool! |
All times are GMT. The time now is 07:14. |
vBulletin® Version 3.8.8