VideoHelp Forum
+ Reply to Thread
Results 1 to 13 of 13
Thread
  1. We are trying to remove ghosting from this video.

    http://transfer.archivete.am/flKRZ/1.mp4

    If you skip between the video frames you can see there is some ghosting of the frames as seen in this picture.



    Using ChatGPT to look for a command to use to get rid of it we have got less ghosting to appear by making use of a command in ffmpeg

    Code:
    ffmpeg -i 1.mkv -vf "fieldmatch,decimate" -c:v libx264 -crf 18 -preset slow 2.mkv
    Yet ghosting still remains.

    Ive tried multiple filters generated with ChatGPT and this is the closest, but we want there to be more improvement

    Any ideas would be appreciated
    Quote Quote  
  2. This is a standard PAL to NTSC field blend conversion

    Use avisynth or vapoursynth filter: QTGMC+Srestore

    You can still use ffmpeg to do the encoding and/or muxing part, but ffmpeg doesn't have any similar filters to srestore

    Code:
    FFVideoSource("1.mp4")
    AssumeFPS(30000,1001)
    AssumeTFF()
    QTGMC(preset="faster")
    SRestore()
    Image Attached Files
    Quote Quote  
  3. Member
    Join Date
    Mar 2008
    Location
    United States
    Search Comp PM
    You can use an Avisynth script like this to revert it to the underlying 25 fps
    and help with the blends.
    Code:
    lwlibavvideosource("c:\users\davex\downloads\1.mp4")
    assumetff()
    qtgmc(preset="fast")
    srestore()
    Image Attached Files
    Quote Quote  
  4. Member
    Join Date
    May 2005
    Location
    Australia-PAL Land
    Search Comp PM
    Dave, you'll have to be "faster".
    Quote Quote  
  5. Member
    Join Date
    Mar 2008
    Location
    United States
    Search Comp PM
    Originally Posted by Alwyn View Post
    Dave, you'll have to be "faster".

    Quote Quote  
  6. Im confused how to set up AviSynth, don't I need VirtualDub and a ton of plugin
    Quote Quote  
  7. Member
    Join Date
    May 2005
    Location
    Australia-PAL Land
    Search Comp PM
    Not quite a ton but it will feel like it after you've finished faffing around. You do need Virtual Dub; that's to open the AVISynth script (as shown above) that is in text file format (just with the "avs" extension. If you can wait a couple of days, I'm about to release a guide and a package with all the files you need to run common AVISynth scripts.
    Quote Quote  
  8. I figured it out by installing qtgmc using avsrepogui plus using virtualdub2, ghosting is gone now. Thank you. I want to make sure the video is deinterlaced using yadif2x when I do it. I tried adding yadifmod2(order=-1, field=-1, mode=0) which Im not sure is working. Also, is it possible to save this as the original format? I cant seem to find a mpeg2 vfw codec
    Quote Quote  
  9. Originally Posted by Alwyn View Post
    I'm about to release a guide and a package with all the files you need to run common AVISynth scripts.
    I'm sure I'm not the only one who would find this extremely helpful. Thanks in advance.
    Quote Quote  
  10. is it possible to make the output be 60fps
    Quote Quote  
  11. Originally Posted by Larsenv View Post
    I figured it out by installing qtgmc using avsrepogui plus using virtualdub2, ghosting is gone now. Thank you. I want to make sure the video is deinterlaced using yadif2x when I do it. I tried adding yadifmod2(order=-1, field=-1, mode=0) which Im not sure is working. Also, is it possible to save this as the original format? I cant seem to find a mpeg2 vfw codec


    yadif or yadifmod will produce more artifacts than QTGMC

    If you use yadifmod instead of QTGMC; it has to using mode=1, order=1 , then srestore .

    If you don't use srestore, you will get pretty much the same blends as before

    Avisynth frameserves decoded (uncompressed) data - so you generally re-encode. Saving it as mpeg2 will not be ideal, because mpeg2 not a very modern or high compression format . You'd need a lot of bitrate (very large filesizes) for similar quality to a modern format like h264/h265/av1

    If you need mpeg2 (e.g. maybe you need to author a PAL DVD) , you can use hcenc or ffmpeg. But hcenc is x86, and ffmpeg's mpeg2 encoder produced low quality

    Originally Posted by Larsenv View Post
    is it possible to make the output be 60fps
    The output of the script is the original 25 fps, unique frames. So a pan would be perfectly smooth when viewing it frame by frame.

    To achieve (I'm assuming you want 60000/1001 , or 59.94 ; not 60/1) . You can either (a) duplicate frames in a pattern - not smooth, introduces judder, (b) blend frames (counter productive, since your main issue was blends in the first place), or use (c) motion interpolation or optical flow (synthesize new frames, there are "AI" method or machine learning now) - but they can produce artifacts - ie. They all have pros/cons .
    Quote Quote  
  12. Motion flow doesn't work well with cartoons.
    Quote Quote  



Similar Threads

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