VideoHelp Forum
+ Reply to Thread
Results 1 to 21 of 21
Thread
  1. Member
    Join Date
    Jan 2018
    Location
    Germany
    Search Comp PM
    I have a Rip of a concert DVD. The DVD is in NTSC 29.97 fps, apperently interlaced. But likely, as the concert was recorded in switzerland, the original recording is in PAL (I assume 25 fps).
    I like to have a good Matroska file of it, using h264 encoder. I usually use handbrake.
    I tried deinterlace filter yadif, setting "bob", but the movement in the resulting file (59... fps) seems strange. Checking frame by frame, the original dvd-recording apperently has a iipiip (interlaced, progressiv) pattern (resulting in every 5th and 6th frame being equal in my yadif-bob (59fps) deinterlaced transcode).
    Detelecine -Filter in default in handbrake seems to do nothing, i get an interlaced picture (29.97 fps) in my transcode.

    Any suggestions how to deinterlace the material and get smooth playback (and good quality)?
    Quote Quote  
  2. If the concert was shot on film it was shot at 24 fps. If it was shot on video it was mostly likely shot at 25i. How you convert back to PAL depends on how the NTSC conversion was made. You'll have to upload a sample to be sure, but if you see one duplicate out of every six frames you need to decimate to 50p. For the best conversion you're looking at using AviSynth.
    Quote Quote  
  3. Member
    Join Date
    Jan 2018
    Location
    Germany
    Search Comp PM
    I don't know how it was iriginally recorded, i would asume 25p.
    The DVD is 29.97fps, in a pattern of 2 interlaced frames and one progressive frame (i,i,p,i,i,p).
    I will try to upload a sample later.
    Is there a easy guide for Avisynth, considering my problem? I always used handbrake (and gordian knot many years ago).

    thx
    Quote Quote  
  4. In Handbrake, try Decomb, and frame rate 25 fps.
    Quote Quote  
  5. GKnot uses AviSynth scripts, although you'll most likely have to update the AviSynth included in it. You could edit the script it gives you for use with your video.

    There's no easy guide for AviSynth, no. And Handbrake will be useless for this. You might want to dust off your GKnot, update the included AviSynth, and open the video in it and save out a basic script. Then you might try and open that script in VDub. If it works, post it here and we might be able to show you how to edit it with what's needed to fix your video, once you've posted the sample.
    Quote Quote  
  6. Member
    Join Date
    Jan 2018
    Location
    Germany
    Search Comp PM
    10 secondsample without filters:
    https://forum.videohelp.com/attachment.php?attachmentid=44387&stc=1&d=1515879518

    30 second sample:
    https://forum.videohelp.com/attachment.php?attachmentid=44388&stc=1&d=1515880850

    Im getting confused. The segment with the drummer seems to be all interlaced, the segment with the towel / habdclap more like i,i,p.

    decomb filter in default and fps set to 25 looks ok, but i think some frames are missing there. Set to 50fps, the frames pattern looks like this: 112234455677... (1 and 1 being identical frames, 2 is a new frame. I hope i make myself clear).
    Image Attached Files
    Last edited by derSimon; 13th Jan 2018 at 17:17.
    Quote Quote  
  7. Member
    Join Date
    Jan 2018
    Location
    Germany
    Search Comp PM
    the same snippet with decomb filter in default and same framerate as source looks ok? I'm not sure if I'm loosing some quality there.

    https://forum.videohelp.com/attachment.php?attachmentid=44390&stc=1&d=1515882408
    Image Attached Files
    Quote Quote  
  8. An un-reencoded sample of the MPEG2 source would have been better but I can see what's going on here. The video was originally shot at 50p or 25i, then converted to 29.97i with field/frame duplicates. In AviSynth you can do the following:

    Code:
    LSmashVideoSource("handbrake no filter fps variable as source_preview.mp4") 
    AssumeTFF()
    QTGMC(preset="fast") # smart bob to 59.94 fps, slower presets will give slightly better results
    TDecimate(mode=2, rate=50.0) # remove  duplicates to get 50 fps.
    Or faster but maybe less accurate:

    Code:
    LSmashVideoSource("handbrake no filter fps variable as source_preview.mp4") 
    AssumeTFF()
    QTGMC(preset="fast") # smart bob to 59.94 fps, slower presets will give slightly better restults
    TDecimate(cycle=6, CycleR=1) # remove 1 frame out of every 6, giving 49.95 fps
    ChangeFPS(50) # remove one frame every 1000 frames to get exactly 50 fps
    A sample of the former is attached. Better results can be had when starting with the original MPEG 2 video.

    I don't think you can do this with Handbrake. Unfortunately, QTGMC() is one of the hardest filters to get working in AviSynth. It requires several third part filters that you have to download and install. And it's very slow. You can try using Yadif() instead but it gives more artifacts.
    Image Attached Files
    Quote Quote  
  9. Member
    Join Date
    Jan 2018
    Location
    Germany
    Search Comp PM
    Originally Posted by jagabo View Post
    An un-reencoded sample of the MPEG2 source would have been better but I can see what's going on here. The video was originally shot at 50p or 25i, then converted to 29.97i with field/frame duplicates. In AviSynth you can do the following:

    Code:
    LSmashVideoSource("handbrake no filter fps variable as source_preview.mp4") 
    AssumeTFF()
    QTGMC(preset="fast") # smart bob to 59.94 fps, slower presets will give slightly better results
    TDecimate(mode=2, rate=50.0) # remove  duplicates to get 50 fps.
    Or faster but maybe less accurate:

    Code:
    LSmashVideoSource("handbrake no filter fps variable as source_preview.mp4") 
    AssumeTFF()
    QTGMC(preset="fast") # smart bob to 59.94 fps, slower presets will give slightly better restults
    TDecimate(cycle=6, CycleR=1) # remove 1 frame out of every 6, giving 49.95 fps
    ChangeFPS(50) # remove one frame every 1000 frames to get exactly 50 fps
    A sample of the former is attached. Better results can be had when starting with the original MPEG 2 video.

    I don't think you can do this with Handbrake. Unfortunately, QTGMC() is one of the hardest filters to get working in AviSynth. It requires several third part filters that you have to download and install. And it's very slow. You can try using Yadif() instead but it gives more artifacts.
    Wow, thank you very much. I thought handbrake with decomb filter would look ok. But even converted from mp4/h264, your conversion has definatly fewer artefacts and some more frames (with extra information). Not sure if i could tell the difference watching one after the other. But comparing frame by frame, side by side, it is an amazing improvement.
    I guess I have to invest quite some time now in learning how to use Avisynth. Seems worth it.
    Quote Quote  
  10. Member
    Join Date
    Jan 2018
    Location
    Germany
    Search Comp PM
    I tried Staxrip with QTGMC and IVTC/ TDecimate, but it did not work perfect. I still get some frames that represent the same picture, even though the intervall of the repeating frames has much increaed.
    Quote Quote  
  11. Have you made available an untouched sample yet? Did you give the complete script you used?

    It might not be relevant, but jagabo's explanation of one line in his second script wasn't quite correct:

    ChangeFPS(50) # remove one frame every 1000 frames to get exactly 50 fps

    It'll add (not remove) a duplicate frame every 1000 frames to achieve 50fps.
    Quote Quote  
  12. Originally Posted by manono View Post
    It might not be relevant, but jagabo's explanation of one line in his second script wasn't quite correct:

    ChangeFPS(50) # remove one frame every 1000 frames to get exactly 50 fps

    It'll add (not remove) a duplicate frame every 1000 frames to achieve 50fps.
    Yes, my mistake.

    Keep in mind that with very long sequences TDecimate may make mistakes. Say for example it needs to remove 1 frame out of 1000. What if there is one true duplicate frame in the sequence but also a still shot of several frames. How is it to know which should be removed?
    Quote Quote  
  13. Member
    Join Date
    Jan 2018
    Location
    Germany
    Search Comp PM
    In the orininal dvd, the pattern seems to be [32*(pii)-100i], meaning 32 times repeating pattern of 1 progressive frame followed by 2 interlaced frames, then 100 interlaced frames in a row.

    After yadif/bob deinterlacing, hereby doubeling the framerate, the pattern seems to be 32*(12345R)-(123456R). R meaning this frame is similar to the one before. So I tried "TDecimate (cycle=199, cycleR=33)" (32*6+7=199, R=32+1) , but I still get a repeating frame from time to time. So I guess I'm also missing a frame from time to time, that would have copntained extra information.
    The best solution for me seems to be to just double the framrate, without removing any frames (getting back to where I started :/ ).
    Last edited by derSimon; 16th Jan 2018 at 10:32.
    Quote Quote  
  14. Originally Posted by derSimon View Post
    The best solution for me seems to be to just double the framrate, without removing any frames (getting back to where I started :/ ).
    Yes, if you do that the resulting video will only be as jerky as the DVD when viewed on a 59.94 Hz display. When viewed on a 50 Hz display 10 out of every 60 frames will be discarded resulting in more jerkiness.
    Quote Quote  
  15. Member
    Join Date
    Jan 2018
    Location
    Germany
    Search Comp PM
    Originally Posted by jagabo View Post
    Originally Posted by manono View Post
    It might not be relevant, but jagabo's explanation of one line in his second script wasn't quite correct:

    ChangeFPS(50) # remove one frame every 1000 frames to get exactly 50 fps

    It'll add (not remove) a duplicate frame every 1000 frames to achieve 50fps.
    Yes, my mistake.

    Keep in mind that with very long sequences TDecimate may make mistakes. Say for example it needs to remove 1 frame out of 1000. What if there is one true duplicate frame in the sequence but also a still shot of several frames. How is it to know which should be removed?
    Hmm ... I usually watch only on my PC-Monitor (75Hz I think) or Smartphone.
    Quote Quote  
  16. Are the 100 frames in a row unique frames ? or some other cadence with duplicates ?

    Are there any gaps or dropped frames ?

    You could possibly use some decimation combined with retiming (motion interpolation, mvtools2) of sections . If the pattern repeats exactly , it's easier, but if there are some edits in the production , disrupting the pattern, it makes it more difficult.
    Quote Quote  
  17. Some other things to keep in mind:

    Titles are often overlaid after a video has been telecined. So titles may be at a different frame/field rate than the main video.

    Video is often edited after being telecined -- resulting in breaks in the telecine pattern. Those breaks may result in duplicate or missing frames when attempting to restore the original frame rate.
    Quote Quote  
  18. Member
    Join Date
    Jan 2018
    Location
    Germany
    Search Comp PM
    Originally Posted by poisondeathray View Post
    Are the 100 frames in a row unique frames ? or some other cadence with duplicates ?

    Are there any gaps or dropped frames ?

    You could possibly use some decimation combined with retiming (motion interpolation, mvtools2) of sections . If the pattern repeats exactly , it's easier, but if there are some edits in the production , disrupting the pattern, it makes it more difficult.
    It seems the 100 interlaced frames in a row on the DVD turn out (deinterlaced) to be a pattern of 6 frames including one frame repeated (after 32*6 frames one more "extra" frame). I did not notive any dropped frames - but I only checked like 400 frames.
    Quote Quote  
  19. Member
    Join Date
    Jan 2018
    Location
    Germany
    Search Comp PM
    Originally Posted by jagabo View Post
    Some other things to keep in mind:

    Titles are often overlaid after a video has been telecined. So titles may be at a different frame/field rate than the main video.

    Video is often edited after being telecined -- resulting in breaks in the telecine pattern. Those breaks may result in duplicate or missing frames when attempting to restore the original frame rate.
    So far, I did not test with titles, I only used portions in the middle of the concert. Changing pattern with cuts? It's a nightmare already!

    Like I said, I'm propably going to leave it at doubled framerate, without decimating it. Decimating dousn't work very good, so I have a jittery video either way. But without decimating, I have more information restored.

    Maybe some day they release an HD , original framerate copy of Prince in Montreux 2009...
    Last edited by derSimon; 16th Jan 2018 at 13:54.
    Quote Quote  
  20. Mr. Computer Geek dannyboy48888's Avatar
    Join Date
    May 2007
    Location
    Texas, USA
    Search Comp PM
    some titles merely play with the pulldown flags to make it 29.97 so try dropping the demuxed m2v file into dgpulldown and set the output fps to 25fps. who knows it may just be "soft" interlaced. IP man did this as they left it at 24fps (not 23.976) and just did a custom pulldown. if that don't work then try this:
    Here's what I use to deinterlace and decimating wise, tried on some PAL native stuff made to NTSC and was rather happy with the results. As always mileage does vary

    QTGMC( Preset="Slow", EZDenoise=2.5, NoisePreset="Slow", SourceMatch=3)
    srestore(frate=25)
    OR
    srestore(frate=50)

    Try a small sample with the srestore settings, if it looks blurry on panning scenes then it was probably shot at 50i if it looks fine than may of been shot at 25p

    if you don't need/want denoising change the EZDenoise setting to 0, this will also speed it up a bit

    and yes it is slow, but if has given me the best results so far on blended/interlaced/bad transfer titles.
    Last edited by dannyboy48888; 16th Jan 2018 at 19:26. Reason: add dgpulldown advice
    if all else fails read the manual
    Quote Quote  
  21. Member
    Join Date
    Jan 2018
    Location
    Germany
    Search Comp PM
    I'm not sure if I'
    m using it correctly in staxrip. srestore by its own did nothing, srestore after yadif-deinterlace/double framrate made it even worse. Somtimes 3 identical frames in a row.

    I found another good way:
    Handbrake nightly build (instead of official version 1.07) seems to be reducing duplicates when set to reduce framerate. So handbrake nightly with yadif/bob and 50fps constant, and I only get a duplicate frame every once in a while, when there is not much movement in the frame. It's pretty quick, too.
    Quote Quote  



Similar Threads

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