HDMI Capture Problem SOLVED - AviSynth RULES!

I've found two remarkable things!
1) my HDMI output and interlaced footage is now 25fps instead of 23.976 since i've updated myGH2 firmware and set it to PAL
2) even with assumefps(25000,1001) and/or ScriptClip, does every file longer than approx. 774-776 frames crash with an error

Questions:
  • what should i do to change the script to process 25fps?
  • why does everything work fine up to 774-776 frames?
  • should i reverse to shooting in 24p ntsc on the GH2?
I need to salvage my footage that i have here, because it's a unique one-time-event registration.
Any help is welcome!!

Martin
 
I'm suspecting a filesize issue, maybe your virtualization os has a 4GB limitation like Fat32 ? - That could be why it always crashes at that point and filesize.

You would never use AssumeFPS(25000,1001), for pal it would be AssumeFPS(25)

If your footage was shot at 50i (camera was set to interlaced 50i), then it's already 50i , correct? Then there's nothing to process. What are you trying to do or "salvage"? If it's true 50i content , you could deinterlace it to 25p

And if you don't know what it is, it might be a good idea to post a sample; one with motion, preferrably panning
 
Hello PDR.

I run this on a brand new Win7 PC, dedicated for the job.

The GH2 footage still has duplicate frames (hdmi cripple), therefore i need the avisynth "hack". It seems to be the part before filldrops(), because commenting that out does not help.

Here is an example of a file that does NOT work - tried everything, including your recent suggestions; crashes at frame 775:
http://mediatube.marvelsfilm.com/026.zip (897 mb)


I'm suspecting a filesize issue, maybe your virtualization os has a 4GB limitation like Fat32 ? - That could be why it always crashes at that point and filesize.

You would never use AssumeFPS(25000,1001), for pal it would be AssumeFPS(25)

If your footage was shot at 50i (camera was set to interlaced 50i), then it's already 50i , correct? Then there's nothing to process. What are you trying to do or "salvage"? If it's true 50i content , you could deinterlace it to 25p

And if you don't know what it is, it might be a good idea to post a sample; one with motion, preferrably panning
 
Hi Martin, the original script works ok for me, no crashes , but it produces 2 glitches on that sample (frame out of order), one around frame 47, the other around frame 280. This is unrelated to the "crashing" that you are getting - I am able to encode either script to completion with ffmpeg

This script works ok for me without the glitches:

ffmpeg -i input.avs -vcodec v210 -an -r 23.976 output.mov

Code:
QTInput("026.MOV")
AssumeTFF()
TFM()
TDecimate(mode=7,rate=23.976)
AssumeFps(24000,1001)
FixBrokenChromaUpsampling() 
ConvertToYV12()
FillDrops()

1) Can you preview the script in vdub? Can you scrub to the point where it crashes for you (frame 775)? or past that point ?

2) What is the EXACT error message you are getting?

3) What version of quicktime are you using ?

4) What version of ffmpeg are you using ?

5) What version of QTSource.dll are you using?

6) Are you using an external HDD that is Fat32 formatted ? To rule out a file system issue, try encoding with something smaller bitrate like dnxhd 175, just for testing purposes

Because each file that crashes is a certain filesize, that is very suspicious of a write limitation
 
Pdr. I will get back to you this evening, but one question in advance re. the code; since the input is 25fps, do I need to change some parameters accordingly? Martin
 
Pdr. I will get back to you this evening, but one question in advance re. the code; since the input is 25fps, do I need to change some parameters accordingly?


What FPS was the AVCHD recording? I though 25fps doesn't work? or does the hack enable that now ?
 
First of all: PROBLEM SOLVED!
What differs from my script is TDecimate instead of FDecimate and... i´ve switched off the Norton Antivirus (!?!) and all seems to be ok! Have not yet transferred to FCP, but this looks very promising!

Weirdly enough, the avchd is now an interlaced 47.952 stream! I personally don´t mind, but the latest firmware hack seems to do something peculiar to the avchd encoder.
I assume that the HDMI recorded file (026.mov) that i've provided is 23.976 in a 50i stream?

Martin

Martin
 
I assume that the HDMI recorded file (026.mov) that i've provided is 23.976 in a 50i stream?

That's what it looks like to me from the small sample. You would normally check the simulataneous AVCHD recording to be sure, but since the hack changed things... not sure you can say anything with certainty.

I would be careful about swapping firmware in the middle of a project
 
PDR. Before i start processing my whole batch; just to clarify: should i keep using TDecimate or FDecimate?

Thanks for all your support! Great stuff. Will post an edited demo clip soon.


Martin
 
PDR. Before i start processing my whole batch; just to clarify: should i keep using TDecimate or FDecimate?


