WORKAROUND – How to repair DNxHD codec Video Levels

Category : Workflow

AN ONGOING STORY: Canon C100 + Atomos Ninja2 = Windows + Premiere Pro

UPDATE: Since Premiere CC version 2015.2 the problem with wrong video levels is finaly solved. Video levels are now normal and the ffmpeg remux fix is not needed with this version if Premiere anymore.

I own and love the Canon EOS-C100 which is a great little camera with outstanding image quality but with the drawback of a not so ideal internal codec, however the AVCHD implementation in the C100 is pretty damn good.
But AVCHD codec has it’s limits and that is were the Ninja2 kicks in with a great punch!

After I bought the Ninja2 from Atomos for my Canon EOS-C100 I ran some tests to compare the 2 codecs on this great little Harddisk-Field-Video-Recorder.
Movie recorded as ProRes were just fine an prestine quality, but there were some issues with the movies recorded with AVIDs DNxHD codec on the Atomos Ninja2. The Video-Levels on the DNxHD movie were just wrong compared to the movies recorded with the ProRes codec. The black are to high and the whites ore to low.
So if you have similar problems, this article covers some possible explanations and a solution for this problem.

The companion on my C100, the Atomos Ninja2, records either with ProRes with a maximum of 220mbit in 8-bit (or 10-bit) color depth and after activation via free code it can record movies with AVID’s DNxHD codec too.

ProRes movie files are very versatile and can be used in current editing suits on booth Mac and PC and they look exactly the same in every application on Windows and Mac.

DNxHD is the second great codec on the Ninja2, but – at least on Microsoft Windows machines (i still have to test it on Macs) – it has some issues with it’s video levels.

The Ninja2 from Atomos
The Ninja2 from Atomos

THE PROBLEM: Wrong Video Levels

When DNxHD files are recorded with the Ninja2 and imported for example in Premiere Pro or Speedgrade running on Windows the video image looks a bit washed out.

The video levels are not what they should be. Instead the black levels are raised and the white levels are lowered to approximate 16-235 in RGB range.

It looks like this is an odd Windows/Ninja2/Quicktime/DNxHD problem, I dont have a Mac around to test the behaviour on Premiere Pro on a Mac.

I already contacted Atomos, but they does not seem to have a solution yet.

Waveform with wrong video-levels from uncorrected DNxHD movie

Waveform with wrong video-levels from uncorrected DNxHD movie

Waveform with correct levels

Waveform with correct levels

THE INVESTIGATION: RGB? BT.709? 4:2:2? confusion!

I imported the movie files in numerous applications on Windows like Premiere Pro (CS6 & CC), Speedgrade (CS6 & CC), After Effects (CS6 & CC), Eyeon Fusion and Davinci Resolve.

I inspected the recorded movie files with the little tool called MediaInfo which is available for many platforms (Win, Mac, Linux, etc.).
When looking at the header information, the recorded movies, either recorded as ProRes or as DNxHD have the same colorspace information BT.709 in it.
So far so good, but after remuxing booth movie files with ffmpeg for testing if there is any change, the ProRes movie file had the exact same settings in the header, but the movie recorded with the DNxHD codec did not have the BT.709 colorspace information in it’s header.

So what did happen?

FFMPeg is capable of remuxing movie files. That means splitting video and audio streams, analyzing them and rejoining them correctly without re-encoding the movie while keeping the original information in the streams without quality loss.
The good thing is, that after remuxing, the DNxHD movie file’s header information seems to be corrected and is beeing displayed with perfectly right video-levels when imported to Premiere Pro and other NLE’s or Compositing applications which is GREAT!!
AVID’s DNxHD codec is very sophisticated and delivers very good quality moving images which contains even less micro-noise compared to the already great ProRes codec.

What I think is wrong here is that DNxHD movies seems to need to be set to RGB Levels when created – at least with 8-bit 4:2:2 material.

The only application that imported original DNxHD material correctly is Blackmagic’s Davinci Resolve. The black levels and gain are displayed correct in the pupular grading application.
So until a official solution is available, this is the fix for ist.

Test scene recorded with Ninja2 using AVIDs DNxHD codec in 180mbit 10bit

Test scene recorded with Ninja2 using AVIDs DNxHD codec in 180mbit 10bit


 

HOW TO SOLVE IT: Remux DNxHD with ffmpeg

ReMUX DNxHD files with ffmpeg to get correct header information set in movie files. It’s a fast and reliable method that even copies timecode settings from the movies but dont touches codecs itself, only the headers are corrected.

It’s a commandline based multiplatform tool with tons of options and is able to convert virtually any video and audio format into another.

Below is the snytax for doing just a remux on quicktime containers.

ffmpeg -i "inputmoviefile.mov" -vcodec copy -acodec copy "outputmoviefile_remuxed.mov"  

Be sure to download the latest version of ffmpeg, some earlier versions have bugs in the timecode-conversion!

If you found this helpfull or have some questions, feel free to share in the comments below.

Found a typo or mistake, please feel free to inform office@ntown.at. Thanks for reading.
Article written by Patrick Zadrobilek on 26.Nov.2013 (updated on 6.Dec.2013)


Subscribe to our Newsletter and get a special discount for our Webshop and a LUT Gift Package!


Comments (5)

Jo

Great! Now that’s taken care of.

4 years ago
George Kalogeris

works great, I stopped messing up with levels in pp.
Thanks a lot mate

4 years ago
Roland

Hi Patrick,

What kind of holder do you use for the ninja? It’s a short one, that looks very smart. Thanks, Roland

4 years ago
@
×

BE FIRST TO KNOW

Stay informed with our latest Production News, Tutorials, Freebies and Products at NTown.