Author Topic: supporting > 30min videos, and 3rd-party firmware projects?  (Read 9765 times)

mark.farnell

  • New to the forum
  • *
  • Posts: 22
supporting > 30min videos, and 3rd-party firmware projects?
« on: March 11, 2013, 05:14:44 AM »
Last time, we were talking about when the magic lantern does the automatic new video when the video reaches 4GB, or exceed 30 minutes, the recording will stop for a few seconds to allow the content of the buffer to flush to disk.

However, if we make a new file say in every 50 MB in a continuous recording, then will the time taken to flush the file shorten, and hopefully we can only lose a few frames per new file, rather than a few second of recording?

So far, magic lantern is a user-space program that can do all these wonderful things..... however are there projects similar to the Panasonic PTool that offers a patch or a complete replacement of the firmware and be able to modify things at a lower level, such as adding codecs, removing 30 minutes limits etc?

1%

  • Developer
  • Hero Member
  • *****
  • Posts: 5936
  • 600D/6D/50D/EOSM/7D
Re: supporting > 30min videos, and 3rd-party firmware projects?
« Reply #1 on: March 11, 2013, 04:15:21 PM »
The camera runs on DryOs with canon gui on top. The encoder is a hardware solution, nothing more is getting squeezed out of it. All of this sounds nice but looks to be a ton of work and likely different for each camera.

So while I'm hoping for a total replacement at one point, I don't see it as likely. Maybe edit the current fw dialogs, since resources can be messed with.

Also the risk goes up a little bit.... do you want to be flashing new FW every week?

mark.farnell

  • New to the forum
  • *
  • Posts: 22
Re: supporting > 30min videos, and 3rd-party firmware projects?
« Reply #2 on: March 11, 2013, 07:38:10 PM »

1%:  You haven't answered the question below yet.......

Last time, we were talking about when the magic lantern does the automatic new video when the video reaches 4GB, or exceed 30 minutes, the recording will stop for a few seconds to allow the content of the buffer to flush to disk.

However, if we make a new file say in every 50 MB in a continuous recording, then will the time taken to flush the file shorten, and hopefully we can only lose a few frames per new file, rather than a few second of recording?


If the video file is smaller (say 50MB), then can the camera take a much shorter time before starting a new file/recording?  If the above proposal does work, then we can effectively break the 30min limit..........

1%

  • Developer
  • Hero Member
  • *****
  • Posts: 5936
  • 600D/6D/50D/EOSM/7D
Re: supporting > 30min videos, and 3rd-party firmware projects?
« Reply #3 on: March 11, 2013, 07:57:38 PM »
That hella won't work. There is no file size limit in reality, only a counter of 1799 seconds somewhere (multiple functions).

The 600D 4gb limit is broken. 6d splits the files. 50MB would be a drop in the bucket when video is like 1gb a minute.

mark.farnell

  • New to the forum
  • *
  • Posts: 22
Re: supporting > 30min videos, and 3rd-party firmware projects?
« Reply #4 on: March 11, 2013, 09:07:54 PM »
That hella won't work. There is no file size limit in reality, only a counter of 1799 seconds somewhere (multiple functions).

The 600D 4gb limit is broken. 6d splits the files. 50MB would be a drop in the bucket when video is like 1gb a minute.

so another word: it is the counter that really limit the recording time (if the 4GB limit is broken), so if we were to break the 30 minute limit, then we need to identify the counter, functions that use the counter and a way to reset the counter (or enlarge the counter to make it effectively infinity), right?

By the way, when you say "The 600D 4gb limit is broken" do you mean that the camera will be happily making files larger than 4GB, or multiple files when needed?  At this moment, most Canon DSLRs, including the 60D still has this 4GB limit.......

1%

  • Developer
  • Hero Member
  • *****
  • Posts: 5936
  • 600D/6D/50D/EOSM/7D
Re: supporting > 30min videos, and 3rd-party firmware projects?
« Reply #5 on: March 12, 2013, 01:40:30 AM »
600D is lucky in that it has address space for files over 4gb. Its still a hack.. needs exfat and movie rewritten afterwards on a computer.

6D just splits the files but from looking it could be hacked the same way even though its unnecessary.




mark.farnell

  • New to the forum
  • *
  • Posts: 22
Re: supporting > 30min videos, and 3rd-party firmware projects?
« Reply #6 on: March 12, 2013, 04:45:27 AM »
600D is lucky in that it has address space for files over 4gb. Its still a hack.. needs exfat and movie rewritten afterwards on a computer.

6D just splits the files but from looking it could be hacked the same way even though its unnecessary.

okay... so are you saying that:

- no matter what, the camera will stop for a few seconds before recording a new video clip regardless of length of the previous clip (3 seconds or 30 minutes)?

- magic lantern has no way to split video files (is the function implemented in firmware or hardware or DryOS or ML?)


Also for the 1799 seconds counter you talked about, is it in the DryOS, or the hardware?  And can it be accessed/modified by ML?

I am now reading the ML mercurial repository, apart from doxygen, are there any documentation that gives the big picture of the ML mechanism?

Thanks!

Mark


1%

  • Developer
  • Hero Member
  • *****
  • Posts: 5936
  • 600D/6D/50D/EOSM/7D
