How do PowerShots control photo and video resolutions? - page 2 - General Discussion and Assistance - CHDK Forum supplierdeeply

How do PowerShots control photo and video resolutions?

  • 13 Replies
  • 1624 Views
Re: How do PowerShots control photo and video resolutions?
« Reply #10 on: 23 / January / 2024, 17:41:36 »
Advertisements
Thanks for the information. I found out that
Code: [Select]
=p=require'propcase' set_prop(171,5) works properly. I also realized that Digic II cameras like my S3IS don't have a VIDEO_RESOLUTION prop-thing. My SX40HS with a DIGIC 5 does. I found a hidden underwater white balance mode on my S3IS, and I tried pushing my SX40HS beyond its limits. I discovered, that it can record 1080p at 30fps! You can actually film 1080p at 30fps instead of its default 1080p 24fps! In terms of HD slow motion, that's not going to happen any time soon. I tried 120fps and 240fps at other resolutions, an absolute mess, hahaha! Some worked, but were the same original resolution but had corrupt data at the top of the frame, and some outright crashed the camera. I did manage to find out that you can film at 320x240 in regular mode, which isn't available in the default firmware, as it is used in the 240fps slow motion mode only, so there's that.

But, as I mentioned before, the SX40HS can film 1080p 30fps!!! I might implement a little script people can load within CHDK and engage the hidden mode! Just a warning, It might overheat the camera, I don't know yet, as I've just discovered it, haha! But, I'm going to continue pushing the limits. I want to get to the very bottom of my cameras. I'm still excited about the 1080p 30fps mode. I wonder why they decided to do 24fps instead. The 720p and 480p modes do 30fps, but 1080p is 24fps. It's a bit confusing. But regardless, the camera can do 1080p 30fps. But yeah, HD slow motion isn't going to happen, unless we, meaning I, meaning probably never, hehehe, manage to completely re-write a massive portion of the SX40HS firmware, just to accommodate a larger and specific framebuffer to store all the HD frames, because what I've noticed, what I take away from what I saw when I attempted to do a larger resolution, is essentially, the camera grabs 240 frames per second of 640x480 resolution, and quickly fills up the frame buffer, until it reaches the maximum size of the buffer, and then proceeds to encode the frames into a video file. Since when I changed the resolution, the camera attempted to do 1080p frames at 240 frames per second. Because of this, it just overran the buffer completely, and wrote data into the frame and then encoded the corrupt frames into a video file, with the original low resolution. It's an absolute disaster. This would require a full firmware re-write to accommodate for HD frames. It's not worth it. Perhaps if A.I. becomes advanced enough, I'd be able to just feed the firmware in, and get a full CHDK + Firmware "Merged Frankenstein" that can move stuff around. At the moment, I'm happy that it can at least do 1080p at 30fps. But I will let everyone know if I can engage some hidden features that work, and don't crash the camera. :P

Re: How do PowerShots control photo and video resolutions?
« Reply #11 on: 23 / January / 2024, 19:32:37 »
Okay, I now know why the Canon SX40HS only films 1080p 24fps by default. The camera crashes exactly at 18 seconds of filming at 1080p in 30fps. So yeah, I will have to make my script stop the video at exactly 17 seconds to prevent the camera from crashing and the video to be preserved. It's a very janky thing. :)

*

Offline reyalp

  • ******
  • 14082
Re: How do PowerShots control photo and video resolutions?
« Reply #12 on: 23 / January / 2024, 20:39:39 »
You can actually film 1080p at 30fps instead of its default 1080p 24fps! In terms of HD slow motion, that's not going to happen any time soon.
How are you measuring the framerate? As noted in my earlier post, in at least some cases, setting the framerate prop only affects the the video metadata. If that happens, you're camera will still record 24 FPS but the file will say 30 FPS, effectively making a video that's still recorded at the 24 FPS, but plays back at 1.25x real speed.

You can determine which is happening by measuring the actual recording time (for example, by filming a stopwatch display) and comparing that with the number of frames (which you can display with ffmpeg or other video tool).

Okay, I now know why the Canon SX40HS only films 1080p 24fps by default. The camera crashes exactly at 18 seconds of filming at 1080p in 30fps. So yeah, I will have to make my script stop the video at exactly 17 seconds to prevent the camera from crashing and the video to be preserved. It's a very janky thing. :)
The romlog (https://chdk.fandom.com/wiki/Debugging#Camera_crash_logs_(romlog)) might provide hints at what triggers the crash.
Don't forget what the H stands for.

Re: How do PowerShots control photo and video resolutions?
« Reply #13 on: 24 / January / 2024, 19:18:15 »
 >:( Well damn. I recorded the video at "30" fps while filming a timer. It made 24 frames within a second, but the video is played back at 30fps. So, forget the script that I spent 5 hours yesterday working on. It's worthless. I can just re-encode a 24fps video into 30fps on a computer, than having my camera film 15 seconds of 24fps footage and re-encoding it to 30fps.
What a waste of time. The 320x240 resolution mode is also useless, because as it turns out, the camera films like a tiny top corner of the sensor only so everything I film is shifted, and film for too long, and the camera crashes. I'm afraid there's not much more I can come up with that can maybe find a hidden feature. Only the Underwater White Balance mode in my S3IS, is actually in a way useful. It doesn't crash and it actually works.

Of course, there is no propcase for Video Resolution on my S3IS, since I did check out the propset1.lua and found nothing of the sort. So I guess that is also out of the question.

At this point, the only thing I could technically do, is try fooling around and seeing if I stumble across a mode that is undocumented... Or crash my camera another five thousand times.  :lol :lol :lol

If I'll be serious the biggest most important hack in CHDK, was the RAW DNG. That is the single-most important hack. The manual aperture, shutter speed, and ISO is the second most important hack. Because with RAW you can actually bypass the internal post-processing engine entirely, getting a crystal clear sensor to file save. There is a certain script I found online that sucks in the S3IS lens, and allows for an absolutely INSANE closeup macro. It's called "telemacro", but I don't want to use it, because it jams the lens and grinds the gears, and I don't feel like breaking my camera. It's a great proof of concept, and would be a great CHDK hack, if it was safe, that is.

P.S. Now if only CHDK was available for my Canon Rebel SL3 (EOS 250D) DSLR. :P


 

Related Topics