Magic Lantern Forum

Developing Magic Lantern => General Development => Topic started by: Andy600 on September 04, 2013, 05:38:07 PM

Title: Non-realtime raw video compression
Post by: Andy600 on September 04, 2013, 05:38:07 PM
Just a thought...

As realtime in-camera compression of raw video is a non-starter, is it possible to somehow compress the already recorded raw files to 10 or 12bit via a script to free-up some space or is there no 'accessible' method of compression available in the camera? or is too slow etc?
Title: Re: Non-realtime raw video compression
Post by: a1ex on September 04, 2013, 05:42:55 PM
You mean, record for 1 minute and compress for half an hour?
Title: Re: Non-realtime raw video compression
Post by: Andy600 on September 04, 2013, 05:44:48 PM
Quote from: a1ex on September 04, 2013, 05:42:55 PM
You mean, record for 1 minute and compress for half an hour?

Wow, that bad huh? :o

Ok, more cards or a new laptop it is then
Title: Re: Non-realtime raw video compression
Post by: a1ex on September 04, 2013, 05:52:22 PM
I've tried to make a card test that simply writes some random data, and then loads it back to compare with the original. The comparison was a few times slower than reading + writing, so the activity LED was off most of the time.

Trimming some bits may be faster (say record 1 minute, compress 3-5 minutes), but what's the point? You have important info there, except if you shoot as ISO 6400 ;)

The proper way to reduce bit depth is with a log curve (unpack the 14-bit stream, use a LUT, then pack it to 10-bit). All this takes time.
Title: Re: Non-realtime raw video compression
Post by: Andy600 on September 04, 2013, 06:05:56 PM
Thanks for the explanation a1ex. I guess if it could be done at 10fps or something it might be worth the time (if you're not shooting to a deadline). Batteries are way cheaper than CF cards but I guess USB3.0 on a laptop is way more efficient, not to mention the extra storage capacity.
Title: Re: Non-realtime raw video compression
Post by: mucher on September 04, 2013, 06:21:42 PM
The Digic4 sounds like a 80086(that is Intel's processor before 286) without a floating-point co-processor.
Title: Re: Non-realtime raw video compression
Post by: Audionut on September 06, 2013, 02:41:17 AM
Quote from: mucher on September 04, 2013, 06:21:42 PM
The Digic4 sounds like a 80086(that is Intel's processor before 286) without a floating-point co-processor.

8086 ;)

It was around 2mhz iirc.  The turbo button on my old box got it to 8mhz  ;D
Title: Re: Non-realtime raw video compression
Post by: Francis on September 06, 2013, 05:15:36 AM
Quote from: Audionut on September 06, 2013, 02:41:17 AM
8086 ;)

It was around 2mhz iirc.  The turbo button on my old box got it to 8mhz  ;D

I remember playing an old military action game and hitting the turbo to get to the good parts :) Now my phone has a dual-core 1.something ghz processor.
Title: Re: Non-realtime raw video compression
Post by: Audionut on September 06, 2013, 07:08:41 AM
Quote from: Francis on September 06, 2013, 05:15:36 AM
Now my phone has a dual-core 1.something ghz processor.

Good chunk more ram too lol.  Was always fun times trying to keep as much of that 640k free as possible  :)