I don't know; for whatever reason, FDecimate got a few frames out of order on that last sample. You can adjust the settings & threshold

If I were you, I would preview some longer clips before doing the batch, and do some tests

This doesn't help your current project, but if you wait long enough, maybe VK will "fix" everything :)
 
did anyone tried to capture the HDMI output with a BM Hyperdeck Shuttle and would the avisynth trick work with that type of recorder?
 
did anyone tried to capture the HDMI output with a BM Hyperdeck Shuttle and would the avisynth trick work with that type of recorder?

I haven't tried it, but Hyperdeck Shuttle should work fine. According to it's specs, it can record at 1080 60i, which is what you need. Since it records to Quicktime, you will need to have qtsource.dll in the Avisynth plugin folder, and use "qtinput" in the script.
 
Blackmagic HyperDeck shuttle

Blackmagic HyperDeck shuttle

hi there,

hopwfully you lots can help me out. I do own a Blackmagic HyperDeck Shuttle.
My GH2 is a pal version and the .mov files recorded out of the HDMI port by the shuttle are seen by Quicktime as 25 frames per second, bit rate 1.12 gb.
Now: I run the scipt as per Jorgen Escher's instructions and I get

[dnxhd @ 002DDCA0] video parameters incompatible with DNxHD

error. How do I manage this? quicktime dll and everything else seems to be in place. I tried to vary the original script

vcodec dnxhd -b 175M

with 120M and 185M, according to dnxhd specs realting to 50i or 25p, but no joy..
using win 7 64 bits btw
 
hi there,

hopwfully you lots can help me out. I do own a Blackmagic HyperDeck Shuttle.
My GH2 is a pal version and the .mov files recorded out of the HDMI port by the shuttle are seen by Quicktime as 25 frames per second, bit rate 1.12 gb.
Now: I run the scipt as per Jorgen Escher's instructions and I get

[dnxhd @ 002DDCA0] video parameters incompatible with DNxHD

error. How do I manage this? quicktime dll and everything else seems to be in place. I tried to vary the original script

vcodec dnxhd -b 175M

with 120M and 185M, according to dnxhd specs realting to 50i or 25p, but no joy..
using win 7 64 bits btw


type info() at the end of the script, what frame rate does avisynth report when you preview the script ? and what are the reported dimensions of the clip ? (i.e. open the .avs in vdub , it should tell you in the left hand corner)

also, some ffmpeg builds express bitrate in bits -b 175000000 would correspond to 1920x1080p24 , others would use -b 175M
 
to PDR

to PDR

Hi there PDR,

thanks for helping.

Where should I type this "info ()" line? and just add it like that, no hyphen or other in the brackets?
my script is:


for %%a in ("*.avs") do ffmpeg\bin\ffmpeg -i %%a -vcodec dnxhd -b 185M -pix_fmt yuv422p -an %%~na.mov
pause


in another folder named INACTIVE AVS I have more scipts


CHROMAFIX

LoadPlugin("C:\GH2_AviSynth\plugins\QTSource.dll")
LoadPlugin("C:\GH2_AviSynth\plugins\TIVTC\TIVTC.dll")
LoadPlugin("C:\GH2_AviSynth\plugins\FDecimate\FDecimate.dll")
QTInput("C:\GH2_AviSynth\PROCESSING\Capture0002.mov")
AssumeTFF()
TFM(mchroma=false, pp=5)
FDecimate(threshold=0.5)
delayaudio(.07)
AssumeFPS(25000,1001)

# Chroma Fix - Optional, but highly recommended
FixBrokenChromaUpsampling()
# Seperates the YUV channels. YV24 seems neccessary for the split and remerge to work.
ConvertToYV24(chromaresample="spline36")
Y = Tweak(sat=0, coring=false)
U = UToY()
V = VToY()
# Shifts the YUV channels individually. In this case subpixel(halfpixel) shifting.
U = U.Spline36Resize(u.width,u.height,0.5,-0.5)
V = V.Spline36Resize(v.width,v.height,0,-0.5)
Y = Y.Spline36Resize(y.width,y.height,0,0.5)
# Manually squeezes the chroma down to 4:2:0 and back. Prevents further shifting.
U = U.Spline36Resize(u.width,u.height/2)
V = V.Spline36Resize(v.width,V.height/2)
U = U.Spline36Resize(u.width,u.height*2)
V = V.Spline36Resize(v.width,v.height*2)
# Recombines individual YUV channels.
YToUV(U,V,Y)
# Depending on the source file you may need to convert from YV24 back to YUY2/YV12.
ConvertToYUY2()


MARVEL

