Movie time limit investigation - page 2 - General Discussion and Assistance - CHDK Forum supplierdeeply

Movie time limit investigation

  • 22 Replies
  • 8708 Views
*

Offline philmoz

  • *****
  • 3445
    • Photos
Re: Movie time limit investigation
« Reply #10 on: 31 / July / 2011, 18:21:38 »
Advertisements
Found some suspicious things in the IXUS310 1.00a firmware.
(All I do is trying to look for values, that could have special meanings)
The function below is referenced only once (as in case of the other ones I posted here).
My remarks are after @ signs.

Code: [Select]
ff303920:   e92d5fff    push    {r0, r1, r2, r3, r4, r5, r6, r7, r8, r9, r10, r11, r12, lr}
ff303924:   e1a09000    mov r9, r0
ff303928:   e5920010    ldr r0, [r2, #16]
ff30392c:   e59d8038    ldr r8, [sp, #56]   ; 0x38
ff303930:   e3500000    cmp r0, #0
ff303934:   059f1318    ldreq   r1, [pc, #792]  ; ff303c54: (0000032a)
ff303938:   059f02f4    ldreq   r0, [pc, #756]  ; ff303c34: (ff3028f4)  **"MovWriter.c"
ff30393c:   e3a05000    mov r5, #0
ff303940:   e1a04002    mov r4, r2
ff303944:   e1a0a003    mov r10, r3
ff303948:   e1a07005    mov r7, r5
ff30394c:   0bf42ccd    bleq    ff00ec88 <_start+0xec88>
ff303950:   e59f62e8    ldr r6, [pc, #744]  ; ff303c40: (0000cf78)
ff303954:   e5940000    ldr r0, [r4]
ff303958:   e3a0b01e    mov r11, #30                              @ 30fps as default?
ff30395c:   e58600d0    str r0, [r6, #208]  ; 0xd0
ff303960:   e5940004    ldr r0, [r4, #4]
ff303964:   e58600d4    str r0, [r6, #212]  ; 0xd4
ff303968:   e5940010    ldr r0, [r4, #16]
ff30396c:   e58600e0    str r0, [r6, #224]  ; 0xe0
ff303970:   e5941008    ldr r1, [r4, #8]
ff303974:   e59f02dc    ldr r0, [pc, #732]  ; ff303c58: (00007530)
ff303978:   e351000b    cmp r1, #11
ff30397c:   308ff101    addcc   pc, pc, r1, lsl #2
ff303980:   ea000021    b   ff303a0c <_start+0x303a0c>
ff303984:   ea00000d    b   ff3039c0 <_start+0x3039c0>
ff303988:   ea000008    b   ff3039b0 <_start+0x3039b0>
ff30398c:   ea000015    b   ff3039e8 <_start+0x3039e8>
ff303990:   ea000019    b   ff3039fc <_start+0x3039fc>
ff303994:   ea00001c    b   ff303a0c <_start+0x303a0c>
ff303998:   ea00001b    b   ff303a0c <_start+0x303a0c>
ff30399c:   ea00001a    b   ff303a0c <_start+0x303a0c>
ff3039a0:   ea000019    b   ff303a0c <_start+0x303a0c>
ff3039a4:   ea00000d    b   ff3039e0 <_start+0x3039e0>
ff3039a8:   ea00000a    b   ff3039d8 <_start+0x3039d8>
ff3039ac:   ea000005    b   ff3039c8 <_start+0x3039c8>
ff3039b0:   e59f72a4    ldr r7, [pc, #676]  ; ff303c5c: (00005dc0)
ff3039b4:   e3a00018    mov r0, #24                                @ 24fps?
ff3039b8:   e586712c    str r7, [r6, #300]  ; 0x12c
ff3039bc:   ea00000c    b   ff3039f4 <_start+0x3039f4>
ff3039c0:   e1a07000    mov r7, r0
ff3039c4:   ea000000    b   ff3039cc <_start+0x3039cc>
ff3039c8:   e59f7290    ldr r7, [pc, #656]  ; ff303c60: (000005dc)
ff3039cc:   e586012c    str r0, [r6, #300]  ; 0x12c
ff3039d0:   e586b0d8    str r11, [r6, #216] ; 0xd8
ff3039d4:   ea00000f    b   ff303a18 <_start+0x303a18>
ff3039d8:   e59f7284    ldr r7, [pc, #644]  ; ff303c64: (00000bb8)
ff3039dc:   eafffffa    b   ff3039cc <_start+0x3039cc>
ff3039e0:   e59f7280    ldr r7, [pc, #640]  ; ff303c68: (00001770)
ff3039e4:   eafffff8    b   ff3039cc <_start+0x3039cc>
ff3039e8:   e59f727c    ldr r7, [pc, #636]  ; ff303c6c: (0003a980)
ff3039ec:   e586012c    str r0, [r6, #300]  ; 0x12c
ff3039f0:   e3a000f0    mov r0, #240    ; 0xf0                     @ 240fps?
ff3039f4:   e58600d8    str r0, [r6, #216]  ; 0xd8
ff3039f8:   ea000006    b   ff303a18 <_start+0x303a18>
ff3039fc:   e586012c    str r0, [r6, #300]  ; 0x12c
ff303a00:   e59f7268    ldr r7, [pc, #616]  ; ff303c70: (0001d4c0)
ff303a04:   e3a00078    mov r0, #120    ; 0x78                     @ 120fps?
ff303a08:   eafffff9    b   ff3039f4 <_start+0x3039f4>
ff303a0c:   e59f1260    ldr r1, [pc, #608]  ; ff303c74: (0000035b)
ff303a10:   e59f021c    ldr r0, [pc, #540]  ; ff303c34: (ff3028f4)  **"MovWriter.c"
ff303a14:   ebf42c9b    bl  ff00ec88 <_start+0xec88>
ff303a18:   e59600d8    ldr r0, [r6, #216]  ; 0xd8
ff303a1c:   e59f1254    ldr r1, [pc, #596]  ; ff303c78: (00000e0f) @ 3600-1, 1 hour limit? -> R1 register
ff303a20:   e1a000a0    lsr r0, r0, #1
ff303a24:   e58600dc    str r0, [r6, #220]  ; 0xdc
ff303a28:   e59a0000    ldr r0, [r10]
ff303a2c:   e58600e4    str r0, [r6, #228]  ; 0xe4
ff303a30:   e1da01b0    ldrh    r0, [r10, #16]
ff303a34:   e58600e8    str r0, [r6, #232]  ; 0xe8
ff303a38:   e59a0004    ldr r0, [r10, #4]
ff303a3c:   e1c600b2    strh    r0, [r6, #2]
ff303a40:   e59a0008    ldr r0, [r10, #8]
ff303a44:   e1c600b4    strh    r0, [r6, #4]
ff303a48:   e59a0014    ldr r0, [r10, #20]
ff303a4c:   e58600ec    str r0, [r6, #236]  ; 0xec
ff303a50:   e5868128    str r8, [r6, #296]  ; 0x128
ff303a54:   e59600d0    ldr r0, [r6, #208]  ; 0xd0
ff303a58:   e3500d05    cmp r0, #320    ; 0x140                    @ 320x240
ff303a5c:   03a00802    moveq   r0, #131072 ; 0x20000              @ buffer size?
ff303a60:   03a05001    moveq   r5, #1
ff303a64:   058600ac    streq   r0, [r6, #172]  ; 0xac
ff303a68:   0a00000f    beq ff303aac <_start+0x303aac>
ff303a6c:   e3500d0a    cmp r0, #640    ; 0x280                    @ 640x480
ff303a70:   059f0204    ldreq   r0, [pc, #516]  ; ff303c7c: (0007a760) @ buffer size?
ff303a74:   03a05002    moveq   r5, #2
ff303a78:   058600ac    streq   r0, [r6, #172]  ; 0xac
ff303a7c:   0a00000a    beq ff303aac <_start+0x303aac>
ff303a80:   e3500c05    cmp r0, #1280   ; 0x500                    @ 1280x720, first HD resolution
ff303a84:   059f01f8    ldreq   r0, [pc, #504]  ; ff303c84: (0011da50) @ buffer size?
ff303a88:   e59f11f0    ldr r1, [pc, #496]  ; ff303c80: (00000257) @ 600-1, 10 minutes limit? -> R1 register
ff303a8c:   03a05004    moveq   r5, #4
ff303a90:   058600ac    streq   r0, [r6, #172]  ; 0xac
ff303a94:   0a000004    beq ff303aac <_start+0x303aac>
ff303a98:   e3500d1e    cmp r0, #1920   ; 0x780                    @ 1920x1080, R1 already set to 10 minutes limit
ff303a9c:   1a000004    bne ff303ab4 <_start+0x303ab4>
ff303aa0:   e3a00602    mov r0, #2097152    ; 0x200000             @ buffer size?
ff303aa4:   e3a05005    mov r5, #5
ff303aa8:   e58600ac    str r0, [r6, #172]  ; 0xac
ff303aac:   e586104c    str r1, [r6, #76]   ; 0x4c                 @ time limit (R1) stored here
ff303ab0:   ea000002    b   ff303ac0 <_start+0x303ac0>
ff303ab4:   e59f11cc    ldr r1, [pc, #460]  ; ff303c88: (00000383)
ff303ab8:   e59f0174    ldr r0, [pc, #372]  ; ff303c34: (ff3028f4)  **"MovWriter.c"
ff303abc:   ebf42c71    bl  ff00ec88 <_start+0xec88>
ff303ac0:   e596004c    ldr r0, [r6, #76]   ; 0x4c
ff303ac4:   e59f11c0    ldr r1, [pc, #448]  ; ff303c8c: (0000138d)
...
...
ff303c24:   e8bd9fff    pop {r0, r1, r2, r3, r4, r5, r6, r7, r8, r9, r10, r11, r12, pc}


Interesting - I already have AE lock and exposure adjustment working, increasing the time limit would be nice.

Will play around with this and let you know.

Phil.
CHDK ports:
  sx30is (1.00c, 1.00h, 1.00l, 1.00n & 1.00p)
  g12 (1.00c, 1.00e, 1.00f & 1.00g)
  sx130is (1.01d & 1.01f)
  ixus310hs (1.00a & 1.01a)
  sx40hs (1.00d, 1.00g & 1.00i)
  g1x (1.00e, 1.00f & 1.00g)
  g5x (1.00c, 1.01a, 1.01b)
  g7x2 (1.01a, 1.01b, 1.10b)

*

Offline philmoz

  • *****
  • 3445
    • Photos
Re: Movie time limit investigation
« Reply #11 on: 31 / July / 2011, 18:24:15 »
So, 320x240 at 240 fps ?

Camera supports this and also 640x480 @ 120 fps.

Both are limited to ~30 second clips (at the moment).

Phil.
CHDK ports:
  sx30is (1.00c, 1.00h, 1.00l, 1.00n & 1.00p)
  g12 (1.00c, 1.00e, 1.00f & 1.00g)
  sx130is (1.01d & 1.01f)
  ixus310hs (1.00a & 1.01a)
  sx40hs (1.00d, 1.00g & 1.00i)
  g1x (1.00e, 1.00f & 1.00g)
  g5x (1.00c, 1.01a, 1.01b)
  g7x2 (1.01a, 1.01b, 1.10b)

Re: Movie time limit investigation
« Reply #12 on: 31 / July / 2011, 18:39:35 »
Interesting.

Here is a method I describe for capturing 360 degree stereo panoramas with a SINGLE camera:-

http://stereo.jpn.org/eng/stphmkr/help/file_27.htm

So, we mount the camera vertically for greatest number of vertical pixels.
If I need to capture 180 images maximum we can do that in six seconds at 30 fps.
Is there any resolution at a rate between 30 and 120 fps to allow faster rotation of the rig ?

*

Offline philmoz

  • *****
  • 3445
    • Photos
Re: Movie time limit investigation
« Reply #13 on: 31 / July / 2011, 19:07:11 »
Interesting.

Here is a method I describe for capturing 360 degree stereo panoramas with a SINGLE camera:-

http://stereo.jpn.org/eng/stphmkr/help/file_27.htm

So, we mount the camera vertically for greatest number of vertical pixels.
If I need to capture 180 images maximum we can do that in six seconds at 30 fps.
Is there any resolution at a rate between 30 and 120 fps to allow faster rotation of the rig ?

The only rates available in camera are 24, 30, 120 and 240.

Not sure if additional rates would be possible (may depend on code running on the Digic processor).

Phil.
CHDK ports:
  sx30is (1.00c, 1.00h, 1.00l, 1.00n & 1.00p)
  g12 (1.00c, 1.00e, 1.00f & 1.00g)
  sx130is (1.01d & 1.01f)
  ixus310hs (1.00a & 1.01a)
  sx40hs (1.00d, 1.00g & 1.00i)
  g1x (1.00e, 1.00f & 1.00g)
  g5x (1.00c, 1.01a, 1.01b)
  g7x2 (1.01a, 1.01b, 1.10b)


*

Offline philmoz

  • *****
  • 3445
    • Photos
Re: Movie time limit investigation
« Reply #14 on: 01 / August / 2011, 05:41:18 »
Found some suspicious things in the IXUS310 1.00a firmware.
(All I do is trying to look for values, that could have special meanings)
The function below is referenced only once (as in case of the other ones I posted here).
My remarks are after @ signs.

Changing the values in this function works for overriding the 1hour limit for 320x240 & 640x480 movies and the 10min limit for 1280x720 and 1920x1080.

Doesn't work for the 'super slow' modes - they are still limited to 30 seconds.

Note sure how practical it is at the higher resolutions.
The camera, battery and SD card get very warm during high res movie recording - so there's probably a reason why Canon limited the length to 10 minutes.

Edit: I can also override the 'super slow' (120fps & 240fps) time limit. It is in the same function, just not the obvious value. The value loaded into R7 at address 0xff3039e8 is 240,000, if I change this to 480,000 I get a 60 seconds duration, 960,000 give me two minutes etc - for 240fps movies. The value loaded at address 0xff303a00 is the duration for 120fps movies (default is 120,000).

Phil.
« Last Edit: 01 / August / 2011, 07:53:04 by philmoz »
CHDK ports:
  sx30is (1.00c, 1.00h, 1.00l, 1.00n & 1.00p)
  g12 (1.00c, 1.00e, 1.00f & 1.00g)
  sx130is (1.01d & 1.01f)
  ixus310hs (1.00a & 1.01a)
  sx40hs (1.00d, 1.00g & 1.00i)
  g1x (1.00e, 1.00f & 1.00g)
  g5x (1.00c, 1.01a, 1.01b)
  g7x2 (1.01a, 1.01b, 1.10b)

Re: Movie time limit investigation
« Reply #15 on: 01 / August / 2011, 07:51:10 »
I forgot, this does not use MJPEG codec so the extracted frames are presumably of lower quality.

Unless the lower resolution uses MJPEG.

120 fps would mean rotating camera in 1.5 seconds and panorama would have vertical height of 640.

For scenes involving movement, that is probably the only practical compromise using point-and-shoot cameras at present.

I cannot see future cameras using high resolution MJPEG capture.

*

Offline srsa_4c

  • ******
  • 4451
Re: Movie time limit investigation
« Reply #16 on: 01 / August / 2011, 08:23:22 »
Changing the values in this function works for overriding the 1hour limit for 320x240 & 640x480 movies and the 10min limit for 1280x720 and 1920x1080.
I'm really glad to hear that.

It seems like something that could probably be done for most (if not all) point&shoots.
The question is: should it be done? It's not wise to enable something that has the potential to cause damage (in this case the HD and hi-speed videos, both can stress the current hardware, the built-in cooling may not be enough). On the other hand, having the possibility to create longer videos (in this case SD resolution or below) could be a useful feature. As Canon doesn't seem to support multisegment video captures to overcome the FAT32 filesize limit, lifting the 60 minutes limit is all we could do.
But there may be problems: As I experienced, playing back those AVI 1.0 videos over one hour is not supported on camera. Don't know, whether similar limits exist in newer models with OpenDML AVIs and MOVs. I'm sure there would be users complaining about those "unidentified pictures".
Putting an "enable/disable 1 hour movie limit" option in the menu somewhere may work.

Quote
Doesn't work for the 'super slow' modes - they are still limited to 30 seconds.
That doesn't surprise me - haven't seen a value there that's related to 30 seconds length.

Could you test (in HD res.) another camera that's more bulky (like SX130)? Could warming be an issue there too?

Anyway, thanks for the update!

*

Offline funnel

  • ****
  • 349
Re: Movie time limit investigation
« Reply #17 on: 01 / August / 2011, 08:50:00 »
I tried to raise the values for 240fps and 120fps to 0xFFFFFFFF and appears to be ok (sx220). I recored a 4 minute video and the camera doesn't get warm like for 1080p movies. The ccd temperature was 42 C.  Will try to play around a little more to see if it's ok.

SX220
Code: [Select]
"loc_FF2FB434:\n"
" LDR R7, =0xFFFFFFFF \n"                     //240fps limit 0x3A980
" STR R0, [R6, #0x12C] \n"                 
" MOV R0, #0xF0 \n"                       
"loc_FF2FB440:\n"
" STR R0, [R6, #0xD8] \n"                 
" B loc_FF2FB464 \n"                       
"loc_FF2FB448:\n"
" STR R0, [R6, #0x12C] \n"                 
" LDR R7, =0xFFFFFFFF \n"                     //120fps limit 0x1D4C0
" MOV R0, #0x78 \n"                       
" B loc_FF2FB440 \n"                       
"loc_FF2FB458:\n"
" LDR R1, =0x35B \n"                       
" LDR R0, =0xFF2FA340 \n"                 
" BL sub_FF00EC88 \n"                     
"loc_FF2FB464:\n"
" LDR R0, [R6, #0xD8] \n"                 
" LDR R1, =0xFFFFFFFF \n"                     //normal video limit 0xE0F
" MOV R0, R0, LSR #1 \n"                   
" STR R0, [R6, #0xDC] \n"                 
« Last Edit: 01 / August / 2011, 08:55:48 by funnel »


*

Offline srsa_4c

  • ******
  • 4451
Re: Movie time limit investigation
« Reply #18 on: 01 / August / 2011, 09:22:57 »
Nice find! :) I have missed those.

*

Offline philmoz

  • *****
  • 3445
    • Photos
Re: Movie time limit investigation
« Reply #19 on: 01 / August / 2011, 09:44:07 »
I tried to raise the values for 240fps and 120fps to 0xFFFFFFFF and appears to be ok (sx220). I recored a 4 minute video and the camera doesn't get warm like for 1080p movies. The ccd temperature was 42 C.  Will try to play around a little more to see if it's ok.

Setting the normal video duration to 0xFFFFFFFF crashes the IXUS 310 when you stop recording (it also displays a warning icon when recording).

Phil.
CHDK ports:
  sx30is (1.00c, 1.00h, 1.00l, 1.00n & 1.00p)
  g12 (1.00c, 1.00e, 1.00f & 1.00g)
  sx130is (1.01d & 1.01f)
  ixus310hs (1.00a & 1.01a)
  sx40hs (1.00d, 1.00g & 1.00i)
  g1x (1.00e, 1.00f & 1.00g)
  g5x (1.00c, 1.01a, 1.01b)
  g7x2 (1.01a, 1.01b, 1.10b)

 

Related Topics