VideoHelp Forum
+ Reply to Thread
Page 1 of 2
1 2 LastLast
Results 1 to 30 of 45
Thread
  1. Member
    Join Date
    Jul 2014
    Location
    san diego, ca
    Search Comp PM
    I captured from VHS to mpeg2 using an August VGB100. The capture works well in general, but for one particular VHS, the resulting video plays too fast. It was a previous capture from film to VHS, so I am not sure where the speedup occurred, but the footage pans back & forth too fast.

    I understand that some VHS players may have the ability to slow down playback - I can try to pick up an old one of those.
    There is no audio to worry about. Is there also a way to re-encode the mpeg to slow down playback without loss of quality?
    Last edited by tns1; 24th Jul 2014 at 14:34.
    Quote Quote  
  2. For clarification, are you saying the VHS plays too fast before capturing, or only the capture is sped up? Also what kind of "film" are you talking about, feature film, 8mm home movie...?

    Most likely your VHS was recorded at a speed your current player can't handle.
    Quote Quote  
  3. Member
    Join Date
    Jul 2014
    Location
    san diego, ca
    Search Comp PM
    Some type of old 16mm film was transferred to VHS some years ago. The film no longer exists, so I have no way of knowing if the original was too fast. What I do know is the VHS playback is too fast, and the captured mpeg seems even faster. You get dizzy watching it. I'd like to create a capture that is maybe twice as slow as what I have. If I can get there just by re-encoding the capture I have, that would be the quickest way. VirtualDub or other method?
    Quote Quote  
  4. I think you'll find that 16mm film usually had a framerate of either 24fps or 18(?)fps if there was no sound. When it's transferred to video the film projector is often sped up to run the film through at 25fps to make it easier to film with a video camera also running at 25fps. You may be able to correct the speed after capture, but whatever software you use will be making the additional frames needed from what's already there, so you may find that the resulting video is rather jerky.

    I'm sure that others with FAR more experience in this area will probably jump in at some point.

    Good Luck!

    Edit: Just noticed that you're in the USA, so my framerates here in the UK are almost certainly different to the ones you're using there, but the principle is probably the same.
    Last edited by TimA-C; 25th Jul 2014 at 06:56. Reason: Regional variations!
    Quote Quote  
  5. NTSC VHS only comes at one speed: 59.94 fields per second. If it was any different it would not display properly on TV and no capture card could capture it. If your video is too fast then it happened when the film was telecined, Ie, the film projector was sped up to match the video camera's frame rate. You can slow it down with the right software but it will get a little jerky.
    Quote Quote  
  6. Member
    Join Date
    Jul 2014
    Location
    san diego, ca
    Search Comp PM
    Is VirtualDub one of the SW that can slow it down? I have it loaded for a different purpose, but didn't consider that it might be able to do that.
    Quote Quote  
  7. You can try with DGPulldown, since you said there's no audio to worry about. I'll assume it's running at progressive 29.97fps, no telecine. That might be incorrect though (MediaInfo will tell you). But if true, if there's audio, even silent audio, you'll have to demux. Try first opening the MPG in DGIndex and set it for 19.98->29.97 and see if that works to slow it considerably. If it complains about not being an elementary stream you'll have to demux (DGIndex, File->Save Project and Demux Video), followed by running the resulting M2V through DGPulldown as described.

    That won't reencode the video so you'll get the same quality effectively slowed to 20fps. If it works but it's still too fast for you, you'll have to reencode. If it makes a mess and you see lots of interlacing then it's telecined and will also have to be properly filtered and reencoded.

    A short ten-second sample will help decide what you have.
    Quote Quote  
  8. It may not be the best but yes, you can use VirtualDub to slow the video. Use the Video -> Frame Rate... dialog.

    If you upload a short segment with moderate motion I (as well as others, probably) will take a look at it and give you suggestions. Also, what is your plan for the video? Make a new DVD? Just a video file to watch on the computer or standalone media player?
    Last edited by jagabo; 26th Jul 2014 at 20:57.
    Quote Quote  
  9. Member
    Join Date
    Jul 2014
    Location
    san diego, ca
    Search Comp PM
    I want to preserve it in a form that can be played on a standard DVD player , as well as a file on a pc. The quality of my mpeg2 capture is fine except for the speed. The video is less than 10min duration, so size is not a concern.
    Quote Quote  
  10. Member
    Join Date
    Jul 2014
    Location
    san diego, ca
    Search Comp PM
    manono,
    Attached is a short clip of the unprocessed mpg capture. By watching the people in the video, I can see now that most of 'panning too fast' problem I was complaining about is really due to the original cameraman swinging the camera back and forth too quickly. Parts of the video are fine, but parts pan by a little too quickly.

    I did exactly what you suggested (demux, then 19.98->29.97), and was able to slow down the playback to reasonable levels. I don't see much if any loss in quality, but as several suggested, it is not as smooth as I would like. Some of the jerkiness seems like it may be from the person holding the camera, but also frame-to-frame misalignment of the film when it was captured to VHS. It seems like there should be digital methods to correct for these.

    BTW, how do I convert from d2v back to mpg?
    Image Attached Files
    Quote Quote  
  11. VirtualDub isn't really the tool for this but if you wanted to do it there:

    1) Open the MPG file.
    2) Add the Deinterlace filter, Yadif, double frame rate, top field first.
    3) Add the Interlace filter, Progressive Frames, Even field first.
    4) Go to Video -> Frame Rate...
    5) In the Source Rate Adjustment section enable Change Frame Rate To, set the frame rate you think the source was, say 18 fps.
    6) In the Frame Rate Conversion section enable Convert To FPS and set the rate to 29.97.

    Encode with those settings with a codec that supports interlaced encoding. Make sure it's set to interlaced and top field first.

    With all the blended fields the better method would be to use AviSynth and the SRestore filter. That will remove most of the blended frames and leave you with clear progressive frames at the original frame rate. In theory. You can then change the frame rate to something suitable for DVD. It's more work than I want to deal with right now, maybe tomorrow. Manono will probably have something for you.
    Quote Quote  
  12. Originally Posted by jagabo View Post
    Manono will probably have something for you.
    I might have been able to help but the encoding computer is down at the moment. In any event, as it is now this video isn't a fit candidate for DGPulldown. To fix it it'll have to be unblended and reencoded.

    Since I doubt tns1 will want to learn how to use AviSynth for this, his choices come down to following what you suggested, or leaving it alone.
    Quote Quote  
  13. Back in business. The video sample is on the MPEG at 20fps. It seems to be too fast. I slowed it to 18fps and that's probably still too fast, but the sample isn't good enough or long enough to be able to tell what it's supposed to be with any certainty. The only way to 'fix' it is with an AviSynth script. 18 (or 16)fps isn't allowed for DVD so something would have to be done to bring it up to at least 19.98fps. I've included an MP4 of the scene unblended and slowed to 18fps. This is the script used:

    MPEG2Source("test.d2v")
    Yadif(Mode=1)#or the better QTGMC
    Srestore(Frate=19.98)
    AssumeFPS(18)#set the 'real' framerate
    Image Attached Files
    Quote Quote  
  14. Member
    Join Date
    Jul 2014
    Location
    san diego, ca
    Search Comp PM
    Thought I would give AviSynth a try so I loaded 2.58.
    It chokes on the MPEG2Source() - 'no such animal'.
    Seems I need DGDecode, and when I finally find that and add:
    LoadPlugin("C:\Program Files\AviSynth 2.5\plugins\DGDecode.dll")
    It complains my d2v file was created with an incompatible version of DGIndex (1.58), but I see no other version.
    I am starting to understand why this tool is considered difficult.
    Quote Quote  
  15. Wait til you want to use QTGMC or McTemporalDenoise!

    So you made the d2v file with the version of DgIndex that came with the DgDecode.dll you are using?

    Next you're going to need SRestore and the filters it relies on: http://avisynth.nl/index.php/Srestore
    Quote Quote  
  16. Originally Posted by tns1 View Post
    I am starting to understand why this tool is considered difficult.
    Did you read the instructions included in the DGMPGDec package? They're probably the best tutorials to using AviSynth with DVD/MPEG sources. And, yes, the versions used of DGDecode and DGindex have to be from the same 'package. If you didn't get DGMPGDec from this site, maybe begin again by clicking on the link.
    Quote Quote  
  17. Member
    Join Date
    Jul 2014
    Location
    san diego, ca
    Search Comp PM
    OK, got that straightened out. Now about Yadif. I got it from here, and put the dll in with the other avisynth plugins. It is version 0.9.0.0, and in properties it states it is for avisynth 2.5, so why does it claim it is incompatible?
    http://www.avisynth.nl/users/warpenterprises/

    Also ver 1.7.0.0 from below also gets the "not an AviSynth 2.5 plugin" error.
    http://avisynth.org.ru/yadif/yadif.html
    Last edited by tns1; 30th Jul 2014 at 00:56.
    Quote Quote  
  18. Read the doc included with Yadif to find out how it's to be used in a script. In your own link it says:

    Implemented as Avisynth C-plugin (not regular Avisynth plugin).
    Must be loaded with Load_Stdcall_plugin("yadif.dll") or LoadCplugin("yadif.dll") (not LoadPlugin !). Do not use autoloading. (Note: in Avisynth v2.5.7-2.5.8 there is no need in explicit loading of Avisynth_c.dll by user for such plugins.)
    I do it like so:

    LoadCPlugin("C:\Path\To\Yadif.dll")
    .
    .
    Yadif(Mode=1)
    Quote Quote  
  19. I can never remember the syntax for LoadCPlugin(), and the path to the filter. So I put the following line in a file called Yadif.avsi in my AviSynth plugins folder:

    Load_Stdcall_plugin("C:\Program Files (x86)\AviSynth 2.5\plugins\yadif.dll")

    Since avsi files in the plugins folder autoload when AviSynth starts up yadif is always autoloaded.
    Quote Quote  
  20. Member
    Join Date
    Jul 2014
    Location
    san diego, ca
    Search Comp PM
    I did finally track down all the pieces and got the avs script to play in VDub and WMP:

    LoadPlugin("C:\Program Files\AviSynth 2.5\plugins\DGDecode.dll")
    LoadCPlugin("C:\Program Files\AviSynth 2.5\plugins\yadif.dll")
    LoadPlugin("C:\Program Files\AviSynth 2.5\plugins\mt_masktools-26.dll")
    MPEG2Source("mympg1.d2v")
    Yadif(Mode=1)#or the better QTGMC
    Srestore(Frate=19.98)
    AssumeFPS(18)#set the 'real' framerate


    Correct me here, but so far this has just slowed the framerate, and not attempted to improve the quality. In VDub, the input vs output does not look any different. Now that I have seen those Van De Putte restoration examples, I have higher expectations. There remains a bunch of dirt, noise, scratch, jitter, blur issues. Realistically what kind of further improvement could I expect since I am not starting with film?

    Where does the 19.98 and 18fps come from (vs 25fps)? MediaInfo and DGIndex both report 29.97 (the VHS capture rate). Are these best guesses of the original film rate, and how does knowing this help? The use of these filter functions suggest it does matter, but I thought all that would be lost once it was put on VHS.

    What is the recommended process flow for restoration in my circumstances? One posting says "source -> crop -> deinterlace -> resize -> denoise".
    Quote Quote  
  21. Originally Posted by tns1 View Post
    Correct me here, but so far this has just slowed the framerate, and not attempted to improve the quality.
    That's right, and I never claimed any quality improvement. Slowing it down was the subject of both the thread title and your first post. I suspect it's still too fast and maybe it's supposed to be 16fps, not sure. You can decide. Just adjust the AssumeFPS line if you wish to experiment.
    In VDub, the input vs output does not look any different.
    Nor should it since the filtering is done in the script before it hits VDub. It's when you use a VDub filter (although everything can be done, and usually better, in AviSynth) that you see differences in before and after.
    There remains a bunch of dirt, noise, scratch, jitter, blur issues.
    Yes, and there are AviSynth filters for all those.
    Realistically what kind of further improvement could I expect since I am not starting with film?
    One helluva lot, if you know your way around AviSynth.
    Where does the 19.98 and 18fps come from?
    19.98fps is what's left after removing the blends and then the duplicate frames. That's how it was made for the DVD - 19.98fps (or 20fps) and then field-blended to 29.97fps. 18fps was just to show how to slow it down a bit. You can slow it to whatever you like.
    ...vs 25fps
    What's 25fps have to do with anything? Are you saying the video began life as PAL 25fps?
    MediaInfo and DGIndex both report 29.97 (the VHS capture rate).
    29.97fps (actually 59.94 fields per second) is required for both NTSC VHS and DVD. The person that made this had to somehow get from the 'base' framerate he picked (20fps) to 29.97fps and then did it the worst possible way (field-blending).
    Quote Quote  
  22. Member Cornucopia's Avatar
    Join Date
    Oct 2001
    Location
    Deep in the Heart of Texas
    Search PM
    (bypassing all the extra "clean up the film" possibilities for now)

    Once you get to the [AssumeFPS()] portion of your AVISynth script, your video is at 16, 18, etc FPS. You could encode that at that framerate to an MP4 or something for PC-only use, but if you intend to create a version that is DVD-Video compatible, you'll need something that is 29.97FPS (NTSC). There are a number of ways to go about this:

    1. Blending/Interpolating, with or without Motion-compensation
    2. Field/Frame repetition (aka Pulldown), whether hard-encoded (video) or soft-encoded (flags)

    None of those ways are perfect. Personally, I like soft-encoded pulldown flags. DGPulldown is a great too for this ("Custom" change option).

    Scott
    Quote Quote  
  23. Member
    Join Date
    Jul 2014
    Location
    san diego, ca
    Search Comp PM
    First let me thank everyone for the help so far. I know a lot of effort has gone into these tools. I have had some exposure to mpeg, and broadcast video, but there is much more when it comes to restoration.

    The video began life as either 8mm or 16mm done in mid '30s to mid '40s era. It was captured to VHS (NTSC) probably in late '70s, and I did the recent capture from VHS to mpeg2 (my only option with the SW, HW I have). I could clean up the VHS heads, but I think most of the problems were already in the recording, and other VHS tapes I play & capture look very clean.

    I hadn't used Vdub much, but I should have realized the avs file with all the avisynth filtering creates the input file that Vdub sees. It would be nice to see the input vs output, but I'll trust that avisynth has the better filters.

    There are a couple of people walking in the video, and changing to AssumeFPS(14) gives a very believable result.
    I added some clipping in the d2v file to remove the black borders - not sure if it is better to do this in the script.

    To make sure I understand, the script output I have now is progressive, uncompressed, 14fps video?
    Is this the right starting point for going forward with cleanup?

    Vdub says there are 4300 frames in this ~5min video, which at 14fps makes sense. If I save as AVI, that 5min of video is >4G.
    When I eventually want to put that back onto an mpeg or dvd, what tool do I use? I don't see rendering plugins for avisynth.
    Quote Quote  
  24. Originally Posted by tns1 View Post
    To make sure I understand, the script output I have now is progressive, uncompressed, 14fps video?
    Is this the right starting point for going forward with cleanup?
    Yes, you have 14 fps progressive video at the end of the script. But consider 14.99 (15000/1001) instead. You can make it into 29.97 fps for DVD by simply duplicating each frame. That will be smoother than going from 14 to 29.97. Even if you decide to use motion interpolation techniques going from 14.99 to 29.97 will interpolate one frame between each of the existing frames. That way the original frames are kept intact.

    DoubleFPS2(): https://forum.videohelp.com/threads/329754-Help-deinterlacing-IVTC-ing-VHS-material-con...=1#post2042689

    Apply denoising and other filters before motion interpolation.
    Quote Quote  
  25. Member Cornucopia's Avatar
    Join Date
    Oct 2001
    Location
    Deep in the Heart of Texas
    Search PM
    To see before/after with AVISynth, it's best to use a sidechain that bypasses all you do, then a stackhorizontal-type filter to place them side-by-side, etc (though there can be problems with items of different colorspaces, framerates).

    Clipping should NOT be done in the d2v file, but rather in the AVISynth script proper, where it can accommodate anomalies due to interlacing. Also, you may not want to clip at all: VHS was SD. DVD is SD. SD is a specific size (720x480 when digital). It must stay that size to be compliant. You could resize (after cropping), but then you bring up a whole other wealth of complications.

    Script output now progressive, uncompressed 14fps - yes. Correct starting point (if you undo the cropping business).

    5min of uncompressed 4:2:0 SD should be around 4-6GB (depending upon how you calculate it).

    Encode to MPEG2/DVD via AVISynth script frameserving to HCEnc encoder (or TMPGEnc, etc). AVISynth doesn't render by itself.

    Scott
    Quote Quote  
  26. Be careful with SRestore(). If you seek around with with VirtualDub you'll find that it's not always frame accurate. For example, if you open a file then seek to frame 1000, then seek to frame 2000, then back to 1000, the second seek to 1000 may not be exactly the same frame as the first. That can lead to problems when dealing with other filters. Sometimes you have to perform a partial filter chain and save as a lossless AVI. Then perform more filtering on that AVI.

    QTGMC(preset=fast).SRestore(19.98).AssumeFPS(15000 ,1001) then ChangeFSP(30000,1001) vs. DoubleFPS2():
    Image Attached Files
    Last edited by jagabo; 30th Jul 2014 at 19:57.
    Quote Quote  
  27. Member
    Join Date
    Jul 2014
    Location
    san diego, ca
    Search Comp PM
    Originally Posted by Cornucopia View Post
    Also, you may not want to clip at all: VHS was SD. DVD is SD. SD is a specific size (720x480 when digital). It must stay that size to be compliant.
    Scott
    OK, but I thought one reason for clipping early was so the irregular border didn't interfere with other filtering. If that isn't a problem, then I don't care if it remains, or if it is overlayed at some point with a fixed width border (windowboxing) to keep the size constant.
    Last edited by tns1; 30th Jul 2014 at 22:13.
    Quote Quote  
  28. Member
    Join Date
    Jul 2014
    Location
    san diego, ca
    Search Comp PM
    Originally Posted by jagabo View Post
    Be careful with SRestore(). If you seek around with with VirtualDub you'll find that it's not always frame accurate. For example, if you open a file then seek to frame 1000, then seek to frame 2000, then back to 1000, the second seek to 1000 may not be exactly the same frame as the first. That can lead to problems when dealing with other filters. Sometimes you have to perform a partial filter chain and save as a lossless AVI. Then perform more filtering on that AVI.

    QTGMC(preset=fast).SRestore(19.98).AssumeFPS(15000 ,1001) then ChangeFSP(30000,1001) vs. DoubleFPS2():
    OK, I'm not following. In your attached clip, whatever you did on the RHS looks like what I want. Was that DoubleFPS2()?
    Quote Quote  
  29. Yes, on the left was duplicate frames (ChangeFPS) on the right motion interpolated frames (DoubleFPS2). But beware, motion interpolation often results in bad artifacts.

    https://forum.videohelp.com/threads/352741-Frame-interpolation?p=2215502&viewfull=1#post2215502
    Quote Quote  
  30. Member
    Join Date
    Jul 2014
    Location
    san diego, ca
    Search Comp PM
    Replacing:

    Yadif(Mode=1)
    with
    QTGMC(preset="fast")#single threaded version

    reduces playback speed by about half. Is it supposed to do that or is my PC bogging down?

    Adding DoubleFPS2() doubles the number of frames, so playback speed is now one-fourth.

    Code:
    LoadCPlugin("C:\Program Files\AviSynth 2.5\plugins\yadif.dll")
    MPEG2Source("bucklew1.d2v")
    #minimal clipping would be: Clipping=16,24,6,0
    
    #Yadif(Mode=1)#or the better QTGMC
    QTGMC(preset="fast")#slows down playback compared to yadif
    
    Srestore(Frate=19.98)
    AssumeFPS(15000, 1001)#set the 'real' framerate
    
    #ChangeFPS(29.97)
    DoubleFPS2()#twice the frames, half the speed
    
    function DoubleFPS2(clip source)
    {
    super = MSuper(source, pel=2, hpad=0, vpad=0, rfilter=4)
    backward_1 = MAnalyse(super, chroma=false, isb=true, blksize=16, searchparam=3, plevel=0, search=3, 
    
    badrange=(-24))
    forward_1 = MAnalyse(super, chroma=false, isb=false, blksize=16, searchparam=3, plevel=0, search=3, 
    
    badrange=(-24))
    backward_2 = MRecalculate(super, chroma=false, backward_1, blksize=8, searchparam=1, search=3)
    forward_2 = MRecalculate(super, chroma=false, forward_1, blksize=8, searchparam=1, search=3)
    backward_3 = MRecalculate(super, chroma=false, backward_2, blksize=4, searchparam=0, search=3)
    forward_3 = MRecalculate(super, chroma=false, forward_2, blksize=4, searchparam=0, search=3)
    MBlockFps(source, super, backward_3, forward_3, num=2*FramerateNumerator(source), 
    
    den=FramerateDenominator(source), mode=0)
    } 
    Quote Quote  
Visit our sponsor! Try DVDFab and backup Blu-rays!