19
Apr
11

Panny GH2 + HDMI + Recorder = BINGO!

UPDATE: Jorgen Escher has made a Quickstart ready-to-run archive. If the instructions below are above your station, don’t feel ashamed to jump to this post by Jorgen.  

!! Warning: ADVANCED ABRACADABRA STUFF AHEAD !!

Much debate has been going on on the web about the feasibility (can it be done) and the quality (is it clean?) of recording from the Panasonic GH2 camera’s HDMI output.

With the release of the Atomos Ninja (a sub 1000$ 4:2:2 Prores field recorder), and of course by using PC capturing cards such as the Black Magic cards, the GH2 HDMI signal can be captured without a problem.
But before you’all start whooping and cheering, let me warn you that – in order to get editable footage – there is a special workflow required.

Let us first look at the workflow before, during and after recording – let’s say “on the set”:

  • Make sure the camera is switched off and connect the HDMI cable to both GH2 and recorder, switch on the GH2 and then switch on the recorder.
  • Select the Cinema 24 mode (24H)
  • I advise to use the Nostalgic picture style with all controls dialed down for flattest picture
  • Switch off the Highlight indication (this is outputted through the HDMI while recording!)
  • Make sure to insert a memorycard since we will be recording HDMI and AVCHD (camera) simultaneously
  • Start the GH2 recording FIRST
  • Now start the recorder
  • Stop the recorder first after the shot
  • Now stop the GH2
If you record the GH2’s externally as described above, your footage will be recorded without signal breaks, frame skips and/or other damage.
Because the LCD of the GH2 (and the HDMI output) use a degraded picture in live view mode, pressing record on the GH2 prior to recording from HDMI is an absolutely must.
If you use the Ninja, you’ll end up with a 4:2:2 Prores (HQ) recording, but – bummer – that’s not what actually arrived at the recorder’s input. The HDMI signal from the  has been described by Barry Green as “screwed up 4:2:0″, but other tests by Jorgen Escher shows that it’s really 4:2:2 that has been deliberately crippled by Panasonic to make the camera less interesting for professional vido use. This “cripple” mainly exists of timing disturbances, applied to both the video timing (“field cadence”) as well as the timing of the separate chroma channels.
Despite everything, HDMI recording eclipses the AVCHD recording in many ways, such as:
  • More detail in shadows (less muddy blacks)
  • No compression artifacts
  • Better overall detail
  • Better color rendition
  • Different noise pattern (finer)
  • Less pronounced solarization (a.k.a. color-banding -> yes, this is an 8 bit camera)
Watch out for this drawback: the GH2 does not output sound on it’s HDMI! So you’ll have to use the sound from the AVCHD recording, or feed sound into your recorder.
But, without any special further processing of our footage, the following artifacts will be immediately noticeable:
  • A double or missing frame “hick-up” approximately every second
  • Red shift (red bleed)
  • Gamma shift (washed out) on mac
  • Sound we have a .7 second delay, throwing mouths out of sync

At first glance, the HDMI recorded footage is absolutely useless and it will scare the hell out of you if directly loaded into an editor.

But here my personal heroes “Ralph B”, “PDR” and “GrgurMG” – senior members of the popular  DVXUser site -come to the rescue!
They have developed a marvelous script for a program called “AviSynth” that will process all your GH2 HDMI footage in 100% usable, editable 4:2:2 footage! All problems solved!
This makes the GH2 + Ninja combo a match made in heaven! Considering that we are talking about a sub-2000$ solution!

The pros of the workflow using the AviSynth solution are:

  • Fixes frame and field timing (cadence) inconstancies
  • Fixes color shifts
  • Fixes gamma issues
  • Fixes sound sync issue
  • Will do conversion to other codecs on the fly
  • If you’re using a Ninja, you want to backup or transfer your footage to another system anyway, so running it through AviSynth does not necessarily means an outrageous complication of your workflow.
  • Batch processing
  • A lot of AviSynth help, information, examples and fora to be found on the web

