VideoHelp Forum

Try DVDFab and download streaming video, copy, convert or make Blu-rays,DVDs! Download free trial !
+ Reply to Thread
Page 1 of 2
1 2 LastLast
Results 1 to 30 of 44
Thread
  1. Member
    Join Date
    Jul 2016
    Location
    Perth Western Australia
    Search Comp PM
    Hi,
    This is continuation of thread regarding DV from Sony Cam, https://forum.videohelp.com/threads/385652-Capturing-from-Sony-TRV6-best-means-to-retain-quality, but resurfacing here as I have decided to try some conversions with AviSynth.

    I have VirtualDub and AviSynth running and have done a trial deinterlace. I have tried 2 scripts;

    Script 1
    Code:
    AviSource("Z:\Video\Captured Video\House.avi")
    ConvertToYV12(interlaced=true)
    QTGMC( Preset="Slow" )
    SelectEven()
    Script 2
    Code:
    DirectShowSource("Z:\Video\Captured Video\House.avi")
    ConvertToYV12(interlaced=true)
    QTGMC( Preset="Slow" )
    SelectEven()
    Script 1 throws error "no decompressor"
    Script 2 runs, but not sure if it compromises anything using "DirectShowSource" for AVI files.

    DV File
    Image
    [Attachment 43640 - Click to enlarge]


    Result of Script 2
    Image
    [Attachment 43641 - Click to enlarge]


    The file created is nearly 10x size the original DV file, GSpot says 7.4GB is unneeded and is differing aspect ratio.

    Any comments on making improvements?

    cheers
    Geoff
    Quote Quote  
  2. AviSource() requires a VFW decoder for the video compression. So you don't have a VFW DV decoder installed. Try Cedocida.

    DirectShowSource() uses direct show decoders. Windows usually comes with a DS DV decoder. The problem with DirectShowSource() is that it may or may not work correctly depending on what reader/splitter, codecs, and other DirectShow filters you may have installed. And it's not guaranteed to be frame accurate. It's probably ok with DV AVI though.

    To get smaller files use a compression codec. And either resize the video to a 4:3 frame size. Or use aspect ratio flags in the codec (not all support aspect ratio flags).
    Quote Quote  
  3. Member
    Join Date
    Aug 2013
    Location
    Central Germany
    Search PM
    AviSynth always decodes to uncompressed RGB or YUV video (and PCM audio if present). DV is a compressed video format already.

    The original purpose of this frameserver was providing access to different video source formats for applications which could only read AVI via VfW. But the scriptable filtering and plugin support increased its versatility.

    GSpot is quite outdated in these days; MediaInfo is more flexible and supports more different media formats. But for AVI and quite usual content formats, it's still good enough.
    Quote Quote  
  4. Member
    Join Date
    Jul 2016
    Location
    Perth Western Australia
    Search Comp PM
    Originally Posted by jagabo View Post
    AviSource() requires a VFW decoder for the video compression. So you don't have a VFW DV decoder installed. Try Cedocida.

    DirectShowSource() uses direct show decoders. Windows usually comes with a DS DV decoder. The problem with DirectShowSource() is that it may or may not work correctly depending on what reader/splitter, codecs, and other DirectShow filters you may have installed. And it's not guaranteed to be frame accurate. It's probably ok with DV AVI though.

    To get smaller files use a compression codec. And either resize the video to a 4:3 frame size. Or use aspect ratio flags in the codec (not all support aspect ratio flags).
    Thanks for that, I installed Cedocida and now the AviSource script works.
    Quote Quote  
  5. Member
    Join Date
    Jul 2016
    Location
    Perth Western Australia
    Search Comp PM
    Originally Posted by LigH.de View Post
    AviSynth always decodes to uncompressed RGB or YUV video (and PCM audio if present). DV is a compressed video format already.

    The original purpose of this frameserver was providing access to different video source formats for applications which could only read AVI via VfW. But the scriptable filtering and plugin support increased its versatility.

    GSpot is quite outdated in these days; MediaInfo is more flexible and supports more different media formats. But for AVI and quite usual content formats, it's still good enough.
    Thanks. I wasn't sure if more lines were needed in script to compress output but that is clear now.

    I'll chase up media info so I can see stats on video product after compression.
    Quote Quote  
  6. Member Cornucopia's Avatar
    Join Date
    Oct 2001
    Location
    Deep in the Heart of Texas
    Search PM
    AVISynth only serves to some other app. It does not ever encode. The app it serves to may be an encoder, player, editor, etc.

    Scott
    Quote Quote  
  7. Member
    Join Date
    Jul 2016
    Location
    Perth Western Australia
    Search Comp PM
    I just compared the output from the QTGMC script above to using YADIF and double frame rate in VirtualDub. The resulting 50fps clip from the later process looks better. Am I not comparing apples/apples, does QTGMC path allow the double frame rate option and even better output?
    Quote Quote  
  8. Member
    Join Date
    Aug 2013
    Location
    Central Germany
    Search PM
    QTGMC usually outputs bobbed results (double rate), and uses superior filters to compensate for the field shift and motion related artifacts.

    Unfortunately, it is quite an effort to keep all related plugins up to date in versions which fit together (one outdated plugin may result in a lack of quality, depending which features are used). Follow the versions listed in the AviSynth Wiki page about QTGMC.
    Quote Quote  
  9. Member
    Join Date
    Jul 2016
    Location
    Perth Western Australia
    Search Comp PM
    Originally Posted by LigH.de View Post
    QTGMC usually outputs bobbed results (double rate), and uses superior filters to compensate for the field shift and motion related artifacts.

    Unfortunately, it is quite an effort to keep all related plugins up to date in versions which fit together (one outdated plugin may result in a lack of quality, depending which features are used). Follow the versions listed in the AviSynth Wiki page about QTGMC.
    Thanks, I'll chase that up.
    Also just found AvsPmod which will be real handy for trying different filters.
    Quote Quote  
  10. Member
    Join Date
    Aug 2013
    Location
    Central Germany
    Search PM
    Either this, or VirtualDub-FilterMod (with integrated AviSynth source text editor).

    AvsPmod even offers an interface for displaying some controls to change function parameters intuitively; but it requires Python.
    Quote Quote  
  11. Member
    Join Date
    Jul 2016
    Location
    Perth Western Australia
    Search Comp PM
    WOW a new version of VirtualDub with great additions just released
    Quote Quote  
  12. Just as a matter of interest, if there were additional lines after the QTMC and 'Select even' lines that did additional processing, should you have a line telling the script that it's now dealing with progressive video? Or would the deinterlacing usually be the last thing in a script? (Pretty much all my avisynth work is interlaced standard def. and is usually encoded as interlaced DVD compliant mpeg2, so I haven't had much experience deinterlacing.)
    Quote Quote  
  13. Some filters support interlaced video but most work better with progressive video. So you usually want to deinterlace early in your script. In general, most filters assume progressive video so there's no special handling required after QTGMC (or another deinterlacer).
    Quote Quote  
  14. Member
    Join Date
    Aug 2013
    Location
    Central Germany
    Search PM
    AviSynth does not know whether a clip is interlaced or not. There is no "IsInterlaced" property of a clip variable. You are responsible for chaining filters in a sequence so that you don't ruin the content of fields, in case they contain material of different timestamps.

    One example of important attention is upsampling chrominance from 4:2:0 to 4:2:2 or 4:4:4, where the conversion needs to know if chrominance values of line pairs are shared vertically with the next frame line or the next field line (here the conversion functions have an "interlaced" parameter). Another issue is vertical resizing, where you have to know whether you first separate the fields (resample functions do not offer an "interlaced" parameter). Any filter comparing pixels in vertical direction may have undesired side effects when processing a combed frame, in contrast to separate fields; even more so when there is also a temporal filter component; noise filters are one more prominent class of filters which may work better with separated fields when you are sure that the material is regularly interlaced.
    Quote Quote  
  15. Of course! For some reason I've always just assumed that the 'interlaced=true' part of the 'ConvertToYV12(interlaced=true)' command was a flag for the rest of the script rather than just for that conversion . . . D'OH! Thanks for the info and my rather embarrassing 'light bulb' moment.
    Quote Quote  
  16. Member
    Join Date
    Jul 2016
    Location
    Perth Western Australia
    Search Comp PM
    I think I am still not successfully using QTGMC.

    Current Script
    Code:
    AviSource("Z:\Video\Captured Video\HouseSmall.avi")
    AssumeBFF
    QTGMC( Preset="Slower")
    Trialing QTGMC output vs the Denterlacing filter in VirtualDub FilterMod setting at Yadif and double frame rate. The resultant files are exactly same size but differ in viewing quality.
    Attached same frames exported to 100% JPG from VDub

    First image from QTGMC trial, second is DI filter built into VDub

    I have checked my plugins as suggested and they all appear to be latest version.
    Any suggestions what to check/try next?
    Image Attached Thumbnails Click image for larger version

