supplierdeeply

Seamless end-of-video file transition

  • 12 Replies
  • 1235 Views
Seamless end-of-video file transition
« on: 30 / September / 2011, 21:07:59 »
Advertisements
Similar to the post of 8-6-11 ("Restart video recording when time limit is reached (FAT32 4gb) automatically"), what about the possibility of making long videos greater than the 4gb/60min. limit automatically continuing into subsequent video files without stopping so there is a seamless (or as close as possible) transition from one video file to the next when imported sequentially into a video editing program?  Currently when recording something like a stage performance, I have to look for a good point near the 60 minute mark such as a break for audience applause when I can stop recording and restart as quickly as possible.  Sometimes I forget and the camera (S5 IS) stops itself right during the performance, causing a loss of that portion when I restart and consequently a bad transition in the video.  If it automatically kept recording into a new file that would eliminate the whole stop-restart issue.  I've read about digital video recorders that do that, seamlessly continuing to record into a subsequent file on the memory card when the 4gb limit is reached.

Re: Seamless end-of-video file transition
« Reply #1 on: 30 / September / 2011, 21:25:18 »
Take a look at this thread :

Restart video recording when time limit is reached (FAT32 4gb) automatically

UPDATE :  oh wait - you started with that thread.  I'm not sure why the script posted there does not do what you want ?  I might be tempted to modify it a bit so that it scans one of the camera buttons in the wait loop and if you press it, it initiates the reload function.  That way it either happens when the time limit is up or if you hit the button during an appropriate moment ?
« Last Edit: 30 / September / 2011, 21:40:03 by waterwingz »
Ported : A1200  SD940  G10  Powershot N  G16*

Re: Seamless end-of-video file transition
« Reply #2 on: 23 / March / 2012, 22:43:51 »
Similar to the post of 8-6-11 ("Restart video recording when time limit is reached (FAT32 4gb) automatically"), what about the possibility of making long videos greater than the 4gb/60min. limit automatically continuing into subsequent video files without stopping so there is a seamless (or as close as possible) transition from one video file to the next when imported sequentially into a video editing program?

I've been wondering about the same thing. Here are my thoughts so far:

1. The 60 minute limit seems to be set in firmware, and can be overcome - at least for some cameras: http://chdk.setepontos.com/index.php?topic=6711.15

2. None of the scripts I've seen so far for simulating indefinite video recording length address the 4GB limit directly; they instead record video for a predetermined amount of time, then stop recording for a short amount of time, and then start recording again (possibly on a loop): http://chdk.setepontos.com/index.php?topic=6507.msg69015 and http://chdk.setepontos.com/index.php?topic=6169.0 and http://chdk.setepontos.com/index.php?topic=5691.msg61719#msg61719

3. I dislike two things about these scripts: (A) that they use elapsed time rather than current video file size as the basis for determining when to begin a new video file, and (B) that they stop and restart, instead of just switching seamlessly from appending video data to one file, to appending it to the next file.

4. In order to be able to record indefinitely long videos up to the capacity of the memory card, not only would the duration limit need to be set in firmware to the maximum possible (see point 1, above), but points A and B, above, would also need to be addressed, so that when the current video file's size nears the filesystem's limit, the video data is diverted into a new file.

5. Although I've used CHDK a few times on my IXUS 80IS (SD1100), I've never written a script for it, and I don't yet know if there are functions available to CHDK scripts that would allow A and B to be addressed.

I'm looking forward to hearing what more experienced CHDK folks have to say about this :)

Re: Seamless end-of-video file transition
« Reply #3 on: 23 / March / 2012, 22:56:28 »
1. The 60 minute limit seems to be set in firmware, and can be overcome - at least for some cameras: http://chdk.setepontos.com/index.php?topic=6711.15
By all means, please feel free to fix this on other cameras.

Quote
2. None of the scripts I've seen so far for simulating indefinite video recording length address the 4GB limit directly; they instead record video for a predetermined amount of time, then stop recording for a short amount of time, and then start recording again (possibly on a loop)
Seems like that's better than nothing. Again, feel free to code and submit a better script.