The cons of the AviSynth route are:

  • It’s a Windows based solution, so it should either run on a Windows PC or in a Virtual PC environment on your mac (e.g. VirtualBox = free). We now use a dedicated cheap Windows7 barebones system for the job.
  • You can not write the processed footage back to ProRes, because there is no PC/Windows ProRes codec that will write files – only read. The solution is to use either the build-in huffyuv lossless codec, Cineform (not free), AVCHD or the Avid DNxHD 4:2:2 codec (free). The latter has a MOV wrapper and can be imported directly in your Mac’s NLE.
  • You will have to download and install several programs and execute one or two by hand – if you’re a real PC novice, this will probably blow your brains out – as for the rest: you’re probably safe.

So, where do i get started?! Here: http://www.dvxuser.com/V6/showthread.php?237584-HDMI-Capture-Problem-SOLVED-AviSynth-RULES!

Remember the following important facts about AviSynth:

  • AviSynth is a non-visible running-in-the-background kind of tool, you install it and that’s it
  • You use a standard text editor such as Notepad to write or edit the script. You need to rename the file to have the .avs file extension.
  • The program that executes the script is a batch file that calls another program “called FFMpeg” that takes care of the creation of the output file
  • Do not be alarmed by all this, AviSynth, FFMpeg and the other tools are available with one-click installers and need no further attention when installed.
  • You will find a shopping list below with all download locations and installing instructions

As a Mac FCP user, i have altered the original script in the following way: removed the color correction because i don’t want any detail smoothing and added gamma correction. Here is the script we now use with the Ninja recorder footage:

LoadPlugin("C:\Program Files\AviSynth 2.6\plugins\QTSource.dll")  # change paths to your plugins location
LoadPlugin("C:\Program Files\AviSynth 2.6\plugins\TIVTC\TIVTC.dll")
LoadPlugin("C:\Program Files\AviSynth 2.6\plugins\FDecimate\FDecimate.dll")
QTInput("C:\Program Files\AviSynth 2.6\PROCESSING09.mov") # change to your input file location
AssumeTFF()
TFM(mchroma=false, pp=5)
FDecimate(threshold=0.5)
delayaudio(.07)
AssumeFPS(24000,1001)

# Chroma Fix - Optional, but highly recommended
FixBrokenChromaUpsampling()
ConvertToYUY2() 
# Mac users gamma correction
ColorYUV(gamma_y=-34, gamma_u=-34, gamma_v=-34)

# end of AviSynth script.
The batchfile i use for passing the AVS scripts (for each MOV file) to ffmpeg/avisynth looks like this:
for %%a in ("*.avs") do ffmpeg -i %%a -vcodec dnxhd -b 175M -an %%~na.mov
pause

Resulting in 175MBit DNxHD MOV files.

Still with me?

What you need to download and install on your Windows PC:

After installation of all the above, edit the script with Notepad or other text editor in such a way that all paths are pointing to the correct folders. You can also copy the necessary DLL files to one Plugins folder of your choice. File extension should be .avs
Finally, create a batch file (.bat) with Notepad or other text editor containing the batch file code above. File extension should be .bat
Run the .bat file. FFMpeg will start in a console window and reports any errors or progress. The resulting file will be named after the .avs script and will reside in the same folder as the avs script.
Phew…! That was heavy – but very worthwhile!
Many thanks to the magicians at DVXuser! Do not forget to check out the original script for non-mac users
About these ads

