remaining video,overrides-customizations,no-raw@video,just _random_ stuff :D - General Discussion and Assistance - CHDK Forum  

remaining video,overrides-customizations,no-raw@video,just _random_ stuff :D

  • 44 Replies
  • 28290 Views
*

Offline PhyrePhoX

  • *****
  • 2254
  • make RAW not WAR
    • PhyreWorX
Advertisements
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 :D)
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 :)
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: (freebasic) [Select]
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
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: (freebasic) [Select]
get_moviestatus a
print "Moviestatus: "a
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: (freebasic) [Select]
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

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 :)
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. :D
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 :D

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 :D regarding errors.txt)
zSHARE - 390_51_allbest_phyrephox.zip
« Last Edit: 09 / May / 2008, 01:23:27 by PhyrePhoX »

Deleted
« Last Edit: 22 / April / 2008, 16:29:34 by Barney Fife »
[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

*

Offline a710is

  • ****
  • 250
  • A710 IS
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, 04:33:17 by a710is »

*

Offline PhyrePhoX

  • *****
  • 2254
  • make RAW not WAR
    • PhyreWorX
no animals harmed during the production of this chdk. also, no shortcuts harmed as well :D
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 :D
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 :D 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 :D

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 :D


Deleted
« Last Edit: 22 / April / 2008, 16:29:58 by Barney Fife »
[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

*

Offline PhyrePhoX

  • *****
  • 2254
  • make RAW not WAR
    • PhyreWorX
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 :D

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 :D dice should be very easy to implement :D or a random lottery number generator. haha, that will be the killerfeature of chdk ;)
« Last Edit: 07 / April / 2008, 05:10:34 by PhyrePhoX »

*

Offline wontolla

  • ****
  • 413
  • S3 & G9 & A720
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. :haha

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, 12:30:02 by wontolla »

Deleted
« Last Edit: 22 / April / 2008, 16:30:22 by Barney Fife »
[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


*

Offline PhyrePhoX

  • *****
  • 2254
  • make RAW not WAR
    • PhyreWorX
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 :)


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

Deleted
« Last Edit: 22 / April / 2008, 16:30:43 by Barney Fife »
[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

 

Related Topics