Posts Tagged ‘recording

27
Apr
11

GH2 HDMI recording AviSynth script update

Terrific news from DVXUser member Ralph B!

This is an update of the advanced script to convert footage recorded from the Panasonic GH2 HDMI output, using AviSynth, as posted on April 24, 2011, and it superceeds the original script. (see below for more info)
ADVANCED SCRIPT TO PROCESS 1080 24P FOOTAGE:

 
#change paths to point to your plugins:
LoadPlugin("C:\Program Files\AviSynth 2.5\plugins\TIVTC.dll")
LoadPlugin("C:\Program Files\AviSynth 2.5\plugins\FDecimate.dll")
LoadPlugin("C:\Program Files\AviSynth 2.5\plugins\mvtools2.dll")
#optional for Prores MOVs, uncomment if necessary:
#LoadPlugin("C:\Program Files\AviSynth 2.5\plugins\qtinput.dll")

# for AVI:
avisource("Your HDMI movie.avi")
# OR for ProRes movies, use (and uncomment) the following line and remove the avisource line above
# qtinput("Your HDMI movie.mov") 

function filldrops (clip c)
{
  even = c
  super_even=MSuper(even,pel=2)
  vfe=manalyse(super_even,truemotion=true,isb=false,delta=1)
  vbe=manalyse(super_even,truemotion=true,isb=true,delta=1)
  filldrops_e = mflowinter(even,super_even,vbe,vfe,time=50)
  ConditionalFilter(even, filldrops_e, even, "YDifferenceFromPrevious()", "lessthan", "1.3")
}

# 3:2 Pulldown Removal
AssumeTFF()
trim(1,0)
TFM(mchroma=false)
FDecimate(threshold=0.5)
AssumeFPS(24000,1001)

# Chroma Fix
FixBrokenChromaUpsampling()
converttoyv12()

# Fix Residual Duplicates
filldrops()

#Audio Delay
delayaudio(.07)

# Show the Metric for filldrops
# This is a diagnostic to determine the threshold "lessthan" in the ConditionalFilter
# To run, remove the # in the line below and put a # to the left of filldrops() 7 lines above
# ScriptClip(last,"Subtitle(String(YDifferenceToNext() ))" )

mvtools2.dll is here:
http://avisynth.org.ru/mvtools/mvtools2.html

Please read the original article(s) on this blog, AND read the uber-original article on:
http://www.dvxuser.com/V6/showthread.php?237584-HDMI-Capture-Problem-SOLVED-AviSynth-RULES!

THE ABOVE IS A SCRIPT FOR “AVISYNTH” AND ONLY RUNS ON WINDOWS PCs!! READ THE FIRST PAGE OF THE LINK ABOVE

20
Apr
11

GH2 HDMI AviSynth QuickStart Archive

This unbelievable guy Jorgen Escher (colorbyjorg.wordpress.com / twitter.com/colorbyjorg) – who never ceases to amaze us – has did some homework last night after my GH2->AviSynth post and has come up with a ready-to-run quickstart zipfile that makes life a lot simpeler for all going the GH2 AviSynth route!

The zipfile that you can download from his blog contains everything you need including installers, a ready-to-run directory structure + scripts.

Follow the instructions at http://colorbyjorg.wordpress.com

Great stuff!!

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



twitter.com/martinbeek

Blog Stats

  • 1,429,557 hits

Ad


Follow

Get every new post delivered to your Inbox.

Join 1,674 other followers