VideoHelp Forum
+ Reply to Thread
Results 1 to 9 of 9
Thread
  1. Hi all,

    I'm trying to encode a Quicktime DVCPRO50 MOV file to a 720p60 H.264 MP4.

    My current script is as follows

    Code:
    setmemorymax(512) 
    qtinput("file.mov")
    QTGMC(preset = "slow", EdiThreads=4) 
    nnedi3_rpow2(rfactor=2,cshift="lanczosresize",fwidth=960,fheight=720)
    Sharpen(0.5)
    AddBorders(160,0,160,0)
    converttoyv12(matrix="rec709")
    Now I'm currently getting the error is
    Code:
    mt_makediff: unsupported colorspace. masktools only supports planar YUV colorspaces(YV12,YV16,YV24)
    When I had an AVI DVCPro50 file I was able to replace qtinput with avisource and that same script worked with no issues. Is qtinput not interpreting the colorspace properly? Do I need to converttoyv12 before I deinterlace? What are my options here?

    Thanks
    Quote Quote  
  2. Member
    Join Date
    Aug 2013
    Location
    Central Germany
    Search PM
    QTInput is pretty outdated. Also there is no information which colorspace you get without additional parameters (possibly YUY2 as packed-pixel format, which is not planar). QTGMC supports YUY2 input only with some additions, but supports YV16 in AviSynth+ in recent versions.

    Try if LSMASHVideoSource (L-SMASH Works) can replace it. This plugin also supports new colorspaces of AviSynth+ (legacy AviSynth is getting obsolete...).
    Quote Quote  
  3. Same error when I use LSMASH
    Quote Quote  
  4. Just looked at my AVI DV50 script in AvsPmod and noticed that avisource automatically returns YV12 even though the input is YUV. So I'm guessing avisource is doing the conversion for me? Not sure if that's a good thing or a bad thing.

    This script below works, however am I doing this properly or is there a more efficient and better way, especially with the rec709 conversion.

    setmemorymax(512)
    directshowsource("file.mov")
    converttoyv12(interlaced=true)
    QTGMC(preset = "slow", EdiThreads=4)
    nnedi3_rpow2(rfactor=2,cshift="lanczosresize",fwid th=960,fheight=720)
    Sharpen(0.5)
    AddBorders(160,0,160,0)
    converttoyv12(matrix="rec709")
    Quote Quote  
  5. Yes, you can add ConvertToYV12(interlaced=true) before QTGMC, or use a newer version with avs+ (QTGMC and masktools supports 4:2:2 as YUY2 or YV16 with newer QTGMC versions and avs+)

    You also need to add colormatrix or use other method (avsresize, or dither tools, or avsshader )to adjust for 601=>709 if your source filter is returning YUV since are upscaling . converttoyv12(matrix="rec709") won't change the actual colors if you already have YUV.

    eg.
    colormatrix(mode="Rec.601->Rec.709", clamp=0)

    I wouldn't use directshowsource, it's not necessarily frame accurate. Basically a last resort if nothing else works. If you're going to use it check what directshowsource is returning with info(). Some directshow filters insert RGB filter in between

    For "efficient" , you can use multithreading in avs+ , or avs mt in avs classic . You should be able to get a 2-3x speedup
    Last edited by poisondeathray; 2nd Dec 2019 at 14:50.
    Quote Quote  
  6. So, afer I get avs+ and the newest version of QTGMC installed I'm looking at this for a script. Will try this once I get home, thanks

    Code:
    setmemorymax(512)
    lsmashvideosource("file.mov")
    QTGMC(preset = "slow", EdiThreads=4)
    nnedi3_rpow2(rfactor=2,cshift="lanczosresize",fwid th=960,fheight=720)
    Sharpen(0.5)
    AddBorders(160,0,160,0)
    Converttoyv12()
    colormatrix(mode="Rec.601->Rec.709", clamp=0)
    Quote Quote  
  7. So with AVS+ installed and all the latest versions of QTGMC and dependencies installed I'm getting this error.

    Code:
    Msuper: Clip must be YV12 or YUY2
    I know the clip is YUY2 because when I do Info() it shows the color space as YUY2.

    This is my script

    Code:
    setmemorymax(512) 
    LSMASHVideoSource("file.mov") 
    QTGMC(preset = "slow", EdiThreads=4)  
    nnedi3_rpow2(rfactor=2,cshift="lanczosresize",fwidth=960,fheight=720) 
    Sharpen(0.5)
    AddBorders(160,0,160,0)
    converttoyv12()
    colormatrix(mode="Rec.601->Rec.709", clamp=0)
    I know I can convert to yv12 before deinterlacing but the point of going to AVS+ was to do that conversion at the end. Or does it really make a difference?
    Quote Quote  
  8. Member
    Join Date
    Aug 2013
    Location
    Central Germany
    Search PM
    Latest versions (includes 3.358s to 3.363s) in the doom9 forum - require masktools 2.2.17 or above from version 3.361s up.

    LSMASHVideoSource supports a string parameter "format" which can help you force a specific output. It accepts format strings as known from ffmpeg (like "YUV420P8" resembling YV12, or "YUV422P8" resembling YV16, or "YUY2" as you know it); test some of them if they help avoiding this error.
    Quote Quote  
  9. Not sure what happened but it seems to be working now! I was pretty sure I had updated all the QTGMC and masktools but I used your link and now everything seems to be good. Don't even need the format parameter.

    Thanks!
    Quote Quote  



Similar Threads

Visit our sponsor! Try DVDFab and backup Blu-rays!