Quote
3. I dislike two things about these scripts: (A) that they use elapsed time rather than current video file size as the basis for determining when to begin a new video file, and (B) that they stop and restart, instead of just switching seamlessly from appending video data to one file, to appending it to the next file.
A full refund of everything you have paid for these scripts is available from their authors. Please post your improved version.

Quote
4. In order to be able to record indefinitely long videos up to the capacity of the memory card, not only would the duration limit need to be set in firmware to the maximum possible (see point 1, above), but points A and B, above, would also need to be addressed, so that when the current video file's size nears the filesystem's limit, the video data is diverted into a new file.
When you work this out, please post so we can all do this.

Quote
5. Although I've used CHDK a few times on my IXUS 80IS (SD1100), I've never written a script for it, and I don't yet know if there are functions available to CHDK scripts that would allow A and B to be addressed.

I'm looking forward to hearing what more experienced CHDK folks have to say about this :)
Me too. Oh wait ...
Ported : A1200  SD940  G10  Powershot N  G16*


*

Offline reyalp

  • ******
  • 10913
Re: Seamless end-of-video file transition
« Reply #4 on: 23 / March / 2012, 23:09:08 »
3. I dislike two things about these scripts: (A) that they use elapsed time rather than current video file size as the basis for determining when to begin a new video file, and (B) that they stop and restart, instead of just switching seamlessly from appending video data to one file, to appending it to the next file.
The reason it is done this way is that the alternatives would require much deeper reverse engineering of the canon firmware. It certainly could not be done with a script. It might be theoretically possible, but it would take a lot experimentation and digging in the firmware disassembly.
Don't forget what the H stands for.

Re: Seamless end-of-video file transition
« Reply #5 on: 23 / March / 2012, 23:44:24 »
By all means, please feel free to fix this on other cameras.

Seems like that's better than nothing. Again, feel free to code and submit a better script.

A full refund of everything you have paid for these scripts is available from their authors. Please post your improved version.

When you work this out, please post so we can all do this.

Me too. Oh wait ...

Holy sarcasm, waterwingz! :-p

Seriously: I was just trying to pull my research into one place (to save time for others who might be looking for the same information), draw some reasonable conclusions, and suggest avenues to be pursued. In other words, I was trying to be helpful!

Perhaps I should have phrased things differently, but I certainly didn't intend to express any ingratitude.

I'd love to be able to write a script that would address A and B, but, as I tried to make clear, I'm totally new to hacking/scripting firmware/CHDK, so unless you and other more experienced members of the CHDK community are willing to be very supportive, I don't see how I could possibly be able to achieve this any time soon.

So, how should we proceed?

- I could go it alone. This could fail completely, because not only am I right at the bottom of the relevant learning curve, I also can't justify committing an indefinite amount of time to a project: I'd have to give myself a budget of a certain number of hours, and if I didn't succeed within that time, I'd have to stop; so this approach is a gamble.
- I could leave it up to others. This might be faster, because an experienced dev could probably iterate towards a working solution (or, alternatively, a conclusive proof that A and B aren't solvable) much more quickly than a newbie, but it might also be slower, because perhaps no experienced devs would decide to give it a go; so this approach is also a gamble.
- We could collaborate. This seems to me to be the best option; and, indeed, to be the whole point of having forums. A more experienced CHDK coder could give me pointers (i.e. mentor me). If the more experienced coder knows from the start that solving A and B is physically impossible, then (s)he could say so and this would be constructive since it would avoid time being wasted. Alternatively, if the more experienced coder knows which approaches might be most likely to solve A and B then (s)he could say so, and I'd try them out and report back, which would speed me on my way much faster than if I were having to work it all out for myself. So this approach is much less of a gamble.

Since I'm clearly not the only person interested in having this functionality, it does seem to me it would be best not to take a bigger gamble with this project than necessary, so the third option above sounds best. Would you say that's fair? :)

