# Do you think ML could do MJPEG at S1 (2880 x 1920) on 5d3?



## Drizzt321 (Jun 12, 2012)

So, given that Magic Lantern is running (sorta at least) on the 5d3, do you think it could manage to do MJPEG, or manage to capture the JPEGs fast enough (and then write fast enough to the card) as separate JPEGs at 24/30/60 fps? Or do you think the JPEG engine would be a bottleneck? Or more likely, the sensor readout for processing? It's just a crazy thought, don't really know if ML has tried to do anything like that with a previous camera, but if you're in a 'video' mode it uses a digital shutter, couldn't you simply throw the frame (even if it's just the 1080p) through the JPEG engine?


----------



## Axilrod (Jun 17, 2012)

I'm not sure, but considering the power of Digic 5 I'm excited to see what ML brings about for the 5DIII. I'm sorry I can't answer your question, I just don't understand the technical aspects enough to give you an accurate answer. Either way I think the 5DIII has deliberately been held back in terms of video, hell if they could just get true 1080p out of it that would be enough for me.


----------



## marvinhello (Jun 17, 2012)

http://www.magiclantern.fm/
stay tuned


----------



## HurtinMinorKey (Jun 18, 2012)

They say they can already control the bit-rate, but only at high ISOs. That's weird. Anyone understand that one?


----------



## marvinhello (Jun 18, 2012)

HurtinMinorKey said:


> They say they can already control the bit-rate, but only at high ISOs. That's weird. Anyone understand that one?



The bitrate maxed out at 151Mbps at ISO12800, if using normal ISO like 100-400, even if we change the H264 parameter to the highest value possible, there is no obvious increase in bitrate, around 47Mbps in ALL-I, 32Mbps in IPB.


----------



## Drizzt321 (Jun 18, 2012)

marvinhello said:


> HurtinMinorKey said:
> 
> 
> > They say they can already control the bit-rate, but only at high ISOs. That's weird. Anyone understand that one?
> ...



That's pretty weird. Is it actually a higher bitrate, or is it like in RAW files how at higher ISO's since it's more noisy it gets harder to compress?


----------



## HurtinMinorKey (Jun 18, 2012)

marvinhello said:


> HurtinMinorKey said:
> 
> 
> > They say they can already control the bit-rate, but only at high ISOs. That's weird. Anyone understand that one?
> ...



So there is no work around the H264 codec? Why are their block artifacts in ALL-I, if not for insufficient data?


----------



## marvinhello (Jun 18, 2012)

HurtinMinorKey said:


> marvinhello said:
> 
> 
> > HurtinMinorKey said:
> ...



I think the block artifacts is caused by the decoder, 5D3 ALL-I mode uses H264 High Profile at Level 5.1, which is a very advanced and relatively new H264 standard (it supports 4K), thus it requires complex decoding, which might result in blocks in some applications. I use Cineform all the time and haven't noticed any similar thing in my work flow.

As a reference, all previous EOS DSLRs use H264 Baseline Profile at Level 5.0, and 5D3 IPB mode uses H264 High Profile at Level 4.1.

151Mbps at ISO12800 is mostly noise I think. Canon implemented VBR on 5D3 and placed a cap on max bitrate, currently we were able to remove the cap so bitrate can go very high. The next and the key step is to somehow achieve a high bitrate CBR.

According to BBC broadcast specifications, interframe compressed footage should be at least 50Mbps, intraframe compressed footage should be at least 100Mbps, 5D3's 33Mbps and 90Mbps is just a tad below that minimun requirement, how smart Canon is!


----------



## HurtinMinorKey (Jun 18, 2012)

Thanks for all the good info! 

Shouldn't fast pans and dolly shots up the bit rate too, since there is so much changing from from frame to frame?

What do you think the perceived advantages of a higher bit-rate will be? Do you think it would visibly affect things like highlight rolloff?

Since 24bit 1080(like our monitors are capable of) is something like 1.1Gbps @24fps, how come blue ray can look so good at much lower bit-rates?


----------



## marvinhello (Jun 18, 2012)

HurtinMinorKey said:


> Thanks for all the good info!
> 
> Shouldn't fast pans and dolly shots up the bit rate too, since there is so much changing from from frame to frame?
> 
> ...



In ALL-I mode each frame is encoded individually, so in VBR mode the bitrate changes acoording to the scene complexity, eg, a scene of trees full of leaves will make the bitrate go higher.

The benefit of high bitrate CBR would be colour grading, especially when you pull a secondary, there might be less blockiness in the shadow and highlight.

I don't think highlight rolloff has anything to do with bitrate, it's mainly gamma curve, which Magic Lantern is working on at the moment. in the upcoming new release, Magic Lantern digital ISO can improve highlight rolloff.

Bluray material usually comes from very high quality & high resolution master (eg, from film scan, RED or Alexa), the encoded quality will definately look better. However I think 5D3 footage after some processing it can look almost the same or even better than some bluray titles. Both Bluray and Canon DSLRs use H264 which is a highly efficient codec, it throws away a lot of data you can't see.


----------



## psolberg (Jun 19, 2012)

it would be interesting but doubtful. motion jpg is extremelly inneficient compared to modern H264.


----------



## Drizzt321 (Jun 19, 2012)

psolberg said:


> it would be interesting but doubtful. motion jpg is extremelly inneficient compared to modern H264.



Is it? I have no clue, I'm not really a video person. Just someone who has a small bit of interest. Reason I'm thinking that is the S1 JPGs are a good bit more resolution than 1080p, and I've read some things saying that the 5d3's 1080p doesn't really look like it has full 1080 lines or something like that. Also my random theory is JPEG conversion might require a good bit less processing than h264, so maybe we could get up to 60 fps, at a resolution somewhat higher than 1080p. Wouldn't that be awesome? Plus we know the JPEG engine in the 5d3 is quite good, so quality likely would be great.

Obviously MJPEG has a much lower overall storage/space efficiency than h264, especially when compared to intra-frame compression, but a UDMA7 card likely can keep up with that, maybe even a UDMA6 card. Unfortunately with the 5d3 it doesn't support UHS-I, so the SD slot may or may not be able to keep up.


----------



## marvinhello (Jun 19, 2012)

Drizzt321 said:


> psolberg said:
> 
> 
> > it would be interesting but doubtful. motion jpg is extremelly inneficient compared to modern H264.
> ...



Motion JPEG is Intra-frame compression, so it's similar to ALL-I mode in 5D3, In EOS 1D C, its 4K mode uses MJPEG 24fps at 500Mbps, considering 1D C/1D X has larger buffer, I think 5D3 can handle 200Mbps properly.


----------



## jcs (Jun 19, 2012)

marvinhello said:


> According to BBC broadcast specifications, interframe compressed footage should be at least 50Mbps, intraframe compressed footage should be at least 100Mbps, 5D3's 33Mbps and 90Mbps is just a tad below that minimun requirement, how smart Canon is!



I've seen 101Mbps in ALL-I on a Lexar 600X CF card (complex tree scene).

It looks like PPro CS6 is doing a better job with ALL-I re: block artifacts (720p60 looks clearly better than IPB), however 1080p24 for non-fast motion still looks really good with IPB (haven't seen a case yet where ALL-I is better).


----------



## marvinhello (Jun 19, 2012)

jcs said:


> marvinhello said:
> 
> 
> > According to BBC broadcast specifications, interframe compressed footage should be at least 50Mbps, intraframe compressed footage should be at least 100Mbps, 5D3's 33Mbps and 90Mbps is just a tad below that minimun requirement, how smart Canon is!
> ...



Maximum I got was 151Mbps shooting a fabric, but it's still VBR, EOS C300 implements CBR 50Mbps interframe compression, it's 50Mbps all the time. This is what Magic Lantern is working on, bring constant high bitrate.


----------



## Drizzt321 (Jun 19, 2012)

marvinhello said:


> Drizzt321 said:
> 
> 
> > psolberg said:
> ...



Ah, didn't realize Motion JPEG was all intra-frame. Like I said, I'm not a video guy. Just did a back of the napkin calculation, full individual JPEGs @3MByte per frame, 30 fps, 720 Mbit/sec. Wow! Guess it really does need to use that intra-frame. The JPEG engine probably would need to be modified some for that intra-frame calculations probably, so I'd guess that'd be a hardware change so probably won't be able to do it


----------



## marvinhello (Jun 19, 2012)

Drizzt321 said:


> marvinhello said:
> 
> 
> > Drizzt321 said:
> ...



There is hope for MJPEG recording on 5D3, probably not at that high resolution and 720Mbit, but there is hope.


----------



## NormanBates (Jun 19, 2012)

MJPEG is very good at high bitrates, it is at low bitrates that the newer codecs pull clearly ahead

I doubt Magic Lantern will go so deep into the image processing: with previous cameras, ML has been great at adding features, improving usability, providing monitoring tools, etc, but it has never been able to improve the image processing. ML mostly lives in the ARM side of the digic processor.

So, if the new encoder has a couple of parameters that they can change to get a better image, it will be a great win. But if that happens, it will probably be still IPB or All-I, not a new codec.


----------



## LetTheRightLensIn (Jun 19, 2012)

marvinhello said:


> HurtinMinorKey said:
> 
> 
> > They say they can already control the bit-rate, but only at high ISOs. That's weird. Anyone understand that one?
> ...



That is weird, almost like they have some anti-hacking code to reset the value if the ISO is low???
Or somehow they happen to also set the value during some process used in low ISO.


----------



## LetTheRightLensIn (Jun 19, 2012)

What I really wonder is if the sensor can do the 2x2 based binning the C300 uses in addition to the 3x3 and whether a crisper than FF, 1.6x crop 1920x1080 mode without line skipping can be theoretically produced (at the least by Canon).


----------



## psolberg (Jun 20, 2012)

NormanBates said:


> MJPEG is very good at high bitrates, it is at low bitrates that the newer codecs pull clearly ahead
> 
> I doubt Magic Lantern will go so deep into the image processing: with previous cameras, ML has been great at adding features, improving usability, providing monitoring tools, etc, but it has never been able to improve the image processing. ML mostly lives in the ARM side of the digic processor.
> 
> So, if the new encoder has a couple of parameters that they can change to get a better image, it will be a great win. But if that happens, it will probably be still IPB or All-I, not a new codec.



agreed. ML has its limits. It is more of a tweaker than a re-write. people also forget there are bus speeds, data path widths, read-out patterns and processing baked on chips which aren't firmware modifiable and are the real limits on top of the complexity of dealing with something as custom made for hardware as camera firmware. These are not general purpose PC's with OTS hardware. ML simply won't get 4K out of that camera the way canon could if they had set out to do that. If it was as easy to improve the quality as setting some parameters in some functions, canon may have just done it themselves. Not to say there isn't room for improvement and maybe higher bit rates but a higher bit rate is only going to help reduce codec panic in motion and not really improve quality since garbage in is garbage out.

I think the best thing for the ML guys to do is try to go for uncompressed clean HDMI. In that way you pick whatever codec you want and whatever bit rate it pleases you. The video won't be any crisper, but at least it will let you bypass the internal codec's mess.


----------