Re: supporting > 30min videos, and 3rd-party firmware projects?
« Reply #7 on: March 12, 2013, 06:01:48 AM »
The splitting functions are either present or not. A movie is first a dat file... basically a raw h264 stream. It will always take some time to write the atoms and make it a .mov

6D does this at the end and then splits as necessary. 600D just puts the wrong atoms on a > 4gb file if hacked.

The counter is not so easy to patch. I tried and failed a few different ways. There are actually several of them and they fire off events which stop recording. You can try cache hacks but will have to  dig in the FW and find all of the counters or modify the functions to make recording not stop.

ML source is good for example code and the rest you have to decompile the firmware and reverse engineer how it works. Wikia has docs on how certain things like FPS override work, etc.





mark.farnell

  • New to the forum
  • *
  • Posts: 22
Re: supporting > 30min videos
« Reply #8 on: March 14, 2013, 04:30:32 AM »

The counter is not so easy to patch. I tried and failed a few different ways. There are actually several of them and they fire off events which stop recording. You can try cache hacks but will have to  dig in the FW and find all of the counters or modify the functions to make recording not stop.


So in another word: should we try to identify all events that stop recording, and the function that stops recording when the recording button is pressed during a recording.  Then we need to change the functions so that recording can only be stopped by pressing the recording button while recording, right?  So far, have we managed to identify events that stop recording?




1%

  • Developer
  • Hero Member
  • *****
  • Posts: 5936
  • 600D/6D/50D/EOSM/7D
Re: supporting > 30min videos, and 3rd-party firmware projects?
« Reply #9 on: March 14, 2013, 05:47:09 AM »
Some... I tried patching a whole bunch of places. I made a fair bit of logs on 6D, I could upload them.

Its kind of hard to test as it takes 30 minutes. I tried to get it to stop early but couldn't.




mark.farnell

  • New to the forum
  • *
  • Posts: 22
Re: supporting > 30min videos, and 3rd-party firmware projects?
« Reply #10 on: March 14, 2013, 08:10:11 PM »
Some... I tried patching a whole bunch of places. I made a fair bit of logs on 6D, I could upload them.

Its kind of hard to test as it takes 30 minutes. I tried to get it to stop early but couldn't.

Thanks for doing all these hard work..... btw... do you think these functions are specific to 6D, or are identical across the DryOS family?

Also, how come the PTool project can remove the 30 minutes limit on Panasonic cameras so easily?

1%

  • Developer
  • Hero Member
  • *****
  • Posts: 5936
  • 600D/6D/50D/EOSM/7D
Re: supporting > 30min videos, and 3rd-party firmware projects?
« Reply #11 on: March 15, 2013, 01:00:19 AM »
6D has a few more (ie timecode) but 600D had the same stuff. Its not DryOS, its canon stuff on top of it.

Ptool directly modifies fw (AFAIK) and they have a software encoder.

mark.farnell

  • New to the forum
  • *
  • Posts: 22
Re: supporting > 30min videos, and 3rd-party firmware projects?
« Reply #12 on: March 29, 2013, 10:57:36 PM »
Some... I tried patching a whole bunch of places. I made a fair bit of logs on 6D, I could upload them.

Its kind of hard to test as it takes 30 minutes. I tried to get it to stop early but couldn't.

By the way, do your patches work or not?  Are these patches specific to 6D, or generic to other cameras such as 60D?  I have a 60D..... and I am happy to test.

Also when you said "I tried to get it to stop early but couldn't", do you mean your patches now make the camera unable to stop recording when you press the red button the second time?  The (our) desired behaviour of the camera is that the camera should stop recording only when:

- the disk is full
- the user presses the red button again

Also, can we test your patches on an emulator such as eCos?  If we can, then this would certain make it much safer...... I don't want to brick my 60D!!!!!!!!!!!!!!!!!!!


Finally, where can we get your patches and/or logs?  in git?  or other places?

Thanks!

Mark

1%

  • Developer
  • Hero Member
  • *****
  • Posts: 5936
  • 600D/6D/50D/EOSM/7D
Re: supporting > 30min videos, and 3rd-party firmware projects?
« Reply #13 on: March 29, 2013, 11:18:12 PM »
Patches are in 6D and 600D repos, look for the commits referring to such. They are camera specific... you'd have to cross reference those firmware locations to yours. If you can get it into an emulator all the better, you can debug and see what's going on.

Nothing really worked for the 30 minute limit... might be worth looking into the 600D repo and trying to patch the 4gb  limit first as that should work.

https://bitbucket.org/OtherOnePercent/tragic-lantern/commits/a55888def09c0a394c6ececc7a3b77938cd52096

Markiii3rddegree

  • New to the forum
  • *
  • Posts: 2
Re: supporting > 30min videos, and 3rd-party firmware projects?
« Reply #14 on: June 21, 2013, 10:18:43 PM »
Is there a way to use the dslr as a "pass through" device, recording the image on an external laptop even though the camera isn't recording? I've tried this in an attempt to bypass the 30 minute limit but the live view still shuts off after 30 minutes even though the camera isn't recording. Is there any firmware that prevents the live view from shutting itself off after 30 minutes?