Name:	HouseSmallQTGMC_253.jpeg
Views:	96
Size:	358.0 KB
ID:	43670  

    Click image for larger version

Name:	HouseSmallVDDI_253.jpeg
Views:	89
Size:	362.7 KB
ID:	43671  

    Quote Quote  
  17. Upload a sample of your source (not reencoded) and a QTGMC deinterlaced video from that source.
    Quote Quote  
  18. Member
    Join Date
    Aug 2013
    Location
    Central Germany
    Search PM
    And most of all, select a scene with a pan, not a still. The quality of a motion compensating deinterlacer is revealed best when there is motion at all.

    The second shot shows more crispness, but I am suspicious about the reason, the brightness needs to be compared with the original. Also you can see at the airplane wings that some aliasing is left.
    Quote Quote  
  19. Member
    Join Date
    Jul 2016
    Location
    Perth Western Australia
    Search Comp PM
    OK
    Cut very short clip from source DV, then applied the QTGMC process, see attached.

    cheers
    Geoff
    Image Attached Files
    Quote Quote  
  20. Member
    Join Date
    Jul 2016
    Location
    Perth Western Australia
    Search Comp PM
    Just as a comparison this is frame 20 from the QTGMC clip and the VirtualDub Yadif double frame rate process.
    Image Attached Thumbnails Click image for larger version

