Personal View site logo
Make sure to join PV on Telegram or Facebook! Perfect to keep up with community on your smartphone.
Which GH2 hack/patch suitable for Avisynth path?
  • In about a week I'll take a video of one show. Each year I am doing it and each year I am facing some problems. Last year I had broken Chroma Upsampling problems with Sony Vegas and Edius with GH1 footage, this year I'll probably face lower colour resolution problems with GH2.

    Namely, I thought that GH2 native progressive files (24H or 24L) will solve all the problems with Broken Chroma upsampling which I experienced with GH1 "interlaced wrapped" progressive files. Now the situation is slightly improved. However, as I am really picky about the quality of my footage, I noticed that colour resolution of the clips, when imported into Sony Vegas and then exported by using loseless codec, is not retained. The colour (spatial) resolution becomes lower.

    However, by importing the following Avisynth script

    DirectShowSource("name_of_the_file.MTS")

    ConvertToRGB

    into VirtualDub and exporting by using the same codec, the colour resolution becomes much better. You can see 400% enlarged crop below (the first with Sony and the second with Avisynth-VirtualDub). Please, click on the first two pictures (left & central) to see enlarged view.

    So, I still can't use direct way of editing my footage (direct import into Vegas) if the quality should remain on the highest level. So, the first step is to convert the footage, by using Avisynth-VirtualDub, into some codec (e.g. loseless or Morgan) which preserves entire colour information.

    However, such workflow is possible with camera factory firmware/settings, but not if I use, for example, Sanity 5 patch/settings. When exporting Sanity 5 footage with Avisynth-VirtualDub workflow, I always get exported file which is more or less garbage (see the third picture) - the picture becomes worse and worse by time.

    I know that majority of GH2 owners are probably satisfied with results on the left picture (note again that it's 400% enlarged detail). Unfortunately, I am not. :-(

    Is there any other way to get high-quality footage from other lower-bitrate patch (I liked Sanity 5 due to a relatively low bitrate) by using Avisynth-VirtualDub workflow?

    00003_Sony_mts_UT_mag.png
    672 x 476 - 81K
    00003_VD_mts_UT_mag.png
    600 x 380 - 73K
    Sanity5_00016_VD_AVS_UT.jpg
    960 x 540 - 290K
  • 13 Replies sorted by
  • What version of Vegas are you using? I'm using Vegas Pro 10. In the Vegas preview, I do see chroma upsampling problems, but not when I render to Mainconcept mp4. Check my attached image.

    Your problem reading MTS files in AviSynth has to do with which DirectShow filters are invoked to read the MTS file. I use Haali Media Splitter, and ffdshow with the h.264 codec set to ffmpeg-mt and skip deblocking disabled. Open your MTS file with GraphEdit to see which filters are used in the filter graph. Your system might have other filters with higher merit that need to be unregistered.

    But really, don't fret over a little loss of chroma resolution. It's hardly the thing that's going to make the difference between your video being good and bad.

    vegas-chroma-comparison.jpg
    980 x 611 - 211K
  • GraphEdit gives the following result (see the picture below). Does it say anything to you? In your bottom picture you probably wanted to say "vegas render to Mainconcept"? Can you be so kind and left your original clip somewhere. I'd like to check it if it works for me.

    My clip is here (file 00003.MTS): http://dsc.ijs.si/damir.vrancic/down_temp/

    GraphEdit.gif
    736 x 372 - 59K
  • Your graph looks good, though I can't tell what source filter you have there. Make sure it's Haali Media Splitter. You need to check your settings in ffdshow and make sure you have ffmpeg-mt selected as the h.264 codec. It's part of the latest ffdshow-tryouts. When you are reading the MTS file in Avisynth, look at the ffdshow properties info to see what the output format is: you want YV12. Also add an info() to your Avisynth script and make sure that the input format is YV12 also. In my bottom pic, the rendering was from Vegas using Mainconcept MP4 as the encoder, and then brought into VitualDub via Avisynth to generate the frame grab. If you can play your video file in GraphEdit, Avisynth ought to be able to read it using Direcshowsource. If you want sample MTS files to play with, use my encoder settings (Cake).

  • @balazer I am curious if it works for you by importing Avisynth script into VirtualDub and then exporting into MainConcept? You can download file

    Sanity5_00008.MTS

    at http://dsc.ijs.si/damir.vrancic/down_temp/

  • @balazer Cake seems better than Sanity 5, but it still has some hiccups when exported through avisynth-Virtualdub.

  • Tried Flow Motion v2.0 and up to now could not see any problems when importing the clips into VirtualDub (via AviSynth). Interesting...

  • It's definitely something about the filters you are using to read the files. You didn't answer my questions about what filters you are using.

  • Sorry for late answer... I had previously installed Haali Media Splitter. Can you tell me which settings should I check in ffdshow (ffdshow video decoder configuration)?

  • @balazer Did you mean this screen?

    ffdshow01.gif
    568 x 479 - 54K
  • Yes. Change the decoder for h.264 to ffmpeg-mt.

  • @balazer Isn't ffmpeg-mt merged in libavcodec?? http://sourceforge.net/projects/ffdshow-tryout/forums/forum/597594/topic/4629504 By the way, I can't select ffmpeg-mt, the only option (besides libavcodec) is Intel (quicksilver?). Should I use the following files: http://ffmpeg.zeranoe.com/builds/

  • Yes, apparently ffmpeg-mt has been merged into libavcodec. I haven't tried the new version. The version I use is ffdshow_tryouts_beta7_rev3154_20091209, and it has ffmpeg-mt as a separate option.

  • @balazer, anyway, 24L on Sanity 4.1 (I haven't tested 24L on Sanity 5) does not show any problems and I'll need 24L in order to allow spanning (not on Transcend class 10!).

    The only way to get perfect 24H version via Avisynth-Virtualdub is to use DGAVCIndex and DGAVCDecode. However, in this way, the audio is written as separate file. Very annoying...