VideoHelp Forum
+ Reply to Thread
Results 1 to 14 of 14
Thread
  1. Member
    Join Date
    Aug 2013
    Location
    Scotland
    Search PM
    I'm having an issue with MP4 files in Avisynth, where the frames kind of stutter back and forth. I only get this when trying to load an MP4 within the MP_Pipeline. It works fine on Avisynth+. But i wanted to apply specific filters to remove the mosquito noise, since those kind of filters don't seem to work with Avisynth+.

    Code:
    MP_Pipeline("""
    
    ### platform: win32
    FFMPEGSource2("F:\Video Files\Episode 1.mp4")
    MosquitoNR()
    ### ###
    """)
    ChubbyRain2()
    QTGMC(preset="slow", matchpreset="slow", matchpreset2="slow", sourcematch=3, Lossless=2, TR2=3, Sharpness=0.3, EdiThreads=2, border=true)
    Spline64Resize(1280,720)
    FineDehalo()
    ColorMatrix(mode="Rec.601->Rec.709")
    I've attached an example.
    Image Attached Files
    Quote Quote  
  2. Looks like the wrong field order to me. What happens if you stick an:

    AssumeTFF()

    before QTGMC. And if that does nothing, try:

    AssumeBFF()

    And if that does nothing either, then how about uploading the 'source' before the filtering?
    Quote Quote  
  3. Member
    Join Date
    Aug 2013
    Location
    Scotland
    Search PM
    Still no change when i add either of those.
    Image Attached Files
    Quote Quote  
  4. Use LSMASH instead of ffvideosource2 the:

    Code:
    MP_Pipeline("""
    
    ### platform: win32
    LSMASHVideoSource("source.mp4")
    ### ###
    """)
    
    SelectEven()
    AssumeTFF()
    QTGMC()
    Last edited by jagabo; 10th Nov 2020 at 08:35.
    Quote Quote  
  5. Member
    Join Date
    Aug 2013
    Location
    Scotland
    Search PM
    Still getting the same problem.
    Quote Quote  
  6. Member
    Join Date
    Mar 2008
    Location
    United States
    Search Comp PM
    Originally Posted by Master Tape View Post
    Still getting the same problem.
    That's not helpful at all.
    Post your whole script
    Quote Quote  
  7. Member
    Join Date
    Aug 2013
    Location
    Scotland
    Search PM
    Originally Posted by davexnet View Post
    Originally Posted by Master Tape View Post
    Still getting the same problem.
    That's not helpful at all.
    Post your whole script
    Code:
    MP_Pipeline("""
    
    ### platform: win32
    LSMASHVideoSource("F:\Video Files\Episode 1.mp4")
    MosquitoNR()
    ### ###
    """)
    ChubbyRain2()
    QTGMC(preset="slow", matchpreset="slow", matchpreset2="slow", sourcematch=3, Lossless=2, TR2=3, Sharpness=0., EdiThreads=2, border=true)
    Spline64Resize(1280,720)
    FineDehalo()
    ColorMatrix(mode="Rec.601->Rec.709")
    Quote Quote  
  8. Member
    Join Date
    Mar 2008
    Location
    United States
    Search Comp PM
    Originally Posted by Master Tape View Post
    Originally Posted by davexnet View Post
    Originally Posted by Master Tape View Post
    Still getting the same problem.
    That's not helpful at all.
    Post your whole script
    Code:
    MP_Pipeline("""
    
    ### platform: win32
    LSMASHVideoSource("F:\Video Files\Episode 1.mp4")
    MosquitoNR()
    ### ###
    """)
    ChubbyRain2()
    QTGMC(preset="slow", matchpreset="slow", matchpreset2="slow", sourcematch=3, Lossless=2, TR2=3, Sharpness=0., EdiThreads=2, border=true)
    Spline64Resize(1280,720)
    FineDehalo()
    ColorMatrix(mode="Rec.601->Rec.709")
    My PC is too slow to play your script so I simplified it. Interlaced H.264 in mp4/mkv always seems to have issues
    this works for me:
    Code:
    lwlibavvideosource("C:\Users\davex\Downloads\source.mp4")
    selecteven()
    assumetff()
    yadifmod2(mode=1, edeint=nnedi3(field=-2))
    spline36resize(720,404).assumefps(25)
    Image Attached Files
    Quote Quote  
  9. This is one of those problematic "separated fields" interlaced videos that LSMASH and ffVideo have problems with. I don't have MosquitoNR and ChubyRain2 so I commented out those lines.

    Code:
    MP_Pipeline("""
    ### platform: win32
    LSMASHVideoSource("source.mp4")
    ### ###
    """)
    
    SwapFields()
    AssumeBFF()
    AssumeFPS(25)
    Trim(0,132)
    
    TFM()
    #ChubbyRain2()
    #MosquitoNR()
    Spline64Resize(1280,720)
    FineDehalo()
    ColorMatrix(mode="Rec.601->Rec.709")
    1) The first frames is repeated a number of times. That's not uncommon at the start of some videos, especially if they have been trimmed from a longer video.

    2) I believe LSMASH confuses the field rate with the frame rate -- so it thinks the video is twice as may frames and the frame rate is twice as fast. It's really 132 frames (including the multi-repeated first frame) of 25 fps video. The frames are interlaced with obvious comb artifacts -- but it's 25p video encoded out-of-phase. Rather than QTGMC() one should use TFM() to recombine fields from the same frame (maybe other parts of the video are real interlaced 50 fields per second though).

    3) Some parts of the video suffer from the swap fields problem -- the upper field is below the lower field rather than above it. Hence the SwapFields() and BFF rather than TFF. The video below didn't include that.

    Also, I believe MosquitoNR only works properly on progressive frames. ChubbyRain2 can work with interlaced frames but you must specify interlaced. I've moved the around but comment them out since I don't have them and they're not germane to the original jerky video problem. Actually, MosquitoNR appears to be available in a 64 bit version so I don't see the need for MP_Pipeline at all -- you might just have to specify the multithreading mode.
    Image Attached Files
    Last edited by jagabo; 10th Nov 2020 at 21:51.
    Quote Quote  
  10. Member
    Join Date
    Aug 2013
    Location
    Scotland
    Search PM
    I tried adding AssumeFPS(25) before QTGMC, whilst using LSMASH and that seems to have sorted it. Just hope i didn't throw away half the fields by doing so? But video seems to run smoothly after render. My only concern is stated runtime has doubled.


    Also, I believe MosquitoNR only works properly on progressive frames. ChubbyRain2 can work with interlaced frames but you must specify interlaced. I've moved the around but comment them out since I don't have them and they're not germane to the original jerky video problem. Actually, MosquitoNR appears to be available in a 64 bit version so I don't see the need for MP_Pipeline at all -- you might just have to specify the multithreading mode.

    Oh i see, that must explain why it hasn't been really effective. Curiously when i add MosquitoNR after QTGMC it causes AvsPmod to crash! So it must not play nice with the the 64 bit version. Hopefully there's something else that can remove whatever these artifacts are. Dotcrawl? It's more apparent on red.

    Image
    [Attachment 55794 - Click to enlarge]


    Also how do you specify interlaced for ChubbyRain2?
    Image Attached Files
    Last edited by Master Tape; 11th Nov 2020 at 01:01.
    Quote Quote  
  11. Member
    Join Date
    Mar 2008
    Location
    United States
    Search Comp PM
    Appears to be 50 unique fields - this seems to work:
    Code:
    lwlibavvideosource("C:\Users\davex\Downloads\video(1).mp4")
    yadifmod2(mode=1, edeint=nnedi3(field=-2)).assumefps(50)
    spline36resize(1280,720)
    Of course you can replace yadifmod with qtgmc
    Image Attached Files
    Quote Quote  
  12. Originally Posted by Master Tape View Post
    Also how do you specify interlaced for ChubbyRain2?
    You could read the docs... http://avisynth.nl/index.php/ChubbyRain2
    Quote Quote  
  13. Member
    Join Date
    Aug 2013
    Location
    Scotland
    Search PM
    Is there any deinterlacer script that deals with a hybrid source, such as something filmed on video but computer graphics are on-screen at the same time, as with QTGMC it handles the video fine but you get all the squiggly lines, aliasing. I need something that eliminates the shimmering whilst keeping the full 50fps motion of video.
    Last edited by Master Tape; 25th Mar 2022 at 13:49.
    Quote Quote  
  14. Originally Posted by Master Tape View Post
    Is there any deinterlacer script that deals with a hybrid source, such as something filmed on video but computer graphics are on-screen at the same time, as with QTGMC it handles the video fine but you get all the squiggly lines, aliasing. I need something that eliminates the shimmering whilst keeping the full 50fps motion of video.
    Did you mean static "computer graphics" , or something with motion ?

    Did you try masking it ?

    Post a sample
    Quote Quote  



Similar Threads

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