VideoHelp Forum
+ Reply to Thread
Results 1 to 7 of 7
Thread
  1. Member
    Join Date
    Sep 2008
    Location
    United States
    Search Comp PM
    In the past I have successfully used Avisynth with the MVTools plugin to interpolate frames for my old 8mm-derived videos with low frame rate. Those were regular DV-encoded AVIs with 24bit color. Just for reference, here is the code for that .avs file.
    Code:
    AVISource("c:\test.avi") # or MPEG2Source, DirectShowSource, some previous filter, etc
    # assume progressive PAL 25 fps or NTSC Film 23.976 source
    super = MSuper(pel=2)
    backward_vec = MAnalyse(super, overlap=4, isb = true, search=3)
    # Use block overlap, halfpixel accuracy and Exhaustive search
    forward_vec = MAnalyse(super, overlap=4, isb = false, search=3)
    MFlowFps(super, backward_vec, forward_vec, num=2*FramerateNumerator(last), \    
         den=FramerateDenominator(last))
    My problem is that now I am trying to process some black and white footage that I saved as "Y8" (Luminance only) AVIs from VirtualDub and now I can't use them in the above code. (I saved that way to not waste hard drive space, since I only need 8bits per pixel for b&w).

    So, if I try pulling the above .avs with Y8 AVI into VirtualDub, I get:

    ---------------------------
    VirtualDub Error
    ---------------------------
    Avisynth open failure:
    AVISource: couldn't locate a decompressor for fourcc DIB
    (C:\PRODUCTS\test.avs, line 1)
    ---------------------------
    OK
    ---------------------------

    If I change AVISource function to DirectShowSource, I get this error:
    ---------------------------
    VirtualDub Error
    ---------------------------
    Avisynth open failure:
    DirectShowSource: RenderFile, the filter graph manager won't talk to me
    (C:\PRODUCTS\test.avs, line 1)
    ---------------------------
    OK
    ---------------------------
    I did read up on MVTools and found out that those frame interp functions require "YV12" or "YUY2" as input. I honestly don't know what that stuff means - obviously, something to do with how the video data is encoded.

    I am wondering if I can somehow convert my Y8 videos to YV12 or YUY2 on the fly to get those functions to work, because I really don't want to re-save those files as 24-bit - 3 times the size that gives me no new color information.

    Appreciate any help from AviSynth masters
    Quote Quote  
  2. Member
    Join Date
    Jul 2009
    Location
    Spain
    Search Comp PM
    Try using the 2.6.0 alpha version of Avisynth, which supports Y8.
    http://forum.doom9.org/showthread.php?t=149113

    You can then use ConvertToYV12() in your script before calling MVTools functions.
    However, you might still not be able to open the source file unless you have an appropriate codec (VfW for AviSource, DirectShow for DirectShowSource) installed.
    Quote Quote  
  3. Hmmm use ffmpeg source or ffdshow with eneabled all YUV support for DS and for VfW - or better convert Y8 to the YV12 (color information is equal 0 so ignore Cb and Cr - You can do this in explicit way by adding Limiter (0,255,128,128) in Avisynth script - this will nullify all chroma data)
    Quote Quote  
  4. Member
    Join Date
    Sep 2008
    Location
    United States
    Search Comp PM
    Gavino:
    I went to the link you suggested and installed

    AviSynth_090927.exe
    (looks like last years version?)
    It installed itself into my Avisynth 2.5 program files folder.

    I then added ConvertoToYV12 call as you said and tried pulling that avs file into VirtualDub.

    This is the error - not sure what it means:
    ---------------------------
    VirtualDub Error
    ---------------------------
    Avisynth open failure:
    Evaluate: System exception - Access Violation
    (C:\PRODUCTS\test.avs, line 2)
    ---------------------------
    OK
    ---------------------------
    For reference, my Y8 AVI is completely uncompressed, so I am guessing your warning about needing appropriate codecs should not apply.


    Pandy:
    I am not sure what you mean - also, I am not very well-versed in AviSynth scripting.
    I don't have ffmpeg and haven't used it in the past. FFDshow I do have and I wasn't clear what I should change - something its video encoder configuration window (Decoder Tab)? I don't know what DS is. (If I choose VfW in the STart/Program menu, I get the above-mentioned video encoder config.)

    So, how do I convert Y8 to YV12?
    Can you please give me exact code to put inside my code above?


    Thanks for your suggestions.
    Quote Quote  
  5. Member
    Join Date
    Sep 2008
    Location
    United States
    Search Comp PM
    Ha, weird. I changed YV12 call to YUY2 and it worked!
    Quote Quote  
  6. http://forum.doom9.org/showthread.php?t=127037

    To convert Y8 in ffdshow to the YV12 simply force YV12 at the output of the ffdshow, DS means Direct Show, ffdshow consist form 4 part Audio decoder, Video decoder (Direct Show), VfW decoder additionally there is also DXVA decoder but not very usefull for You now.

    FFDShow, VfW configuration, Decoder Tab (there is also Encoder Tab), Codecs, last position on list Raw Video -> All YUV
    Quote Quote  
  7. Member
    Join Date
    Sep 2008
    Location
    United States
    Search Comp PM
    Thanks, I'll try that too. Luckily, I seem to have at least one solution to this already.
    Quote Quote  



Similar Threads

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