VideoHelp Forum




+ Reply to Thread
Page 1 of 2
1 2 LastLast
Results 1 to 30 of 37
  1. Member
    Join Date
    May 2006
    Location
    United States
    Search Comp PM
    I have some video that was captured at 29.97 fps. Going through frame by frame, every 3rd frame is the same frame preceding it. So, the source video seems to have been 20 fps. First, I tried simply dropping it to 20 fps. Unfortunately, it isn't consistently every 3rd third frame that needs removed. The source just isn't exactly 20 fps. Every few seconds it'll start showing a frame and it's repeated frame, basically 10 fps.

    So, is there anything out there that will detect the repeated frames and remove them? If so, then how can I get the ~20 fps video back up to standard at 24 or 29.97 fps, without creating the same problem I just solved?

    A program I found called MotionPerfect looks like it would increase the frame rate, but it doesn't look like it would solve my first problem. Besides, it's not free, and my problem isn't worth paying for.
    Quote Quote  
  2. Mod Neophyte redwudz's Avatar
    Join Date
    Sep 2002
    Location
    USA
    Search Comp PM
    You could load the original into VirtualDub Mod, then under 'Video>Framerate' select 'Decimate by....' (Picking your number, maybe 3 in this case.) and see what you end up with. I haven't done that in a while. Save out the video, load the new version and reset the 'Frame rate conversion' to what you want and save again. Don't quote me on the last part. But, expirement a little and see what you come up with. Just don't overwrite your original file. Use 'Save as' with a different filename.

    I think you have different problems, though. Maybe a bad PAL to NTSC conversion.
    Quote Quote  
  3. Member
    Join Date
    May 2006
    Location
    United States
    Search Comp PM
    Decimate by 3 does make it more fluid, by ensuring there are no repeated frames. But, of course, half of the good frames are lost that way, making it 10 fps, when it could be 20.

    It's not PAL, just some weird webcam type thing.
    Quote Quote  
  4. Donald Gaft's Decomb filter (for AviSynth) might help out. It gives you more control over which frames are removed. It basically looks for similarities and removes one frame out of every x frames.


    Darryl
    Quote Quote  
  5. Member edDV's Avatar
    Join Date
    Mar 2004
    Location
    Northern California, USA
    Search Comp PM
    Originally Posted by aebbeka
    Decimate by 3 does make it more fluid, by ensuring there are no repeated frames. But, of course, half of the good frames are lost that way, making it 10 fps, when it could be 20.

    It's not PAL, just some weird webcam type thing.
    Do you have any idea which webcam?

    Is it CIF (352x240) resolution? Those are usually 10, 15, 20, 25, 30 progressive fps.

    Interlacing to 29.97 usually shows the same time sample for both fields so they are jerky but easily deinterlaced. Repeat frames should be easy to detect.
    Quote Quote  
  6. Member
    Join Date
    May 2006
    Location
    United States
    Search Comp PM
    Ok, the Decomb filter worked perfectly. Now I need to get it back up to 29.97 fps. It's going to be a dvd, so interlaced I guess. The source is interlaced, it's DV. ConvertFPS() doesn't work that well, not very fluid. Is there a better way to go from 20 to 29.97?
    Quote Quote  
  7. Member
    Join Date
    May 2006
    Location
    United States
    Search Comp PM
    http://forum.doom9.org/archive/index.php/t-47016.html

    I found this, and added the guy's script to the end of mine, and it works beautifully. Thanks for everyone's help!
    Quote Quote  
  8. Member
    Join Date
    May 2006
    Location
    United States
    Search Comp PM
    Ok, still working on this... So I encoded it with tmpgenc, and something weird happened. The last 10 minutes were cut off! The weird part is that the last frame in the mpeg file is frame 215,000 or so, but in the source, (what comes out of the avisynth script) that same frame appears as approx frame 217,000... So for some reason ~2000 frames disappeared, yet the audio stays synced up. As for why the last 10 minutes are missing, I have no idea. All I can think of is i'm doing something wrong in my script. Vdub is seeing the source as 29.97, so I don't know how it would be a framerate issue.

    I open the avisynth script in Vdub, and frame serve that to tmpgenc (because the audio doesn't work without going through vdub, and I've heard tmpgenc doesn't really like avs).

    Here's my script:
    Code:
    DirectShowSource("file.avi") 
    LoadPlugin("C:\Program Files\AviSynth2\plugins\Decomb.dll")
    Decimate(3)
    AssumeFrameBased()
    AssumeFPS(19.98)
    SeparateFields()
    SelectEvery(4,0,1,2,1,2,3)
    Weave()
    Crop(32,24,-32,-24)
    Lanczos4Resize(720,480)
    DelayAudio(.1)
    
    SeparateFields()
    Levels(16, 1, 235, 0, 255, coring=false)
    BlindPP()
    Sharpen(.5)
    Weave()
    The script seems to work really well, but please point out anything that could be screwing it up.

    Thanks!
    Quote Quote  
  9. Member vhelp's Avatar
    Join Date
    Mar 2001
    Location
    New York
    Search Comp PM
    Evening everyone.

    Hi aebbeka,

    I open the avisynth script in Vdub, and frame serve that to tmpgenc (because the audio
    doesn't work without going through vdub, and I've heard tmpgenc doesn't really like avs).
    If you D/L and install readAVS.dll, it should allow you to work
    with .avs scripts inside TMPGenc.

    -vhelp 4006
    Quote Quote  
  10. Member
    Join Date
    May 2006
    Location
    United States
    Search Comp PM
    Originally Posted by vhelp
    If you D/L and install readAVS.dll, it should allow you to work
    with .avs scripts inside TMPGenc.
    Do you know of any place I can get this? I can only find a few, and none of those links work anymore...
    Quote Quote  
  11. Hi-

    You can keep it at 19.98fps and use DGPulldown with the Custom box ticked and 19.98->29.97fps filled in to apply pulldown afterwards. It will make for much greater encoding efficiency, as you'll be encoding a third fewer frames, and you'll be encoding all progressive frames, rather than all that interlacing, which is hard to encode. I do it all the time for silent films (not unlike that Doom9 thread to which you pointed) and it works great.
    Quote Quote  
  12. Member
    Join Date
    May 2006
    Location
    United States
    Search Comp PM
    Thanks for the link.

    Ok, about the pulldown. How do I get TMPGenc to encode at 19.98 fps? My only choice is 19.98 (interally 59.94), which it won't allow. "MPEG-2 can not deal with more than 30fps"
    Quote Quote  
  13. Hi-

    I couldn't tell you, as I don't use TMPGEnc. CCE does it easily enough, though. Perhaps someone else can help. I know it can be done, as the creator of DGPulldown (Donald Graft, aka neuron2), uses or used to use TMPGEnc.

    You don't want anything internal, though, as I believe that applies pulldown, which you want to do yourself afterwards. Maybe you do it without using any wizards. Just guessing.
    Quote Quote  
  14. Member
    Join Date
    May 2006
    Location
    United States
    Search Comp PM
    I don't think an mpeg2 can be 19.98 fps. I've tried 3 different encoders, including CCE, and they either say it's an invalid framerate, or they don't even give me an option for it.
    Quote Quote  
  15. Member Cornucopia's Avatar
    Join Date
    Oct 2001
    Location
    Deep in the Heart of Texas
    Search PM
    You really shouldn't be trying to encode to MPEG2 until you have the framerate issues worked out. So get something acceptable in VDub and then save the avi at a std. framerate (23.976, 24, 25, 29.97, 30) using a lossless codec (or similar).

    Then encode to MPEG normally.

    Scott
    Quote Quote  
  16. Banned
    Join Date
    Nov 2005
    Location
    United States
    Search Comp PM
    Originally Posted by aebbeka
    I have some video that was captured at 29.97 fps. Going through frame by frame, every 3rd frame is the same frame preceding it. So, the source video seems to have been 20 fps. First, I tried simply dropping it to 20 fps. Unfortunately, it isn't consistently every 3rd third frame that needs removed. The source just isn't exactly 20 fps. Every few seconds it'll start showing a frame and it's repeated frame, basically 10 fps.

    So, is there anything out there that will detect the repeated frames and remove them? If so, then how can I get the ~20 fps video back up to standard at 24 or 29.97 fps, without creating the same problem I just solved?

    A program I found called MotionPerfect looks like it would increase the frame rate, but it doesn't look like it would solve my first problem. Besides, it's not free, and my problem isn't worth paying for.
    what you describe is caused by the video being telecined, you need to apply the inverse telecine process in order to convert it to the correct 23.97 NTSC frame rate, TMPGEnc will do this for you but it takes time.
    Quote Quote  
  17. Member vhelp's Avatar
    Join Date
    Mar 2001
    Location
    New York
    Search Comp PM
    Evening everyone.

    @ aebbeka,

    Could you please provide a small (unprocessed) sample video clip so that
    we might serve you better ??

    ( please, no divX/XviD, IMHO, they don't do very well in helping us determine
    *exactly* your source attributes and things )

    If you save (uncompressed=RGB) of 10 seconds worth, that might get things
    going quicker. Thanks

    -vhelp 4008
    Quote Quote  
  18. Member
    Join Date
    May 2006
    Location
    United States
    Search Comp PM
    Originally Posted by deadrats
    what you describe is caused by the video being telecined, you need to apply the inverse telecine process in order to convert it to the correct 23.97 NTSC frame rate, TMPGEnc will do this for you but it takes time.
    Well, I just tried that, and the motion isn't as smooth as my script converting it to 19.98 fps. The source is definately 19.98, and since that isn't a valid mpeg2 framerate, I can't use DGpulldown. The script I posted works good, but as manono said, I'm encoding way more frames than I need to.

    Originally Posted by vhelp
    Could you please provide a small (unprocessed) sample video clip so that
    we might serve you better ??
    Here is a sample, but it is from streaming web video. I don't know if it is something that would be considered against the rules here, but this is definately for personal use only, and if I could buy it I would.
    Quote Quote  
  19. Hi-


    I don't think an mpeg2 can be 19.98 fps. I've tried 3 different encoders, including CCE, and they either say it's an invalid framerate, or they don't even give me an option for it.

    Didn't you read when I said I do it all the time? Did you think I was kidding/joking/lying? Yes, DVD has to output at 29.97fps. That's what DGPulldown is for. It'll take the 19.98fps stream from the encoder (actually a speeded up 23.976fps stream at that point) and telecine it to output 29.98fps. I assume you're frameserving using an AviSynth script. It's always the best way. I could even upload a portion of a vob that was encoded for 19.98fps and telecined to output 29.97fps, if anyone cares. Yes, you have to tick the 23.976fps box in CCE, but it'll come out OK in the end. You also multiply the bitrates by 1.2 (23.976/19.98=1.2).

    Make sure you uncheck the DVD compliant check box (or "For DVD" Mode) and any encoder Pulldown if using CCE. Those people suggesting you do it for 23.976 maybe haven't encoded silent films or home movies before, at unusual framerates, followed by DGPulldown for the soft telecine. If the base framerate is lower than sound speed (23.976fps) and you IVTC to 23.976fps, then that will leave duplicate frames that will make the video play slightly jerky/stuttery.
    Quote Quote  
  20. Here's the script:

    LoadPlugin("C:\Path\To\Decomb.dll")
    AVISource("K:\Test\Sample.avi")
    ConvertToYUY2()
    Decimate(3)

    Here's the main CCE screen:

    And here's the 19.98fps (with soft telecine to 29.97fps, via DGPUlldown) M2V output:

    http://rapidshare.de/files/24629757/Sample.m2v.html

    It's just over half a MB in size.
    Quote Quote  
  21. Member
    Join Date
    May 2006
    Location
    United States
    Search Comp PM
    Ah, see I did not know I could use 23.976 instead of 19.98. I'll give it a try, thanks!
    Quote Quote  
  22. Member
    Join Date
    May 2006
    Location
    United States
    Search Comp PM
    Ok, I have a few more questions.

    What is the situation with interlacing? I'm getting a lot of bad scan lines in my end result.

    In DGPulldown, do I say the source is 19.98 or 23.976? 19.98 creates more frames than it should, making the video play back slower, and 23.976 leaves a repeated frame every 6 or 7 frames, which sounds a lot like the ~4 frames every second duplicated to up it to 23.976.

    I must be doing something wrong before dgpulldown, but I don't know what it could be. I'm pretty much using your script, plus my crop, levels, etc. I use tmpgenc, because I don't have CCE other than the trial, but I encode to 23.976, like I'm supposed to.

    Thanks.
    Quote Quote  
  23. Hi-

    What is the situation with interlacing? I'm getting a lot of bad scan lines in my end result.

    You encoded all progressive frames, didn't you? You can only apply pulldown, any kind of pulldown, to progressive frames. If you see interlacing, then your player is adding it, it's adding the telecine without deinterlacing it. If it's a software player that's showing the full 29.97fps with no deinterlacing, then yes, you'll see interlacing from the telecine. VLC Player does that to me, as I don't turn on any deinterlacing with it. I'm assuming you're playing the vobs, as opposed to playing the DVD. If you play the DVD with PowerDVD or some such, it should play it OK. I have an old PowerDVD, and it exhibits a kind of stop and go motion. I expect newer versions play it OK, though. When playing 19.98fps DVDs, WinDVD and Cineplayer play them perfectly, and my very good standalone outputting to my HDTV also play them perfectly. If your end result is going to be played on a standalone to a TV set, then burn to a DVD-RW and test on the standalone to be sure. I don't trust software DVD players any farther than I can throw them. With which player are you testing? Please don't say Windows Media Player.

    In DGPulldown, do I say the source is 19.98 or 23.976?

    For something like the third time, tick the Custom box and fill in 19.98->29.97.

    19.98 creates more frames than it should, making the video play back slower,

    It doesn't "create" any frames. If you did it right, you've still got the same number of encoded frames as when you frameserved the 19.98fps .avs to your encoder. It plays back 50% more frames, in the form of fields, than you started with, because you encoded 19.98fps, but you're playing back 29.97fps. Again, I suggest burning and testing in your standalone. When I play the vobs in Media Player Classic, it plays only the encoded 19.98fps frames, with no extra or duplicate frames.

    I must be doing something wrong before dgpulldown, but I don't know what it could be.

    I suspect you did something wrong setting up the encoding.

    I use tmpgenc, because I don't have CCE other than the trial, but I encode to 23.976, like I'm supposed to.

    Like I said, I don't use it. Why are you objecting to using the CCE trial? Because of the logo it inserts? You might use it for a trial run just to convince yourself it can be done. And I know it can be done using TMPGEnc, but can't give you the settings because I don't know them.

    Is the M2V length the same as the original AVI and the .avs? Should be. And don't trust any player to give you the correct length.
    Quote Quote  
  24. Member
    Join Date
    May 2006
    Location
    United States
    Search Comp PM
    Well, when I use the CCE trial it works fine. I don't know what tmpgenc is doing to make it play back slower.
    Quote Quote  
  25. See if FulciLives' post helps. It's for setting up an AviSynth script to encode for NTSC2PAL using TMPGEnc, but I think you can adapt his instructions for what you're doing:

    https://forum.videohelp.com/viewtopic.php?p=1541479#1541479
    Quote Quote  
  26. Member
    Join Date
    May 2006
    Location
    United States
    Search Comp PM
    I just tried putting AssumeFPS(23.976) at the end of the script, and it seems to work with TMPGEnc now, although I can't tell if it's being sped up.

    Also, the filesize isn't decreasing like it should after dgpulldown. It did once, but I can't get it to do it agian...
    Quote Quote  
  27. Member
    Join Date
    May 2006
    Location
    United States
    Search Comp PM
    Ok, duh. Filesize is supposed to stay the same the way I'm doing it. There's some weird issues with the length of the video. It's over 2 hours, yet any program I use to split it think's it's just over an hour long. Although, when authored to a dvd it's fine. Oh well, so I don't trim the ends a little. The imporant thing is this project is finally done. Thanks for the help!
    Quote Quote  
  28. Hi-

    It's over 2 hours, yet any program I use to split it think's it's just over an hour long.

    Most programs/players give incorrect lengths for MPV/M2Vs. Good going for completing a project that at times must have been incredibly frustrating. The next time it'll go more quickly.
    Quote Quote  
  29. Member
    Join Date
    May 2006
    Location
    United States
    Search Comp PM
    Ok, so I have it on a dvd now, and it's fine played on a computer. However, on a standalone player, it's choppy. The audio speeds up and slows down. Could this be because my player doesn't like the pulldowns?
    Quote Quote  



Similar Threads

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