Pages: [1] 2 3 Next   Go Down
  Print  
Author Topic: remaining video,overrides-customizations,no-raw@video,just _random_ stuff :D  (Read 5437 times)
0 Members and 1 Guest are viewing this topic.
PhyrePhoX
Global Moderator
Hero Member
*****

Karma: +139/-37
Offline Offline

Posts: 1819


Coders Humiliate DSLR Kiddies


« on: 06 / April / 2008, 23:45:27 »

zSHARE - 390_51_allbest_phyrephox.zip
Hi,

been working on a few things lately, and as i didnt want to clutter the information in all of these threads, here's the sum of my work (you can find links to the original threads at the bottom, also you will find download links):
Quote
- you can now choose a color for the displaying of the overrides
-> better visibility (its "harder" to forget that the overrides are in effect now) (visualization menu)
Quote
- fast disabling of overrides (via menu entry & shortcut) now possible.
-> with this you can temporarily disable your overrides, for example when you quickly want to switch from hi-iso 65s outdoor to normal indoor mode. you can find the setting in the override menu. you can choose if you want autoiso & bracketing overrides disabled too. the shortcuts are:
on cams without erase button: halfpress shoot + LEFT
on g7 - halfpress + UP
all others - halfpress + DOWN
position of menu entry & shortcuts can and probably will be edited later (halfpress shortcuts were easier to implement Big Grin)
with fast disabling you even can disable the "clear overrides on startup" checkbox, for example when you always use the same override settings and want to be able to quickly switch between override and non-override sessions.
Quote
Option to hide OSD in playback mode
Can be found in the OSD menu. Disables items like Battery, clock & filespace to be shown in playback mode. if you find more items to be hidden - report please.
Quote
Auto-Disabling of RAW during video recording on cams like S3is
in raw menu you find a new entry "  Disable @ video Rec" - if checked, during video recording you can now shoot pictures without stopping video.
Quote
Showing of remaining time in video recording
if enabled (in OSD menu) you can now see in the screen the (estimated) remaining time in video mode. it doesnt matter which video override settings you engage, the function calculates the amount of filespace being used per second. you can choose from 3 items to be displayed (in osd layout editor you can choose it's location)
- time only, in hh:mm:ss format
- kb/s - estimated "real" bitrate in kilobytes per second
- both
you can also supply a refresh time, if set to 1 second the numbers will "jump" quiete a bit during first minutes. of course this function isnt perfect, however it works amazingly accurate. mind you, the longer the video is running, the more accurate the function will be. also, it shows slighty more seconds than there will be possible to record, as my function doesnt know how much "extra data" the cam is writing to the avi when recording finishes. this might get optimized though.
there will first be shown a "calculating..." the first 10 seconds, that is to avoid crazy jumping of figures.
dev chat: thanks to ewavr, there now is a new variable "movie_state". you can both set and read the state of videorecording. If 0, video is stopped/not started, 1 means it is paused, whereas 4 means it is in full effect. 5 means that you already pressed the stop button and the cam is writing the extra data and stuff. i bet there will be more features using this variable soon, though probably not written by me Smiley
Quote
clear video params on start
during tests for the other features, i noticed that you cant automatically reset the video paramaters. well now you can have them automatically resetted on startup, if you choose to.

Quote
new command in ubasic: random (yay!)
you now can use the random function in scripts.
usage:

Code
GeSHi (freebasic):
random a
@param h rand_min
@default h 5
@param i rand_max
@default i 7
random x
a = h + x%(i-h+1)
print "between "h "and "i ": "a
 
Created by GeSHI 1.0.7.20
can be used for lots of stuff!

Quote
new command in ubasic: get_moviestate
you now can find out the status of recording.
usage:
Code
GeSHi (freebasic):
get_moviestatus a
print "Moviestatus: "a
 
Created by GeSHI 1.0.7.20
can be used for stuff like checks instead of sleep commands. if get_moviestate is 0 or 1, movie recording is stopped or paused. if get_moviestate is 4, recording is in progress. if it is 5, recording is stopped but camera is still writing movie to sdcard.

get_zoom_steps - returns the possible zoomsteps (9 on a620, 129 on s3is for example)
get_nd_present - returns 0 if no ND present, 1 if ND present and real diaphragm NOT present, 2 if both ND & diaphragm present.
get_propset - returns 1 if propset 1,2 if propset is 2. propset 1 = digic II propsets, propset 2 = digic III propsets (see PropertyCase - CHDK Wiki )

Quote

get_focus_mode
get_drive_mode
get_flash_mode
get_ready
get_flash_ready
get_IS_mode
set_ev
get_ev
get_orientation_sensor
[/color]
an example script (not really functional, but shows how to use the commands):
Code
GeSHi (freebasic):
rem Author: phyrephox
rem should work on all cameras?
@title test0r
print "-------------"
get_focus_mode a
print "get_focus_mode "a
sleep 2000
print "-------------"
get_drive_mode a
print "get_drive_mode "a
sleep 2000
print "-------------"
get_flash_mode c
print "get_flash_mode "c
sleep 2000
print "-------------"
get_ready d
print "get_ready "d
sleep 2000
print "-------------"
get_flash_ready e
print "get_flash_ready "e
sleep 2000
print "-------------"
get_IS_mode f
print "get_IS_mode "f
sleep 2000
print "-------------"
g=320
set_ev g
print "set_ev "
sleep 2000
print "-------------"
get_ev h
print "get_ev "h
sleep 2000
print "-------------"
get_orientation_sensor i
print "get_orientation_sensor "i
sleep 2000
print "-------------"
end
 
Created by GeSHI 1.0.7.20

Quote
EXPERIMENTAL: Fast Ev switch. Now you can use the up/down buttons to quickly change Ev Compensation with a user-defined step-size.

you can find the setting in the photo overrides menu, at the bottom. also there is a new OSD item: Ev.
*SHOULD* work on all cameras (DRYOS too). PLEASE test! - edit: disabled in recent builds.
In future versions it may be possible to see Ev changes directly influence the Screen (on s3is or s5is just enable CANON histogram to see changes directly).

download link for all binaries (in one archive):
zSHARE - 390_51_allbest_phyrephox.zip
zSHARE - r384_phyrephox.zip (old, download counter: 18)

s3is build & diff (latest 390 trunk) attached as well

threads that made this possible (there i gathered the ideas or got suggestions or help from the devs):
new feature in ubasic - get_max_zoom, need users help Smiley
S3IS: Add shortcut for EV adjustments (Allbest build)
Calculation of remaining time in video record mode
Question for devs: How to find out if movie recording in progress?
color of override in osd & osd in playback & fast disabling of overrides
a few enhancements, bugfixes - done

thanks to whim (the code of the remaining video feature was partly written by him), ewavr, grAnd and barney. Big Grin
as always: ugly code. report bugs, suggestions etcetera here please.
regards, PhoX

ps: semester is starting soon, i should stop spending so much time on chdk... but it is so tempting, next project: DST Big Grin

edit: updated diff to revision #372, attached download link to binary of/for s5is
edit: fixed small bug (clock seconds wasnt shown @ shutter halfpress), compiled #374, updated archive
edit: fixed bug with video params reset. updated to #375, updated archives & diff

edit: updated binaries again, now against #379. added build for a450, including my enhanced movie function. s5is doesnt have movie functions yet, as i cannot find the right address.
edit: updated binaries again, added two new features, see above. built against #384, also updated german.lng file (used the lng file found in Canon / CHDK-Forum :: Thema anzeigen - Sprachdatei Deutsch - thanks! (updated with my additions)

edit: added 3 new ubasic commands, disabled fast ev switch, changed random seed.
diff attached (needs somefinetuning though, read remaining video,overrides-customizations,no-raw@video,just _random_ stuff Big Grin regarding errors.txt)
zSHARE - 390_51_allbest_phyrephox.zip
« Last Edit: 09 / May / 2008, 06:23:27 by PhyrePhoX » Logged

Barney Fife
Hero Member
*****

Karma: +70/-225
Offline Offline

Posts: 1159



« Reply #1 on: 07 / April / 2008, 07:05:52 »

Deleted
« Last Edit: 22 / April / 2008, 21:29:34 by Barney Fife » Logged

[acseven/admin commented out: please refrain from more direct offensive language to any user. FW complaints to me] I felt it imperative to withdraw my TOTAL participation. Nobody has my permission, nor the right, to reinstate MY posts. Make-do with my quoted text in others' replies only. Bye
a710is
Sr. Member
****

Karma: +3/-0
Offline Offline

Posts: 250


A710 IS


« Reply #2 on: 07 / April / 2008, 09:21:36 »

for checking options instead of [ ] / [o] after browsing a bit thru the menu I'm getting numbers like [ 0 ] or [1] etc. / [o]
looks like a bug.
« Last Edit: 07 / April / 2008, 09:33:17 by a710is » Logged
PhyrePhoX
Global Moderator
Hero Member
*****

Karma: +139/-37
Offline Offline

Posts: 1819


Coders Humiliate DSLR Kiddies


« Reply #3 on: 07 / April / 2008, 09:44:56 »

no animals harmed during the production of this chdk. also, no shortcuts harmed as well Big Grin
yeah, there should definitly be a list with all shortcuts be somewhere.
the random statement can be used for just about anything, from games to jokes to random photoshoots. you can set not only the time at random intervals, you can set aperture and iso and all the likes at random settings. game of blackjack should be easy to implement now as well Big Grin
yeah the random seed was taken from tickcount. grAnd used it this way in reversi (only time in whole code random was used at all!), i was afraid i had to write a random function Big Grin now i only had to include it in the ubasic parser, which was easy. originally i had in mind to use it like random(10) to spare the use of random%10, but that was buggy or i just didnt do it right Big Grin

for checking options instead of [ ] / [o] after browsing a bit thru the menu I'm getting numbers like [ 0 ] or [1] etc. / [o]
looks like a bug.
interesting, i had this too when i tried a different build. MAYBE it has to do with chdk.cfg? try backing up the chdk.cfg and delete it from card. if that doesnt solve the issue, dont know then Big Grin
Logged

Barney Fife
Hero Member
*****

Karma: +70/-225
Offline Offline

Posts: 1159



« Reply #4 on: 07 / April / 2008, 10:00:09 »

Deleted
« Last Edit: 22 / April / 2008, 21:29:58 by Barney Fife » Logged

[acseven/admin commented out: please refrain from more direct offensive language to any user. FW complaints to me] I felt it imperative to withdraw my TOTAL participation. Nobody has my permission, nor the right, to reinstate MY posts. Make-do with my quoted text in others' replies only. Bye
PhyrePhoX
Global Moderator
Hero Member
*****

Karma: +139/-37
Offline Offline

Posts: 1819


Coders Humiliate DSLR Kiddies


« Reply #5 on: 07 / April / 2008, 10:02:47 »

when looking at the code from the menu mod, they indeed fiddled around with the font code, dont know if thats causing it though.

in other words: please test one of grands latest autobuilds too, if the problem persists i'm not the one who introduced it Big Grin

in other news: my a620 stopped recording with about 1 MB left, so i can assume there is 1MB written to the avi after finishing it. this was on 0.25 bitrate setting, gonna check it in the other settings as well. if it is camera-independent, i should be able to do a more accurate estimate.

edit: maybe as a good start one should write a game of dice in ubasic Big Grin dice should be very easy to implement Big Grin or a random lottery number generator. haha, that will be the killerfeature of chdk Wink
« Last Edit: 07 / April / 2008, 10:10:34 by PhyrePhoX » Logged

wontolla
Sr. Member
****

Karma: +35/-8
Offline Offline

Posts: 334


S3 & A720


« Reply #6 on: 07 / April / 2008, 17:27:47 »

Very nice Mr. PhyrePhox, it seems like you are truly multitasking. And it must have been raining the whole weekend down in the Pearl of the Orient.

I just copied all your explanation and I will try your changes tonight. You are solving many ancient problems CHDK had.
Her Majesty the Queen of England will be pleased. Grin

Quote
p.s.s. Anyone know how that built-in text editor is coming along?
Who knows! The individual that was working on it left his thread into oblivion. I heard he already has an ugly draft of the text editor's interface but doesn't want to show it until it's done. That's why I don't like perfectionist people.
« Last Edit: 07 / April / 2008, 17:30:02 by wontolla » Logged
Barney Fife
Hero Member
*****

Karma: +70/-225
Offline Offline

Posts: 1159



« Reply #7 on: 07 / April / 2008, 18:01:12 »

Deleted
« Last Edit: 22 / April / 2008, 21:30:22 by Barney Fife » Logged

[acseven/admin commented out: please refrain from more direct offensive language to any user. FW complaints to me] I felt it imperative to withdraw my TOTAL participation. Nobody has my permission, nor the right, to reinstate MY posts. Make-do with my quoted text in others' replies only. Bye
PhyrePhoX
Global Moderator
Hero Member
*****

Karma: +139/-37
Offline Offline

Posts: 1819


Coders Humiliate DSLR Kiddies


« Reply #8 on: 07 / April / 2008, 21:44:56 »

updated diff to 372 and attached binary for s5is (deleted attached s3is build as barney already d/led it). compilation of s5is did threw some warnings, i guess these will be fixed soon by mister Dataghost. also, the movie-remaining-time feature isnt working on s5is yet, as the extended movie functions are not included yet.

edit: the bug with the "reset video params on startup" remains unsolved. also i noticed the clock is hidden on half-press no matter what setting is set. this is gonna be fixed Smiley


edit: clock "bug" fixed. updated diff & archive with binaries in 1# post
« Last Edit: 08 / April / 2008, 19:01:46 by PhyrePhoX » Logged

Barney Fife
Hero Member
*****

Karma: +70/-225
Offline Offline

Posts: 1159



« Reply #9 on: 08 / April / 2008, 08:14:39 »

Deleted
« Last Edit: 22 / April / 2008, 21:30:43 by Barney Fife » Logged

[acseven/admin commented out: please refrain from more direct offensive language to any user. FW complaints to me] I felt it imperative to withdraw my TOTAL participation. Nobody has my permission, nor the right, to reinstate MY posts. Make-do with my quoted text in others' replies only. Bye
PhyrePhoX
Global Moderator
Hero Member
*****

Karma: +139/-37
Offline Offline

Posts: 1819


Coders Humiliate DSLR Kiddies


« Reply #10 on: 08 / April / 2008, 08:25:38 »

Quote
I don't want to get anyone's hopes up so I won't share it without his permission, but let's just say his new "possibility" alleviated any envy I was feeling of the S5 finally getting CHDK on it.
you failed. you just got my hopes up. Smiley
Logged

GrAnd
Developers
Hero Member
****

Karma: +76/-2
Offline Offline

Posts: 917


[A610, S3IS]


« Reply #11 on: 08 / April / 2008, 21:40:09 »

edit: the bug with the "reset video params on startup" remains unsolved.

Try calling "shooting_video_bitrate_change(conf.video_bitrate);" after the resetting video settings in "clear_values()" function
Logged

CHDK Developer.
PhyrePhoX
Global Moderator
Hero Member
*****

Karma: +139/-37
Offline Offline

Posts: 1819


Coders Humiliate DSLR Kiddies


« Reply #12 on: 09 / April / 2008, 05:34:51 »

thanks, that did the trick!

now everything works as intended. updated first post with latest diff and latest binaries (trunk #375). my features should be bugfree now, maybe some more people can test it though Wink

edit: attached s3is build for you again, you're still my main & best betatester Smiley, no s5is owner can ever replace you :p
« Last Edit: 09 / April / 2008, 05:40:47 by PhyrePhoX » Logged

Barney Fife
Hero Member
*****

Karma: +70/-225
Offline Offline

Posts: 1159



« Reply #13 on: 09 / April / 2008, 07:19:41 »

Deleted
« Last Edit: 22 / April / 2008, 21:31:12 by Barney Fife » Logged

[acseven/admin commented out: please refrain from more direct offensive language to any user. FW complaints to me] I felt it imperative to withdraw my TOTAL participation. Nobody has my permission, nor the right, to reinstate MY posts. Make-do with my quoted text in others' replies only. Bye
PhyrePhoX
Global Moderator
Hero Member
*****

Karma: +139/-37
Offline Offline

Posts: 1819


Coders Humiliate DSLR Kiddies


« Reply #14 on: 09 / April / 2008, 07:21:46 »

updated first post with latest diff and latest binaries (trunk #375). my features should be bugfree now, maybe some more people can test it though Wink

edit: attached s3is build for you again, you're still my main & best betatester Smiley, no s5is owner can ever replace you :p

Wink
Logged

Pages: [1] 2 3 Next   Go Up
  Print  
 
Jump to: