HDMI Capture Problem SOLVED - AviSynth RULES!

Problem solved

Problem solved

Great news! I've solved the "DNxHD Mac conversion problem"!
I've ran the DNxHD file through the freeware utility "MPEG STREAMCLIP", saving it as ProRes444 and the whole signal range is correctly translated to ProRes444 YCbCr and definitely not to RGB.
Signal on scopes is now identical to Ninja HDMI recording.
Wow!

And indeed, DNxHD looks so much better than XDcamHD.

A great relieve...


Martin
 
Is this necessary also for PAL footage or only applies to NTSC? Can it be done on a Mac?

Thanks

If you're shooting 24P through the HDMI with a PAL GH2, then yes, you will need to fix the footage. Avisynth is the best (and perhaps only) way to do this correctly. As you probably know, Avisynth is a Windows program and does not run on a Mac. However, there are several ways to run Windows on a Mac. MartinBeek has successfully implimented an Avisynth workflow on a Mac. I suggest you study his posts in this thread.
 
Hello all, and PDR and RalphB in particular.

Since you have proven to have much better eyes (or monitoring) than i, can you please have a look at the resulting footage when doing the conversion "back to mac" using MPEG StreamClip to get all levels and gamma right for use in FCP.

The original AviSynth DNxHD clip and the resulting MPEG StreamClip ProRes444 clip can be downloaded here: http://www.megaupload.com/?d=DIF7KJN8 (501 MB)

To my eye, levels look OK now in FCP and conversion is very fast.
My question to you is, if it is a lossless process and if you can spot any anomalies in either the levels, sharpness or color.

Thanks a bunch!

Martin Beek
 
Hello all, and PDR and RalphB in particular.

Since you have proven to have much better eyes (or monitoring) than i, can you please have a look at the resulting footage when doing the conversion "back to mac" using MPEG StreamClip to get all levels and gamma right for use in FCP.

The original AviSynth DNxHD clip and the resulting MPEG StreamClip ProRes444 clip can be downloaded here: http://www.megaupload.com/?d=DIF7KJN8 (501 MB)

To my eye, levels look OK now in FCP and conversion is very fast.
My question to you is, if it is a lossless process and if you can spot any anomalies in either the levels, sharpness or color.

Thanks a bunch!

Martin Beek

Martin,

Are these two clips supposed to be identical? Because they're not. Here's what I did, and you can do the same. I rendered a single frame of each clip as a still image and brought them into Photoshop. Copy one and paste it over the other. Then use Ctl/Cmd Z to toggle between them. There is clearly a gamma shift between them. The good news is there is no difference in fine detail - everything is preserved.

Have you tried rendering the Avisynth output to the Matrox codec I mentioned on the previous page? I think it would be a worthwhile experiment. It may save you having to do a conversion when you bring the files into the Mac. Of course, you will have to install the Matrox codec on both the PC and Mac.
 
Martin,

Are these two clips supposed to be identical? Because they're not. Here's what I did, and you can do the same. I rendered a single frame of each clip as a still image and brought them into Photoshop. Copy one and paste it over the other. Then use Ctl/Cmd Z to toggle between them. There is clearly a gamma shift between them. The good news is there is no difference in fine detail - everything is preserved.

Have you tried rendering the Avisynth output to the Matrox codec I mentioned on the previous page? I think it would be a worthwhile experiment. It may save you having to do a conversion when you bring the files into the Mac. Of course, you will have to install the Matrox codec on both the PC and Mac.

I'm trying that right now. What would the ffmpeg command line (-vcodec) become for this codec? Can't find any info on that.

Thanks,

Martin
 
You won't be able to use ffmpeg for matrox ; it's a proprietary MPEG2 format (although free) . ffmpeg's MPEG2 encoder isn't that great, and cannot reach high enough bitrates

I mentioned this earlier, but if quality is the biggest concern, use uncompressed 10bit 422 aka v210. Bitrate is ~1000Mb/s so >5x the size of DNxHD 175 , but it's lossless

On windows, QT treats it as Y'CbCr, so it should treat the same on a Mac. Colors are the same as the Ninja Prores in QT

-vcodec v210



The beta version of FFMBC reports that DNxHD color is fixed for quicktime ; but I compiled that rc6 version and did some tests, and still colors differ from the Prores in Quicktime, at least on windows... maybe it hasn't been implented yet in that version, or there is a special switch I don't know about
http://code.google.com/p/ffmbc/

Changelog:
Fix DNxHD colors in Quicktime.
 
Last edited:
I'm trying that right now. What would the ffmpeg command line (-vcodec) become for this codec? Can't find any info on that.

Thanks,

Martin

Don't render using ffmpeg. Do it this way:

Install the Matrox Codec on your PC.
If you haven't already, install VirtualDub on your PC.
Drag and drop the Avisynth script onto VirtualDub.exe. VirtualDub will open with the Avisynth processed movie.
Press Ctrl P to select a codec.
Scroll down the list and highlight Matrox MJPEG-2 I-Frame HD
Press Configure. Set Frame Rate to 23.98 and Data Rate to 151 Mb/sec. (You can experiment with higher data rates, but this should be sufficient)
Press OK, then OK.
Press F7 which brings up the Save As Dialog. Render.

This will produce an AVI file. Now here's the part I'm not sure about. I don't know whether you'll be able to open this AVI file directly on the Mac. (Of course, you will have installed the Matrox codec on the Mac). You'll just have to try it.

If it doesn't open, then you can use ffmpeg to rewrap the AVI to MOV, as PDR suggested on Page 49.

If this turns out to work, then you can use the Batch Processing program I describe in the first post, so you don't have to drag and drop scripts onto VirtualDub.
 
Great! This worked like a charm and my Mac has no problem importing the clip in FCP!
It probably doesn't care about the file extension; only the codec.
Indeed, it looks perfectly 1:1.

Thanks!


Martin.

Don't render using ffmpeg. Do it this way:

Install the Matrox Codec on your PC.
If you haven't already, install VirtualDub on your PC.
Drag and drop the Avisynth script onto VirtualDub.exe. VirtualDub will open with the Avisynth processed movie.
Press Ctrl P to select a codec.
Scroll down the list and highlight Matrox MJPEG-2 I-Frame HD
Press Configure. Set Frame Rate to 23.98 and Data Rate to 151 Mb/sec. (You can experiment with higher data rates, but this should be sufficient)
Press OK, then OK.
Press F7 which brings up the Save As Dialog. Render.

This will produce an AVI file. Now here's the part I'm not sure about. I don't know whether you'll be able to open this AVI file directly on the Mac. (Of course, you will have installed the Matrox codec on the Mac). You'll just have to try it.

If it doesn't open, then you can use ffmpeg to rewrap the AVI to MOV, as PDR suggested on Page 49.

If this turns out to work, then you can use the Batch Processing program I describe in the first post, so you don't have to drag and drop scripts onto VirtualDub.
 
Great! This worked like a charm and my Mac has no problem importing the clip in FCP!
It probably doesn't care about the file extension; only the codec.
Indeed, it looks perfectly 1:1.

Thanks!


Martin.

Glad to hear it. So, would you say this is the way Mac people should go?
 
Glad to hear it. So, would you say this is the way Mac people should go?

Ralph. I'm not entirely sure yet. I believe i can see some posterizing in the Matrox image (e.g. in the wood). I followed your settings. There's also a 8-12 bit setting that i left at 8. Any ideas?
Colors an gamma are great though!

Martin
 
Ralph. I'm not entirely sure yet. I believe i can see some posterizing in the Matrox image (e.g. in the wood). I followed your settings. There's also a 8-12 bit setting that i left at 8. Any ideas?
Colors an gamma are great though!

Martin

When you want to compare before and after images, I'm a big fan of bringing them into Photoshop, pasting one on top of the other, then using ctl/cmd Z to toggle between them. This is the best way to see differences.

Of course, you can always use a higher data rate if there is indeed a problem.

I have no idea about the 8-12 bit setting. That must be on the Mac version of Matrox. It's not on the PC version.
 
PDR, i can't get the uncompressed "-v210" to work correctly with ffmpeg. It results in a crippled file because of an error near the end of every file during processing: "av_interleaved_write_frame(): "operation not permitted".
Should i add/force -pix_fmt and -vtag parameters? Any suggestions?

For the time being, i've come up with -vcodec rawvideo -px_fmt uyvy422 -vtag 2vuy
but that also results in the "av_interleaved_write_frame(): "operation not permitted" error.

Any help very much welcomed...

Thanks,

Martin

You won't be able to use ffmpeg for matrox ; it's a proprietary MPEG2 format (although free) . ffmpeg's MPEG2 encoder isn't that great, and cannot reach high enough bitrates

I mentioned this earlier, but if quality is the biggest concern, use uncompressed 10bit 422 aka v210. Bitrate is ~1000Mb/s so >5x the size of DNxHD 175 , but it's lossless

On windows, QT treats it as Y'CbCr, so it should treat the same on a Mac. Colors are the same as the Ninja Prores in QT

-vcodec v210



The beta version of FFMBC reports that DNxHD color is fixed for quicktime ; but I compiled that rc6 version and did some tests, and still colors differ from the Prores in Quicktime, at least on windows... maybe it hasn't been implented yet in that version, or there is a special switch I don't know about
http://code.google.com/p/ffmbc/
 
PDR, i can't get the uncompressed "-v210" to work correctly with ffmpeg. It results in a crippled file because of an error near the end of every file during processing: "av_interleaved_write_frame(): "operation not permitted".
Should i add/force -pix_fmt and -vtag parameters? Any suggestions?

For the time being, i've come up with -vcodec rawvideo -px_fmt uyvy422 -vtag 2vuy
but that also results in the "av_interleaved_write_frame(): "operation not permitted" error.

it's "-vcodec v210"
 
Sorry, yes, that's what i meant, but it produces a file that is not recognized by quicktime and reports "av_interleaved_write_frame(): "operation not permitted" at the end of processing.

Martin
 
Are you sure? Post your full command line

What version of ffmpeg are you using ?

I checked this out a few months ago and verified it with Quicktime

Maybe vitaly can work some magic and this workaround won't be necessary
 
OK! I know some more now. The Avisynth conversion fails on approx. 70% of all GH2 Ninja prores files! The "av_interleaved_write_frame(): "operation not permitted" error is generated by Avisynth.
This is killing me, because this was an important test shoot.
The AVS file is an exact copy of the script on page one of this thread and i have added the input file to my public dropbox: http://dl.dropbox.com/u/31127109/005.MOV
I have no idea what's wrong, because all files were recorded in the same manner. All defect files have the same size of 4.294.940.708 bytes.
I really really sincerely hope that there is a simple explanation to this...

Martin

btw: http://www.google.nl/search?sourcei...aved_write_frame():+"operation+not+permitted" gives a number of results, but are above my station technically speaking.
 
Last edited:
All defect files have the same size of 4.294.940.708 bytes.

Do you mean the input (recorded) files or output (processed) files?

That's a bit suspicious, do the recorded files play ok?

What file system are you using? Are you doing this through virtualization ? Or dedicated windows box? Maybe it has problems with large files ?

What dropbox file? I'm not really feeling like downloading a huge clip


What was your EXACT ffmpeg commandline? Try adding -r 23.976

-vcodec v210 should be enough, try 1 file instead of the batch, until you get things sorted out

e.g.

ffmpeg -i input.avs -vcodec v210 -an -r 23.976 output.mov
 
i'll do some more tests tomorrow and will supply you with more detailed information. Ps i have removed the file.
Do you mean the input (recorded) files or output (processed) files?That's a bit suspicious, do the recorded files play ok?What file system are you using? Are you doing this through virtualization ? Or dedicated windows box? Maybe it has problems with large files ?What dropbox file? I'm not really feeling like downloading a huge clipWhat was your EXACT ffmpeg commandline? Try adding -r 23.976-vcodec v210 should be enough, try 1 file instead of the batch, until you get things sorted oute.g.ffmpeg -i input.avs -vcodec v210 -an -r 23.976 output.mov
 
Back
Top