![]() |
(Live Focus) N900 Video focus and led light, python script
Hello there,
I've put together a python script using v4l2-ctl that will enable you to change focus and turn on/off the led while filming a video. the script works while filming video! this is a video I took while demonstrating the script. http://www.youtube.com/watch?v=hcSlw0xRfoI Now with a menu widget! now you can control the focus and LEDs from the touchscreen , or use the keyboard toggle button. heres how you use the widget: open the camera cover Now you can access the lfocus dialog by using the proximity sensor! or tap the screen once tap on the indicator bar tap the lfocus logo you can either scroll left and right to set focus or just press on the right side or the left side to get a smoother focus effect. you can also adjust the leds by tapping the go down button next to the focus bar. you can add a timer to take photos/videos by clicking the clock icon. by tapping the go down button one more time you will access the new toggle buttons which will have the following functions: [Rem.LED] (remember led state when capturing) [Stop RLED] (auto turn off red led when capturing) [Timer.RLED] (timer red led blinking) for the keyboard toggle button: a green indicator means the keyboard control is off a red indicator means the keyboard control is on and you should turn it off once you're done. turning on the keyboard enables focus via zoom buttons automatically and turns off the autofocus ability! turning on the keyboard now also turns off the red LED when you start recording video. now you can start a timer to take photos/videos using the disabled autofocus button to enable the timer gently double click the hardware camera button and choose the period for the timer. as for the keyboard shortcuts: q-w led on/off e-r recording red light on/off a-s change focus d fixes the sudden focus that happens sometimes after pressing the camera button,so press d first then adjust the focus with a and s so you don't get a different focus than the one you got with the camera button. installation and starting: now you just need to install the latest package and you're ready to go. Source can be found here [Announcement] lfocus is now up in Extras also this will be my todo list for the upcoming versions:
[Edit] lfocus_0.305-1 I've applied a fix that should make the application work successfully from the shortcut without any password problem download the latest file and please test it and keep me informed [Edit] lfocus_0.305-2 we're now able to toggle the red recording light [Edit] lfocus_0.305-3 I've applied another fix for the sudden focus that happens after pressing the camera button, read the instructions at the top of the post for more info. [Edit] lfocus_0.305-4 I've added the ability to focus with the zoom buttons, read the instructions at the top of the post for more info [Edit] lfocus_0.307-1 I've added a widget that will make you control the led and the focus from the touchscreen [Edit] lfocus_0.308-1 I've merged the keyboard script and got rid of the application menu shortcut. read the information at the beginning of the post for more information. [Edit] lfocus_0.309-1 The widget now only shows up when you open the camera cover! the keyboard toggle now disables autofocus. [Edit] lfocus_0.509-1 Added dependencies to the deb package to install required packages (python-hildondesktop hildon-desktop-python-loader python-gtk2 python-dbus) Toggling the keyboard control now automatically switches off the red LED once you start recording [Edit] lfocus_0.514-1 Added a timer to take photos/videos using the disabled autofocus button read the information at the beginning of the post for more information. [Edit] lfocus_0.514-2 Added the timer to the widget to make it easy to take pictures/videos without using hardware buttons. [Edit] lfocus_0.519-1 added python-hildon to the dependencies. [Edit] lfocus_0.520-1 changed the widget LEDs to toggle buttons and did a small modification with the menu for future realeases. [Edit] lfocus_0.527-1 fixed the problem with keyboard led shortcuts not syncing with the buttons the lfocus dialog can now be turned on by using the proximity sensor instead of tapping the screen and clicking on the logo added a new row of toggle buttons for (remember led state when capturing)(auto turn off red led when capturing)(timer red led blinking) please read the instructions at the top of the post for more info. [Edit] lfocus_0.528-1 lfocus is now optified. [Edit] lfocus_0.528-3 fixed led remember state button and made it always off, so it needs to be turned on by the user only when taking a video [Edit] lfocus_0.528-4 fixed stop RLED toggle button and made it always off, so it needs to be turned on by the user only when taking a video [Edit] lfocus_0.912-1 fixed typo in description added a help button to display help for lfocus moved the keyboard toggle button to the lfocus dialog proximity now requires holding on for two seconds to activate the lfocus dialog [Edit] lfocus_0.913-1 fixed an issue with proximity [Edit] lfocus_0.914-1 proximity will only work if the camera is running (not on standby) Now available in Extras-testing |
Re: N900 Video focus and led light, python script
Looks great!! Can this script be turned into an installable .deb file?
|
Re: N900 Video focus and led light, python script
Quote:
|
Re: N900 Video focus and led light, python script
Hi and thanks for the great idea and implementation.
I tried to used the script by installing the deb file, but when I open the application from shortcut, it pops up a xterm window requesting password. Must have something to do with root rights. Am I doing something wrong? |
Re: N900 Video focus and led light, python script
Quote:
rootsh can be found here: http://maemo.org/downloads/product/Maemo5/rootsh/ I'll be waiting for your reply thanks |
Re: N900 Video focus and led light, python script
I've already installed rootsh, actually it was the first thing I did when I got the phone :-)
It seems that by using the application shortcut, the script is not executed as root. Maybe you should add a sudo gainroot command in the execution line? Thanks! |
Re: N900 Video focus and led light, python script
Quote:
python /usr/share/lfocus/lfocus.py tell me if it works or not, thanks |
Re: N900 Video focus and led light, python script
Quote:
But yeah, being root runs perfectly. Via the shortcut asks for a password. |
Re: N900 Video focus and led light, python script
Wow I am so excited, thats awesome, gonna try it right now.
EDIT: Wow it works just great! Thats what I always wanted! I can even change the focusing speed, thanks for providing the python script, it looks very simple! EDIT 2: If we are at it, its probably just as simple to enable calls via the FM transmitter, will think what can be done... |
Re: N900 Video focus and led light, python script
Quote:
|
| All times are GMT. The time now is 04:44. |
vBulletin® Version 3.8.8