Re: Seamless end-of-video file transition
« Reply #6 on: 23 / March / 2012, 23:48:43 »
3. I dislike two things about these scripts: (A) that they use elapsed time rather than current video file size as the basis for determining when to begin a new video file, and (B) that they stop and restart, instead of just switching seamlessly from appending video data to one file, to appending it to the next file.
The reason it is done this way is that the alternatives would require much deeper reverse engineering of the canon firmware. It certainly could not be done with a script. It might be theoretically possible, but it would take a lot experimentation and digging in the firmware disassembly.

That's helpful to know; thank you. I had hoped that at least getting the size of the current video file would be script-able.

Re: Seamless end-of-video file transition
« Reply #7 on: 23 / March / 2012, 23:58:02 »
Holy sarcasm, waterwingz! :-p
Yea .. sometime we all have a bad day where things just set us off.

Quote
Seriously: I was just trying to pull my research into one place (to save time for others who might be looking for the same information), draw some reasonable conclusions, and suggest avenues to be pursued. In other words, I was trying to be helpful! Perhaps I should have phrased things differently, but I certainly didn't intend to express any ingratitude.
I accept that.  Sometime we just get tired of people telling us how much better they could do things when they have put no effort into the project.


Ported : A1200  SD940  G10  Powershot N  G16*


Re: Seamless end-of-video file transition
« Reply #8 on: 24 / March / 2012, 00:05:22 »
- I could go it alone. This could fail completely, because not only am I right at the bottom of the relevant learning curve, I also can't justify committing an indefinite amount of time to a project: I'd have to give myself a budget of a certain number of hours, and if I didn't succeed within that time, I'd have to stop; so this approach is a gamble.
Well,  you could run down that route and post frequently here - you'd at least get feedback.

Quote
- I could leave it up to others. This might be faster, because an experienced dev could probably iterate towards a working solution (or, alternatively, a conclusive proof that A and B aren't solvable) much more quickly than a newbie, but it might also be slower, because perhaps no experienced devs would decide to give it a go; so this approach is also a gamble.
Yup .. don't hold your breath for this to happen anytime soon.

Quote
- We could collaborate. This seems to me to be the best option; and, indeed, to be the whole point of having forums. A more experienced CHDK coder could give me pointers (i.e. mentor me). If the more experienced coder knows from the start that solving A and B is physically impossible, then (s)he could say so and this would be constructive since it would avoid time being wasted. Alternatively, if the more experienced coder knows which approaches might be most likely to solve A and B then (s)he could say so, and I'd try them out and report back, which would speed me on my way much faster than if I were having to work it all out for myself. So this approach is much less of a gamble.
The way CHDK tends to work is that a person who cares about an issue digs in and works on it.  There is no "staff" of developers just waiting for something new to do.  So your option 1 & 3 are pretty much the same thing .. if you go after this, you will find that the small group of active CHDK devs ( somewhere between 1 and 8 by my count) will certainly help out where they can.


Ported : A1200  SD940  G10  Powershot N  G16*

*

Offline reyalp

  • ******
  • 10913
Re: Seamless end-of-video file transition
« Reply #9 on: 24 / March / 2012, 00:30:46 »
- We could collaborate. This seems to me to be the best option; and, indeed, to be the whole point of having forums. A more experienced CHDK coder could give me pointers (i.e. mentor me)
Sure, here's some pointers
0x0000e238
0x00001c38
0xffb08638
0xffb330f4

;)

There are a number of experienced coders who might offer advice. However, to collaborate, you have to bring something to the table. In this case, that means:
1) Be able to reverse engineer ARM binaries. If you can't analyze disassembled ARM code, you aren't in a position to do much.
2) Be willing to spend a LOT of time on it. Unless you are a wizard at #1, I'd guess hundreds of hours, but you might get lucky. You might also invest the time and find it isn't possible...

You may find srsa_4c research into the video tasks useful. See his wiki user page here http://chdk.wikia.com/wiki/User:Srsa_4c or view for posts by http://chdk.setepontos.com/index.php?action=profile;u=19252
Quote
Since I'm clearly not the only person interested in having this functionality
The flip side is this has been a desired and requested functionality for a long time. If it were easy, it would be done.
Don't forget what the H stands for.

 

Related Topics