VideoHelp Forum
+ Reply to Thread
Results 1 to 17 of 17
Thread
  1. Hello,

    I have a video file I have been scratching my head on how to deinterlace. It has been a total pain in the butt to figure this out. I don't know if its IVTC'd or interlaced. The frame order goes: INT, INT, PROG, PROG, PROG, INT, INT then repeats. If anyone could figure this out, that would be great. I tried TFM(order=1) but the results are still not extremely clean.

    Sample can be found here: https://mega.nz/file/oOwxWDzD#tUL51ln78c43TsIy8o6tfODssbG-m5kwV963KdYDQoM

    Thanks
    Quote Quote  
  2. It's telecined

    Code:
    LSmashVideoSource("sample.mov")
    TFM()
    TDecimate()

    Originally Posted by bit.whisperer View Post
    I tried TFM(order=1) but the results are still not extremely clean.
    What do you mean by that ?
    Quote Quote  
  3. just for fun (not using Avisynth): https://imgsli.com/MjM0Njc4
    TIVTC + CAS+ FeMaSR seems a bit too much sharpening (script).

    Cu Selur
    Image Attached Files
    users currently on my ignore list: deadrats, Stears555
    Quote Quote  
  4. Originally Posted by poisondeathray View Post
    It's telecined

    Code:
    LSmashVideoSource("sample.mov")
    TFM()
    TDecimate()

    Originally Posted by bit.whisperer View Post
    I tried TFM(order=1) but the results are still not extremely clean.
    What do you mean by that ?
    I get some smearing artifacts that also lack detail...
    Quote Quote  
  5. Originally Posted by Selur View Post
    just for fun (not using Avisynth): https://imgsli.com/MjM0Njc4
    TIVTC + CAS+ FeMaSR seems a bit too much sharpening (script).

    Cu Selur
    This looks amazing, you went all out on the upscale lol. It looks a tad shimmery but my goodness you really brought all the detail out...
    Quote Quote  
  6. Originally Posted by bit.whisperer View Post
    Originally Posted by poisondeathray View Post
    It's telecined

    Code:
    LSmashVideoSource("sample.mov")
    TFM()
    TDecimate()

    Originally Posted by bit.whisperer View Post
    I tried TFM(order=1) but the results are still not extremely clean.
    What do you mean by that ?
    I get some smearing artifacts that also lack detail...

    I don't see any "smearing artifacts" with IVTC. Can you post a screenshot of the artifact ?

    What source filter are you using ?

    Post your script .


    That sample is perfect cadence telecine. The original film frames are returned with IVTC .
    Quote Quote  
  7. Originally Posted by poisondeathray View Post
    Originally Posted by bit.whisperer View Post
    Originally Posted by poisondeathray View Post
    It's telecined

    Code:
    LSmashVideoSource("sample.mov")
    TFM()
    TDecimate()

    Originally Posted by bit.whisperer View Post
    I tried TFM(order=1) but the results are still not extremely clean.
    What do you mean by that ?
    I get some smearing artifacts that also lack detail...

    I don't see any "smearing artifacts" with IVTC. Can you post a screenshot of the artifact ?

    What source filter are you using ?

    Post your script .


    That sample is perfect cadence telecine. The original film frames are returned with IVTC .
    I will post it in a moment, I have to get on my main PC to pull the script and get the sample out. For now, I want to leave you guys with two more clips. There are some very obvious edits here and there from the original edit and I want to see how you guys tackle it. It looks like the footage is also sped up(?) which is why I want to leave the framerate at 29.97... Clips are below:

    Clip 1
    Clip 2
    Quote Quote  
  8. It looks like the footage is also sped up(?)
    What makes you think that?

    To me, TIVTC seems to work fine for those two. (maybe add some aa afterward, to remove some aliasing in some frames)
    just for fun:https://imgsli.com/MjM0ODMx/
    users currently on my ignore list: deadrats, Stears555
    Quote Quote  
  9. You don't want to leave the frame rate at 29.97 fps. It's telecined film (24 fps film, with most character animation at 12 fps, panning at 24 fps) so you want 23.976 fps. The result will be the same running time. Simple TFM().TDecimate() as in post #2:
    Image Attached Files
    Quote Quote  
  10. videotapeedit1.mov has some VFR (variable frame rate) content. There are sections with 29.97p content and 11.988p content. The problem if you leave it at 29.97 CFR is the 23.976 sections have jerky stutter at 29.97 since you have a duplicate every 4th, 5th frame. If you make it 23.976 CFR, then you lose some unique animation frames. I suspect 99% of the content will be 23.976, and most people would leave it at 23.976 for ease of use . Some people would leave it bobbed at 59.94p but that would slightly degrade most of the frames. Others would leave it interlaced and let the display handle it (and that depends on how the display handles it - it varies between hardware, most would probably deinterlace)

    You'd have to make it VFR to have each section play at the correct speed. But 23.976 sections will show "normal" judder on a 60Hz display, and everything should be perfect on a judderless display (e.g. 120Hz or similar)
    Quote Quote  
  11. Yes, upon looking more closely there are some 29.97p sequences too. You can use TFM() to bob the video to 59.94 fps.

    Code:
    function TFMBob(clip v, int "pp", int "cthresh", int "MI")
    {
        pp = default(pp, 6)
        cthresh=default(cthresh, 9)
        MI = default(MI, 80)
    
        v.GetParity() ? Interleave(TFM(v, field=1, pp=pp, cthresh=cthresh, MI=MI), TFM(v, field=0, pp=pp, cthresh=cthresh, MI=MI)) : Interleave(TFM(v, field=0, pp=pp, MI=MI), TFM(v, field=1, pp=pp, cthresh=cthresh, MI=MI))
    }
    
    v1 = LWLibavVideoSource("videotapeedit1.mov", cache=false, prefer_hw=2) 
    v2 = LWLibavVideoSource("videotapeedit2.mov", cache=false, prefer_hw=2) 
    v1++v2
    TFMBob()
    ConvertBits(8)
    Image Attached Files
    Quote Quote  
  12. Originally Posted by poisondeathray View Post
    videotapeedit1.mov has some VFR (variable frame rate) content. There are sections with 29.97p content and 11.988p content. The problem if you leave it at 29.97 CFR is the 23.976 sections have jerky stutter at 29.97 since you have a duplicate every 4th, 5th frame. If you make it 23.976 CFR, then you lose some unique animation frames. I suspect 99% of the content will be 23.976, and most people would leave it at 23.976 for ease of use . Some people would leave it bobbed at 59.94p but that would slightly degrade most of the frames. Others would leave it interlaced and let the display handle it (and that depends on how the display handles it - it varies between hardware, most would probably deinterlace)

    You'd have to make it VFR to have each section play at the correct speed. But 23.976 sections will show "normal" judder on a 60Hz display, and everything should be perfect on a judderless display (e.g. 120Hz or similar)
    Alright, I think having the frame rate be at 59.94 FPS is an okay compromise, but it would increase the file size. If it means the content is properly archived then I am okay with that.

    Also, I wasn't able to go on my main PC last night. I do know that the script I used is literally just the source file, then TFM(order=1) with nothing else after it. I am still new to avisynth and what you guys have done so far is further ahead than anything I could do to the file...
    Last edited by bit.whisperer; 23rd Jan 2024 at 14:49. Reason: spelling and I typed the wrong frame rate
    Quote Quote  
  13. My other concern is that the credit fades at the very end of this file are in 29.97fps. Are the solutions that are currently being shown here would account for that? I was just going to fix it in editing where I would just remake the fade in and outs.
    Quote Quote  
  14. Originally Posted by Selur View Post
    It looks like the footage is also sped up(?)
    What makes you think that?

    To me, TIVTC seems to work fine for those two. (maybe add some aa afterward, to remove some aliasing in some frames)
    just for fun:https://imgsli.com/MjM0ODMx/
    I said that because I couldn't accurately describe the frame rate change that another forum member more accurately described above.
    Quote Quote  
  15. Originally Posted by bit.whisperer View Post
    I think having the frame rate be at 59.94 FPS is an okay compromise, but it would.inxrease the file size.
    Not by much if you use the right encoder. Most of the extra frames will be near duplicates (just minor encoder artifacts). Duplicates don't require much bitrate. You could even use a filter like Dup() to replace the near duplicates with exact duplicates making them take even less bitrate. Also, some encoders that support Constant Rate Factor encoding (x264 and x265) are frame rate aware. They understand that minor artifacts that flash by at 60 fps are less visible than the same artifacts plodding by at lower frame rates. So they use less bitrate per frame at higher bitrates.

    For example, using TFM() instead of TFMBob() (30 fps vs 60 fps) with the x264 encoder with the slow preset at CRF 18 changed the overall bitrate by only about 1 percent.
    Last edited by jagabo; 23rd Jan 2024 at 10:00.
    Quote Quote  
  16. Originally Posted by jagabo View Post
    Originally Posted by bit.whisperer View Post
    I think having the frame rate be at 59.94 FPS is an okay compromise, but it would.inxrease the file size.
    Not by much if you use the right encoder. Most of the extra frames will be near duplicates (just minor encoder artifacts). Duplicates don't require much bitrate. You could even use a filter like Dup() to replace the near duplicates with exact duplicates making them take even less bitrate. Also, some encoders that support Constant Rate Factor encoding (x264 and x265) are frame rate aware. They understand that minor artifacts that flash by at 60 fps are less visible than the same artifacts plodding by at lower frame rates. So they use less bitrate per frame at higher bitrates.

    For example, using TFM() instead of TFMBob() (30 fps vs 60 fps) with the x264 encoder with the slow preset at CRF 18 changed the overall bitrate by only about 1 percent.
    Do you have any ffmpeg params I should use? Currently I am using this:

    Code:
    ffmpeg -y -i "MASTERED.avi" -map 0:0 -c:v libx265 -preset slow -b:v 10000k -threads 16 -aspect 4:3 -x265-params pass=1 -f mp4 NUL && ffmpeg -i "MASTERED.avi" -map 0:0 -c:v libx265 -preset slow -b:v 10000k -x265-params pass=2 "video.mkv"
    Quote Quote  
  17. Originally Posted by bit.whisperer View Post
    Do you have any ffmpeg params I should use? Currently I am using this:

    Code:
    ffmpeg -y -i "MASTERED.avi" -map 0:0 -c:v libx265 -preset slow -b:v 10000k -threads 16 -aspect 4:3 -x265-params pass=1 -f mp4 NUL && ffmpeg -i "MASTERED.avi" -map 0:0 -c:v libx265 -preset slow -b:v 10000k -x265-params pass=2 "video.mkv"
    Bitrate based encoding is really only for when you need a file of a specific size. If you want to be assured of quality use crf encoding. Otherwise x265 with the slow preset should give decent results. Experiment with a few different crf values (16 to 25?) and decide which values gives you the quality you want. Then encode all your videos with that crf.
    Quote Quote  



Similar Threads

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