28 Responses to “Panny GH2 + HDMI + Recorder = BINGO!”


  1. April 20, 2011 at 3:56 am

    This is the deal. I am crossing my fingers I am going for it. I truely love the gh2 and I shot a feature on RED last year(heavy) now I’m going to shoot on the gh2. I nick name this solution you guys worked so hard on “Kunoichi”. Thanks a bunch.

  2. 2 Tam
    April 20, 2011 at 6:26 am

    Thanks for the detailed write-up on this. I’ve been trying to keep up with that thread on DVX user and but your process is very thorough.

    One thing I have not been able to verify, is the handling of 25fps over 50i.

    I do not wish to shoot in 24p for the most part, preferring to use 25p.

    My thought was to use one of the 50i modes on the GH2, then record externally to the Atomos Ninja in ProRes, and de-interlace in software. Using Apple Compressor (or Telestream Episode) should yield a clean 720p by discarding one field. (or an overcrank effect if using Optical Flow interpolation)

    Is this possible, or is there some “crippled” field behaviour over the GH2’s HDMI out that will deny even this workflow?

    In short, is the 50i output from GH2 to the Ninja “normal”?

    thanks again for the info,

    Tam

    Tam

  3. 3 marvelsfilm
    April 20, 2011 at 9:28 am

    Same here! We’re going to do a number of documentaries with interviews next month, and that’s all about skin colors. There will be a lot of dolly shots as well. That’s really going to be the maiden voyage for this setup.
    I spent so much time on this project, including talks and tests with Panasonic, that if the GH2 or Ninja leaves us in the lurch, i’ll take my colleague’s Ninja sword and Kunoichi on it’s ass.

    Martin

  4. 4 marvelsfilm
    April 20, 2011 at 9:41 am

    Hello Tam.

    The problem seems as follows (and now i have to copy Jorg Escher on the matter); the GH2 embeds a 23.976p signal into a 47.95i stream by adding a 3:2 pulldown. There is nothing wrong with that and most recorders and monitors will report 50i as the input signal. But before the signal is sent to the HDMI port, the GH2 repetitively adds additional fields OVER A PERIOD OF TIME to output a through 50i signal. Trying to remove the pulldown from that signal will leave you with a 25p stream with double or missing frames. There is no way of getting 25p out of a 23.976p camera without altering the timing, and it il always look weird.
    So, the GH2’s 50i is absolutely NOT normal (read: a big mess).

    Martin

  5. 5 David P
    May 16, 2011 at 10:08 pm

    This news is amazing! But I’m still a bit skeptical, when will footage be available to compare with de AVCHD? If this option turns out to be feasible, it will help independent (pennyless) filmakers to get high quality footage on tight budgets! Either way thanks a bunch for all your work!

  6. June 16, 2011 at 1:33 am

    Wow! Thanks for this very friendly step by step! Thanks

  7. 7 marvelsfilm
    June 16, 2011 at 10:21 pm

    Hi David. We’re shooting a whole series of tests the coming weeks, and have also done a few myself and I can say the HDMI/avchd difference is huge! Absolutely the way to go, but I’ll post side by side shots as soon as possible.

    Cheers,

    Martin

  8. June 17, 2011 at 10:25 am

    Hi Guys,
    Have you ever done : GH2 mini HDMI out to mini HDMI Cineroid EVF to HDMI in on Ninja ?
    Do you think this sequence would work? My guess is it would.

    I hope to do this test at the end of the month.

    Cheers
    Partho

  9. 9 alex
    June 27, 2011 at 3:16 am

    Have you guys used JES Deinterlacer yet?

  10. 10 marvelsfilm
    July 16, 2011 at 10:55 am

    Yes, but it did not such a good job.
    Solved it with Avisynth.

    Martin

  11. 11 marvelsfilm
    July 16, 2011 at 10:56 am

    Sure that will work! Interested to hear what you find.

    Martin

  12. July 20, 2011 at 4:45 am

    You stated:

    “Much debate has been going on on the web about the feasibility (can it be done) and the quality (is it clean?) of recording from the Panasonic GH2 camera’s HDMI output.

    With the release of the Atomos Ninja (a sub 1000$ 4:2:2 Prores field recorder), and of course by using PC capturing cards such as the Black Magic cards, the GH2 HDMI signal can be captured without a problem.
    But before you’all start whooping and cheering, let me warn you that – in order to get editable footage – there is a special workflow required.”

    Question:
    So, will this process work (theoretically) using the output from the new BlackMagi Design HyperDeck, as it works with Ninja footage; the same process? Or, are we going to have to jump through more hoops if we use the HyperDeck HDMI (orDH-SDI) output?

    Also, THANKS for a great job. Hope a firmware hack will simplify this workflow by about 20 steps though. : )

    Dorian

  13. 13 marvelsfilm
    July 22, 2011 at 7:12 pm

    Dorian.

    No, there are no more hoops or loops to take. The Hyperdeck footage is perfectly OK to use instead of the Ninja footage. Any 24p->60i or 25p->50i footage will do.

    Martin

  14. 14 paolo
    July 31, 2011 at 8:17 pm

    hi there,

    got the GH2 and coupled with BlackMagic Hyperdesk shuttle.
    At this stage I strongly recommended noy to buy it.. go with the ninja instead. This unit is not working properly with the GH2.
    I am escalting this to support but it all seems dead slow and not really solving the problems.

    I spent tons of times doing countless tests.
    Here are my results:

    BM HDshuttle

    – won’t capture if record is pressed on GH2. It captures only if GH2 is left live and we all know what that means.
    – will auto stop recording after nearly 1 min and a half for unknown reasons
    – it writes messed up 134mb clips to the SSD, after a while you have to reformat the whole thing
    – it does not unmount SSD so there are few quibbles when attached back to the PC for reading
    – it requires a docking unit or a sata to usb cable, you can not run the SSD from the unit
    – instructions are appaling
    – no software supplied I had to go bananas to find a suitable codec to run its .mov files

    I got footage and worked it out with the Script, I had loads of problems related to uknown causes but finally I manged to get through

    I feel that 4:2:2 uncompressed is a professional way and you do not want to be checking a recording device when on the field. You press record and you forget about it.

    On the top of this I had a month waiting for the BM HDshuttle to come along, apparently there were some issues. And still in there!! I know it’s dead cheap but at the end of the day all it matters is results..

  15. 15 marvelsfilm
    August 8, 2011 at 8:28 am

    Hello Paolo.

    The Ninja and the much more expensive NanoFlash are the only stand-alone devices known to record the GH2 signal correctly. I assume that the Hyperdesk shuttle refuses to record if the signal is not clean as per HDMI specs. The famous duplicate fields / messed up cadence of the GH2 is probably recognized as rubbish by the recorder. And it is right in it’s ow way of course ;-) Stick with the Ninja!
    I’ve been looking at the Hyperdeck Shuttle. The unit price is low (below 400 euro’s), but the SSD media still is expensive; you’ll end up paying the same as for a Ninja WITH recording media.

    Success and regards,

    Martin

  16. 16 paolo
    August 8, 2011 at 3:14 pm

    Hi Martin,

    thanks for replying.
    I guess you’re right. Odd things happened though.. the ‘live preview’ signal could be recorded correctly, the ‘ recording’ one could not be stored for love or money. Besided the GH2 HDMI had to be set to 1080i, the ‘auto’ setting did not work.
    There are some additional probs with the Blackmagic device, due to the HFS+ format and Windows.
    I will indeed buy a Ninja.

  17. 17 locke
    August 9, 2011 at 1:34 am

    Great info hare, clear, well organized data, nice job, thanks! Any chance to add some info on the aja ki pro mini? I have the GH2 and ki pro mini set-up. Been doing first round of tests. Looks fantastic, really blown away by the sharpness and detail of the footage. My first tests have been with 1080i. The HDMI output… I believe is 60i (the ki mini calls it 30i). With all the talk about cadence issues, i’ve been trying to do some pixel peeping. Converted to 29.97 with cinema tools then brought into fcp7 (pro res files from ki mini) seem to play fine (out mxo to sony bravia and sony trinitron SD) But… when looking at pulled still frames and showing both fields out, or viewing in quicktime player, seems to have some motion issues, not sure if im looking at classic interlacing issues or cadence problem. Looking to confirm that all is working at a pro level before dumping my ex3 and buying the rest of the accessories for this set-up. Any info is appreciated. Thanks!

  18. March 2, 2012 at 10:42 pm

    Hi, i want to know if i can get the final (DNxHD) footage uncompressed 4:2:2, 1080p. Im targeting for a DPX conversion (from apple color or after effects) for film out to put it in theater (if u know what i mean). I see it’s been a while for this article, so please martin if you can, enlighten me. Please also tell how your ultimate result of the TV show came out, if possible post few samples.

    Regards
    Areful Eeslam

  19. 19 Jam
    March 27, 2012 at 8:39 pm

    Does anyone know if 2 GH2s can be synched using this for 3D work?

  20. 20 Alan Ross
    April 16, 2012 at 12:52 pm

    @ paolo

    It seems to me that you are an amateur because your “Points” are childish and noobish.
    I want to answer your points:

    * Capturing only while GH2 is alive: And? Whats the problem?
    * Stopping after 90sec: And? Is your SSD too small? I had no problems with 15mins recording!
    * records 130mb files. Reformat needed: All right 130 files but I did not reformat one time!
    * does not unmount SSD: What do you mean with that? I had no problems at all.
    * requires SATA Dock for PC transfer: Yeah. Right. Did you expect anything other from a REKORDER?????
    * no software bundles: And? I dropped it in FCP and doesnt need any codec. You sound like a noob.

    I used it with EX3, FS101 and GH2……it worked…ok the GH2 files are “messup up” HDMI because of the “sabotage” by Panasonic. The Rev.2 with Avid Codec support allows easy workflow in other NLE.

    So….paolo…please…dont tell dumb stories here because you are not “experienced” enough to work with pro equipment.

    Thanks and regards
    Alan

  21. 21 paolo
    May 4, 2012 at 9:16 pm

    Alan your attitude stinks. Apart from the fact that this was 1 year ago, so what is the point of biting like that and even replying god knows .. try to be more understanding and humble in life. BM was recognized as not working when coupled with GH2 after a very experienced tech had a thorough look at it.
    And by the way, I have 20 years worth of cinema experience, credited on IMDB so you might as well shut the hell up.

  22. 22 zcream
    May 17, 2012 at 3:17 am

    Hi Martin. Can you cite or post the tests that Jorgen did to check if the signal was actually 4:2:2 and not 4:2:0 ? I have the GH2 and am not able to find much of a difference between the hacked AVCHD and the recorded signal.

  23. 23 zcream
    May 17, 2012 at 3:19 am

    hi Martin. Just in case my earlier comment did not go through. This was a request to post the tests that Jorgen did to show that the GH2 actually outputs 4:2:2 and not 4:2:0

  24. 24 Florian Jenett
    October 2, 2012 at 11:28 am

    DNxHD codec seems to have moved to a new URL:

    http://avid.force.com/pkb/articles/en_US/Download/en423319

  25. 25 Film shooter
    November 11, 2012 at 12:56 pm

    G’Day fellow video guys and thanks for this site and postings.

    I purchased the new Atomos Ninja2 and the GH2 has long since had a firmware update since this post….

    I have found issues in 1080p25 on the Ninja2 with GH2 – Vertical Aliasing and black screen drop out.

    But better in this setup;

    1080i50 – ProRes 422 Codec with the GH2 set to in Cinema (24H) 1920×1080 pixels Approx 24Mbps. Picture Style “Smooth” with (Contrast -2, Sharpness -2, Saturation 0, Noise Reduction -2)

    I’m still testing to confirm the best setup but will hopefully have a complete result we can build from.

    Peace :-)

  26. December 19, 2012 at 11:24 pm

    I have just received the Ninja 2 and trying to get the workflow set up on my Wndows 7 machine, per these articles but I’m having some very vague, hard to detect issues, its just not working and not much in the way of error messages, anyone available or willing to talk with me to assist in setting this up?

  27. 27 Martin Stancik (ms)
    November 27, 2013 at 2:27 pm

    Hi all,

    Thank you for great article!

    Last versions of FFMPEG support ProRes encoding.

    https://trac.ffmpeg.org/wiki/vfxEncodingGuide#Prores

    br, (ms)


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s


twitter.com/martinbeek

Blog Stats

  • 1,442,818 hits

Ad


Follow

Get every new post delivered to your Inbox.

Join 1,674 other followers

%d bloggers like this: