VideoHelp Forum
+ Reply to Thread
Results 1 to 17 of 17
Thread
  1. I've been lurking here forever and have always found solutions to my problems, but I just can't figure this one out. I'm also pretty unfamiliar with restoration tools, so forgive any ignorance. My goal is to remove any interlacing, remove any duped/blended frames, and restore it back to it's original 23.976 framerate.

    It looks like the video has a soft telecine, but even after a detelecine it didn't look much different. I've tried TIVTC and all of the different decimate options. I've tried different QTGMC settings. The closest I got to decent results was doing QTGMC progressive repair followed by srestore, but the results just looked odd. Like a lot of interpolated frames or something.

    Any help would be really appreciated.

    TLWW_test.mkv
    Quote Quote  
  2. It's an animation so you are always going to have duplicates, even after doing IVTC. That's because even in its native 23.976 fps, the cartoon repeats frames (to save the animator from having to draw so many frames). I am not an animation expert so I don't know what is considered best practice, but if it were me, I'd just do the IVTC using the default TFM/TDecimate settings, and stop with that.
    Quote Quote  
  3. Mr. Computer Geek dannyboy48888's Avatar
    Join Date
    May 2007
    Location
    Texas, USA
    Search Comp PM
    did a quick test to lossess. the following yielded decent results and had a smooth pan at the end. it is 29.97fps cfr to preserve that:

    ffmpeg -i TLWW_test.mkv -filter_complex "bwdif=1:0:0,fps=60000/1001[deinterlace];[deinterlace]fps=30000/1001[fullscreen]" -map [fullscreen] -c:a n -c:v libx264 -qp 0 -g 120 -preset ultrafast test.mkv

    for 23.976fps:
    ffmpeg -i TLWW_test.mkv -filter_complex "bwdif=1:0:0,fps=60000/1001[deinterlace];[deinterlace]fps=24000/1001[fullscreen]" -map [fullscreen] -c:a n -c:v libx264 -qp 0 -g 120 -preset ultrafast test.mkv

    the later had slightly more jerkyness at the pan at the end. this is for a lossless output. for other outputs change the -qp to a cfr setting. in windows change ffmpeg to ffmpeg.exe
    if all else fails read the manual
    Quote Quote  
  4. Mr. Computer Geek dannyboy48888's Avatar
    Join Date
    May 2007
    Location
    Texas, USA
    Search Comp PM
    Attached is 4 samples done at qp 16 with x264. 3 one is reinterlaced cfr TFF. it to me at least preserves the most motion on the last pan. know you wanted deinterlaced so there is always 60fps out. it does take a bit more space though. it's ultimately up to you as hand drawn anime can inherintly have varying rates.

    30fps interlaced

    ffmpeg -i TLWW_test.mkv -filter_complex "bwdif=1:0:0,fps=60000/1001[deinterlace];[deinterlace]interlace=tff:2[fullscreen]" -map [fullscreen] -c:a n -c:v libx264 -qp 16 -g 120 -preset ultrafast test-30fps-tff.mkv

    60fps progressive

    ffmpeg -i TLWW_test.mkv -filter_complex "bwdif=1:0:0,fps=60000/1001[fullscreen]" -map [fullscreen] -c:a n -c:v libx264 -qp 16 -g 120 -preset ultrafast test-60fps.mkv
    Image Attached Files
    Last edited by dannyboy48888; 13th Nov 2023 at 21:38.
    if all else fails read the manual
    Quote Quote  
  5. Originally Posted by dannyboy48888 View Post
    Attached is 4 samples done at qp 16 with x264. 3 one is reinterlaced cfr TFF. it to me at least preserves the most motion on the last pan. know you wanted deinterlaced so there is always 60fps out. it does take a bit more space though. it's ultimately up to you as hand drawn anime can inherintly have varying rates.

    30fps interlaced

    ffmpeg -i TLWW_test.mkv -filter_complex "bwdif=1:0:0,fps=60000/1001[deinterlace];[deinterlace]interlace=tff:2[fullscreen]" -map [fullscreen] -c:a n -c:v libx264 -qp 16 -g 120 -preset ultrafast test-30fps-tff.mkv

    60fps progressive

    ffmpeg -i TLWW_test.mkv -filter_complex "bwdif=1:0:0,fps=60000/1001[fullscreen]" -map [fullscreen] -c:a n -c:v libx264 -qp 16 -g 120 -preset ultrafast test-60fps.mkv
    Thanks, really appreciate the help.

    I've been able to get to that point as well, but I'm still stuck with tons of blended frames. That's what I'm having a hard time getting rid of. See example frame.
    Image
    [Attachment 74864 - Click to enlarge]


    The studio did restore this cartoon in a later DVD release, and I'll post the same clip of how it should look for reference. The whole reason I'm trying to do this in the first place is because they cropped it to 16:9 for some reason.
    TLWW_restored-test.mkv
    Last edited by Bjomesphat; 14th Nov 2023 at 07:46. Reason: Edited for context
    Quote Quote  
  6. Mr. Computer Geek dannyboy48888's Avatar
    Join Date
    May 2007
    Location
    Texas, USA
    Search Comp PM
    I see your dilemma, I'll let the next Jedi take a crack at it. Far as the frame you showed the interlaced version had the least amount of it with the tools i use. Following to see what other advice may come this way.
    if all else fails read the manual
    Quote Quote  
  7. Originally Posted by Bjomesphat View Post
    They did restore this cartoon, and I'll post the same clip of how it should look for reference. The whole reason I'm trying to do this in the first place is because they cropped it to 16:9 for some reason.
    I think this is not restored, but from another source (see colors, contrast, moving point into the boys face).
    You can see my approach here.
    Image Attached Files
    Last edited by ProWo; 14th Nov 2023 at 01:57.
    Quote Quote  
  8. Originally Posted by ProWo View Post
    Originally Posted by Bjomesphat View Post
    They did restore this cartoon, and I'll post the same clip of how it should look for reference. The whole reason I'm trying to do this in the first place is because they cropped it to 16:9 for some reason.
    I think this is not restored, but from another source (see colors, contrast, moving point into the boys face).
    You can see my approach here.
    Sorry, I meant the studio that owns the rights restored it in a later DVD release, but they botched up the framing. The second clip I provided wasn't from the source in my first post.

    And your take is looking pretty good. I still see some combing here and there, but overall it's looking much better. Mind sharing your IVTC setup?
    Quote Quote  
  9. Originally Posted by Bjomesphat View Post
    The closest I got to decent results was doing QTGMC progressive repair followed by srestore, but the results just looked odd. Like a lot of interpolated frames or something.

    You need to double rate deinterlace before SRestore. SRestore needs access to all the fields

    Your source has undergone a 25p conversion and field blended back to 29.97i . There are 3 continuous animation sections , around 9sec, 26sec, and the end. Those suggest your version is 25fps. You get jerky motion, dropped frames at 23.976 . Check the duration against published information on the original. I suspect this version is probably sped up from 23.976 => 25. If so, I would QTGMC+Srestore it to 25p and slow audio and video down back to 23.976

    You're still going to get some frames with blended line edge artifacts In some sections, when several consecutive field has artifacts, you cannot "restore" it, unless you use something more involved like photoshop, or heavy filtering (but that will soften image)

    Code:
    DGSource("TLWW_test.dgi")
    AssumeTFF()
    QTGMC(border=true, preset="slower", sharpness=0)
    SRestore(frate=25, speed=-25)
    preroll(25)
    Image Attached Files
    Quote Quote  
  10. Originally Posted by poisondeathray View Post
    Originally Posted by Bjomesphat View Post
    The closest I got to decent results was doing QTGMC progressive repair followed by srestore, but the results just looked odd. Like a lot of interpolated frames or something.

    You need to double rate deinterlace before SRestore. SRestore needs access to all the fields

    Your source has undergone a 25p conversion and field blended back to 29.97i . There are 3 continuous animation sections , around 9sec, 26sec, and the end. Those suggest your version is 25fps. You get jerky motion, dropped frames at 23.976 . Check the duration against published information on the original. I suspect this version is probably sped up from 23.976 => 25. If so, I would QTGMC+Srestore it to 25p and slow audio and video down back to 23.976

    You're still going to get some frames with blended line edge artifacts In some sections, when several consecutive field has artifacts, you cannot "restore" it, unless you use something more involved like photoshop, or heavy filtering (but that will soften image)

    Code:
    DGSource("TLWW_test.dgi")
    AssumeTFF()
    QTGMC(border=true, preset="slower", sharpness=0)
    SRestore(frate=25, speed=-25)
    preroll(25)
    This is a good point. The later DVD release that I provided is actually 5 minutes longer in total length, and it runs at 23.976. So I think what you're suggesting is probably accurate with the 25p conversion. Your footage looks good, I'll have to try those settings tonight.
    Quote Quote  
  11. Originally Posted by Bjomesphat View Post

    This is a good point. The later DVD release that I provided is actually 5 minutes longer in total length, and it runs at 23.976. So I think what you're suggesting is probably accurate with the 25p conversion. Your footage looks good, I'll have to try those settings tonight.

    If you still want to slow video down to 23.976:

    You would add after SRestore

    Code:
    AssumeFPS(24000,1001)
    And slow down 25 => 24000/1001 in an audio editor.


    If you want avs+ to perform the audio slowdown, add the audio into the script with AudioDub

    Code:
    AssumeFPS(24000,1001, sync_audio=true)
    SSRC(48000)
    Quote Quote  
  12. If you still want to slow video down to 23.976:

    You would add after SRestore
    Why not target 23.976 with sRestore?


    Code:
    QTGMC(border=true, preset="slower", sharpness=0)
    SelectEven()
    SRestore(mode=4, speed=-25)
    seems to return a deblended output @29.976 (naturally, with still tons of duplicates)
    users currently on my ignore list: deadrats, Stears555
    Quote Quote  
  13. Originally Posted by Selur View Post
    If you still want to slow video down to 23.976:

    You would add after SRestore
    Why not target 23.976 with sRestore?
    Because you drop good frames , motion becomes choppy because you drop unique good frames. Check the 3 animation sequences mentioned above . It was sped up 23.976=>25 , then field blended

    To reverse what was done, you have to srestore to 25 first, then slow it down. ie. reverse what was done to it in the correct order
    Quote Quote  
  14. Ah, you mean those 'zoom sequences',... (totally missed the second at 26 and never got to the end)
    (personally I would probably ignore those, lower the frame rate until the rest is unique (probably 12.5) and then try whether rife&co work on this, at least on those 'zoom sequences' it should work fine)
    Last edited by Selur; 14th Nov 2023 at 14:37.
    users currently on my ignore list: deadrats, Stears555
    Quote Quote  
  15. Originally Posted by Selur View Post
    Ah, you mean those 'zoom sequences',... (totally missed the second at 26 and never got to the end)
    (personally I would probably ignore those, lower the frame rate until the rest is unique (probably 12.5) and then try whether rife&co work on this, at least on those 'zoom sequences' it should work fine)
    There is another one around 57sec too

    An additional benefit to unique frames is it would reduce some flicker and help with other filtering if he wanted some clean up. Some duplicate pairs are not the same - sometimes one is slightly brighter

    However - there are more than duplicates, and it's not a regular pattern. As part of the animation style - there are some triplicates, a few for 4, some 6 -8 in a row. Some are meant as hold frames for pauses - on purpose. Completely unique frames would require VFR and RIFE would slightly mess up the timing, unless you interpolate the correct number of frames at the correct times in that irregular pattern . Another negative is RIFE isn't perfect - artifacts can occur, sometimes severe . I probably wouldn't do it that way for those reasons
    Quote Quote  
  16. Originally Posted by poisondeathray View Post
    Code:
    DGSource("TLWW_test.dgi")
    AssumeTFF()
    QTGMC(border=true, preset="slower", sharpness=0)
    SRestore(frate=25, speed=-25)
    preroll(25)
    I was having trouble duplicating your output, but got DGSource setup rather than ffmpeg and that did the trick. Is DGSource that much better? Or just better suited to this content?
    Quote Quote  
  17. Originally Posted by Bjomesphat View Post
    Originally Posted by poisondeathray View Post
    Code:
    DGSource("TLWW_test.dgi")
    AssumeTFF()
    QTGMC(border=true, preset="slower", sharpness=0)
    SRestore(frate=25, speed=-25)
    preroll(25)
    I was having trouble duplicating your output, but got DGSource setup rather than ffmpeg and that did the trick. Is DGSource that much better? Or just better suited to this content?

    DGDecNV is the most reliable source filter for avisynth and it has mkv support . For mpeg2 sources like DVD - DGIndex is very reliable too, but no mkv support, you'd need to demux to elementary stream first . Srestore is tricky, because you need very solid frame accurate access , or it will mix up the results

    FFVideoSource can be ok, but it can be flaky too with some versions. You need to obey rff flags (rffmode=1) for mpeg2/dvd sources , and set threads=1 for the most consistency. DGSource is still better, but it doesn't support all compression types, just the ones supported by NVDec and your card
    Quote Quote  



Similar Threads

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