Name:	House_SampleQTGMC_20.jpeg
Views:	110
Size:	360.9 KB
ID:	43674  

    Click image for larger version

Name:	House_SampleVDDI_20.jpeg
Views:	69
Size:	366.6 KB
ID:	43675  

    Last edited by GeoffWA; 10th Nov 2017 at 05:31.
    Quote Quote  
  21. You're Yadif image is pretty much the same as I get, showing it's typical bad pixels here and there. But there's definitely something wrong with your QTGMC image. Here's what I get for frame 20:

    Click image for larger version

Name:	qtgmc20.png
Views:	42
Size:	835.0 KB
ID:	43676

    Results of AviSource() may vary depending on which VFW DV decoder you have installed. VirtualDub may not be using the same DV decoder. Try replacing QTGMC in your script with Bob(). Do you get this at frame 20?

    Click image for larger version

Name:	bob20.png
Views:	39
Size:	1.19 MB
ID:	43677
    Quote Quote  
  22. Member Cornucopia's Avatar
    Join Date
    Oct 2001
    Location
    Deep in the Heart of Texas
    Search PM
    Notice: jagabo is using PNGs to reference, not JPEGs.

    Scott
    Quote Quote  
  23. Yeah, but the difference between JPG at Q100 and PNG is not large. Much smaller than the difference between his Yadif and QTGMC images.
    Quote Quote  
  24. Member
    Join Date
    May 2014
    Location
    Memphis TN, US
    Search PM
    And besides, for most accurate analysis of an original frame, PNG is lossless and avoids any lossy compression artifacts of JPG, even at JPG 100.
    - My sister Ann's brother
    Quote Quote  
  25. Member
    Join Date
    Jul 2016
    Location
    Perth Western Australia
    Search Comp PM
    Ran script with Bob.
    Code:
    AviSource("Z:\Video\Captured Video\House_Sample.avi")
    AssumeBFF
    Bob()
    Frame 20 (png) from my QTGMC and Bob processing attached.

    I am assuming AviSource is using codec from Cedocida, as it did not work before installing that.
    Image Attached Thumbnails Click image for larger version

Name:	House_SampleQTGMC_20.png
Views:	79
Size:	542.4 KB
ID:	43678  

    Click image for larger version

Name:	House_SampleBob_20.png
Views:	83
Size:	520.0 KB
ID:	43679  

    Click image for larger version

Name:	Codec.png
Views:	120
Size:	243.3 KB
ID:	43680  

    Quote Quote  
  26. Member
    Join Date
    Jul 2016
    Location
    Perth Western Australia
    Search Comp PM
    Weird, shouldn't the png's of the frames be similar size? I notice mine are smaller than jagabo's, I used export image from VDub, simple compression not checked.
    Quote Quote  
  27. Member Bernix's Avatar
    Join Date
    Apr 2016
    Location
    Europe
    Search Comp PM
    There is compression in png from 0-9. On picture 1600x1200 180ppi it varies from 5,50 MB to 3,21 MB. There is also other option in png. Actually default compression i saw is 6. But there is not reason do not use max 9.
    And first picture has 96ppi your only 72ppi

    Bernix
    Quote Quote  
  28. Originally Posted by GeoffWA View Post
    Weird, shouldn't the png's of the frames be similar size? I notice mine are smaller than jagabo's, I used export image from VDub, simple compression not checked.
    I forgot to turn on compression when I saved the image. Your image is very similar to mine. So AVI decompression isn't the problem, it's something in QTGMC. That makes it hard to track down. About all I can recommend is trying different versions of the different filters it uses.
    Quote Quote  
  29. Member
    Join Date
    Jul 2016
    Location
    Perth Western Australia
    Search Comp PM
    Ill try a clean install, I should stay with 32bit(x86) right?
    Quote Quote  
  30. Since you are working with SD video I'd recommend 32 bit.
    Quote Quote  



Similar Threads