LoadPlugin("C:\GH2_AviSynth\plugins\QTSource.dll")
LoadPlugin("C:\GH2_AviSynth\plugins\TIVTC\TIVTC.dll")
LoadPlugin("C:\GH2_AviSynth\plugins\FDecimate\FDecimate.dll")
QTInput("C:\GH2_AviSynth\PROCESSING\Capture0002.mov")
AssumeTFF()
trim(1,0)
TFM(mchroma=false, pp=5)
FDecimate(threshold=0.5)
delayaudio(.07)
AssumeFPS(25000,1001)

# Chroma Fix - Optional, but highly recommended
FixBrokenChromaUpsampling()

ConvertToYUY2()


and the last one is MARVELS_GAMMACOR


LoadPlugin("C:\GH2_AviSynth\plugins\QTSource.dll")
LoadPlugin("C:\GH2_AviSynth\plugins\TIVTC\TIVTC.dll")
LoadPlugin("C:\GH2_AviSynth\plugins\FDecimate\FDecimate.dll")
QTInput("C:\GH2_AviSynth\PROCESSING\Capture0002.mov")
AssumeTFF()
trim(1,0)
TFM(mchroma=false, pp=5)
FDecimate(threshold=0.5)
delayaudio(.07)
AssumeFPS(25000,1001)

# Chroma Fix - Optional, but highly recommended
FixBrokenChromaUpsampling()
#martin beek's mac gamma fix (-0.85) - experimental between -40 and -30
ColorYUV(gamma_y=-37, gamma_u=-34, gamma_v=-34)

ConvertToYUY2()

Besides there is a difference in running the scipt as an admin or not in win7, it does nothing if run as an admin actually
 
at the end of the script, after ConvertToYUY2()

Check it before you run the batch file (open the avs in vdub). You want to narrow down where the problem is occurring

Also post all the information that ffmpeg gives you in the commandline box

Isn't the PAL version 24p embedded in 50i stream? or do you care about audio recorded separately (it will be out of sync if you use AssumeFPS(25) ) . The script should return 24p, similar to what was recorded in camera AVCHD. AFAIK there is no 25p for GH2, unless the firmware hack enabled it ?

Also - 25000,1001 isn't a valid number (PAL is 25.0 FPS not 24.97), the number is 24000,1001 for 24000/1001 or 23.976 fps for NTSC regions
 
ok PDR,

done my homeworks.
Basically the previuos error was generated becaused the script could not find some of the files during the LoadPlugin function.
The error is quite misleading I must say. I corrected the files location and the script run after I corrected it with your indications.

So I have
1. process_all.bat

for %%a in ("*.avs") do ffmpeg\bin\ffmpeg -i %%a -vcodec dnxhd -b 175M -pix_fmt yuv422p -an %%~na.mov
pause


2. gh2_chromafix
LoadPlugin("C:\GH2_AviSynth\plugins\QTSource.dll")
LoadPlugin("C:\GH2_AviSynth\plugins\TIVTC\TIVTC.dll")
LoadPlugin("C:\GH2_AviSynth\plugins\FDecimate\FDecimate.dll")
QTInput("C:\GH2_AviSynth\PROCESSING\Capture0002.mov")
AssumeTFF()
TFM(mchroma=false, pp=5)
FDecimate(threshold=0.5)
delayaudio(.07)
AssumeFPS(24000,1001)

# Chroma Fix - Optional, but highly recommended
FixBrokenChromaUpsampling()
# Seperates the YUV channels. YV24 seems neccessary for the split and remerge to work.
ConvertToYV24(chromaresample="spline36")
Y = Tweak(sat=0, coring=false)
U = UToY()
V = VToY()
# Shifts the YUV channels individually. In this case subpixel(halfpixel) shifting.
U = U.Spline36Resize(u.width,u.height,0.5,-0.5)
V = V.Spline36Resize(v.width,v.height,0,-0.5)
Y = Y.Spline36Resize(y.width,y.height,0,0.5)
# Manually squeezes the chroma down to 4:2:0 and back. Prevents further shifting.
U = U.Spline36Resize(u.width,u.height/2)
V = V.Spline36Resize(v.width,V.height/2)
U = U.Spline36Resize(u.width,u.height*2)
V = V.Spline36Resize(v.width,v.height*2)
# Recombines individual YUV channels.
YToUV(U,V,Y)
# Depending on the source file you may need to convert from YV24 back to YUY2/YV12.
ConvertToYUY2()

the .mov files I got could not play in quicktime. I get

CAVISTREAMSYNTH: SYSTEM EXCEPTION - Acess Vilation at 0x1a5843e, reading from 0xdc047482

running the avs scipt in virtual dub gaves me the same message!
 
Back
Top