Log in

View Full Version : Running x264 as encoder on the Canon 5D Mark II


Joachim Buambeki
24th May 2010, 08:45
Hi,

some of you may know about the Canon 5D Mark II, which was a small revolution in the indy film market.
I did some research and the processor of the camera, the DigicIV seems to be pretty much an ARM core.
Since x264 has been heavily optimized for ARM I wonder if it would be possible to use x264 as encoder instead of the really crappy encoder from Canon (MPEG2 at 40Mbit would look alot better).
There is a hacked firmware for the camera. I do not have a clue if it is possible to implement x264, because I do not know how elaborated the firmware is in terms of the encoding core. I already contacted the author of the Magic Lantern Firmware (http://magiclantern.wikia.com/wiki/Magic_Lantern_Firmware_Wiki) about this topic, but he did not even bother to give me an answer. :mad:

Perhaps some of the coding wizards are interested to have a look into it. It would be awesome if the quality of the output could be improved with x264.

Best Regards
David

Joachim Buambeki
2nd June 2010, 09:22
264 views indicate that there must be a few people also interested in this topic.
Can anybody comment on that?

Best Regards
David

Dark Shikari
2nd June 2010, 10:01
There's no magic bullet here. Even on the fastest ARMs, x264 can barely do CIF resolution in realtime -- and that's with fastest encoding settings. Basically all other open source encoders are slower.

You can't get HD encoding at very low power without a special-purpose DSP/ASIC/FPGA-type setup.

Joachim Buambeki
2nd June 2010, 14:43
That is sad to hear, though I expected it would not be that easy.
Thanks for you reply.

Best Regards
David

CruNcher
2nd June 2010, 14:51
Can't you get the uncompressed Sensor Information and compress that later on it whatever you want ?
Laptop connected to the Camera on set should be no problem for a few takes :)

kieranrk
2nd June 2010, 15:44
Can't you get the uncompressed Sensor Information and compress that later on it whatever you want ?
Laptop connected to the Camera on set should be no problem for a few takes :)

It has HDMI output that could be used.

poisondeathray
2nd June 2010, 15:58
It has HDMI output that could be used.

it outputs 480p only when recording

supposedly there are some firmware hacks (like magic lantern), but none of them work well AFAIK

Blue_MiSfit
2nd June 2010, 21:48
What about MPEG-2? :devil: Does ffmpeg's encoder have extensive ARM optimization? Somehow I still doubt it's fast enough. Canon's encoder must be an ASIC...

If there is a proper HDMI output hack, that would be the ideal way to handle things. Of course, that implies a (mobile) HDMI capture solution. The Blackmagic Intensity Shuttle (or an UltraStudio Pro) with a USB 3.0 equipped laptop would be a perfect combination! Toss in a mobile RAID enclosure and an eSATA ExpressCard, and you're all set for uncompressed capture :)

~MiSfit

Dark Shikari
2nd June 2010, 21:55
What about MPEG-2? :devil: Does ffmpeg's encoder have extensive ARM optimization? No, it's slower than x264, significantly so.

Blue_MiSfit
2nd June 2010, 22:06
Wow. I had no idea :)

I recall the ffmpeg/lavc mpeg-4 sp codec being fast... Maybe a software version of HDCAM-SR :D?

Any other stupid fast encoders you can think of?

Lyris
3rd June 2010, 01:39
I'm surprised you're worried about the quality of the in-camera AVC encoder. Frankly, the aliasing and softness that these DSLRs produce in video mode is a much bigger concern for me (although I'm speaking from my Canon 550D - but from what I've seen, the 5D mk2's video is not much better).

Blue_MiSfit
3rd June 2010, 06:13
I'd actually agree with Lyris. I've been suitably impressed with the sample videos I saw from the 5D Mk II. Apparently it IS hard to screw up 1080p at 50mbps, but their encoder isn't THAT bad :) A little deblock filtering, maybe some chroma noise reduction, and you're pretty good. The aliasing and rolling shutter problems are tougher to fix.. :)