VideoHelp Forum
+ Reply to Thread
Results 1 to 7 of 7
Thread
  1. I know that a TBC is strongly recommended. I'd like to understand the technical reasons that sync issues occur without one.

    To summarize what I know: VHS is imperfect. There are variations different machines. Tapes wear and stretch over time. This means that the tape may not play at exactly 25 frames (PAL) per second. A TBC takes the signal from the VHS, buffers the frame and then converts that into a perfect 25 frames per second output.

    That all makes sense, but here's what I don't understand:

    1. Since the audio/video/control track is all on one tape, any wearing and stretching would affect both the audio and video together. An audio frame occupies the same physical space on the tape, so if a video frame has to be discarded because of damage or some other reason, can't the software just discard the corresponding audio frame and keep the output file in sync?
    2. Why do I not suffer the same audio sync problem if I plug my VCR into a television?

    I guess I'm looking into acquiring a TBC now but the thing I'm asking myself is: the picture and audio look great in Preview mode in VirtualDub, so why does my captured video end up out of sync with the audio when I play it from a file? Can't I just capture what's on the Preview pane?

    Lastly, I'm interested to know more details about what kind of data comes off of the capture card. Are there any tools that could help me see the DirectShow API output to learn more about it?
    Quote Quote  
  2. Video capture is based on the horizontal and vertical sync pulses of the analog signal. Most capture devices are not good at syncing to them when they are too irregular. The result is dropped or duplicate frames (too few or too many frames).

    Audio is a continuous signal with no sync information. Capturing it is based on a crystal oscillator on the capture device. The capture device has no way of knowing if the audio is speeding up, slowing down, or even stopped. It just samples the signal every 1/48000 seconds.

    You can use GraphEdit or GraphStudioNext to build capture graphs (linked filters) where you can see the input and output parameters of each filter.
    Quote Quote  
  3. Thanks jagabo, that explanation really helps. If I could ask one more question then: why can't the capture device or the capture software apply the same crystal oscillator technique to the video and take a sample of the active video frame every 1/25th of a second? It seems like it would solve the syncing issues without a TBC maybe at the expense of a few dropped frames.
    Quote Quote  
  4. Originally Posted by bcoughlan View Post
    why can't the capture device or the capture software apply the same crystal oscillator technique to the video and take a sample of the active video frame every 1/25th of a second?
    Because the caps won't correspond to the source video frames. In a perfect video source at 25 fps frame 100 should start 4.000 seconds after frame 0 (100/25). But suppose your VCR is running 0.1 percent slow for some reason, 24.975 fps. Frame 100 will start at 4.004 seconds rather than 4.000 seconds (100/24.975). That 4 millliseconds difference is 1/10 of a frame. If the capture starts at 4.000 seconds the VCR will still be putting out the bottom of frame 99. The top 1/10 of the captured frame will be from frame 99, then you'll get the vertical blanking interval, then the top part of frame 100 below that. You will have a similar problem on the horizontal axis as successive scanlines arrive later than expected. The captured video will not correspond to the video frames.
    Quote Quote  
  5. Capturing Memories dellsam34's Avatar
    Join Date
    Jan 2016
    Location
    Member Since 2005, Re-joined in 2016
    Search PM
    Originally Posted by bcoughlan View Post
    Thanks jagabo, that explanation really helps. If I could ask one more question then: why can't the capture device or the capture software apply the same crystal oscillator technique to the video and take a sample of the active video frame every 1/25th of a second? It seems like it would solve the syncing issues without a TBC maybe at the expense of a few dropped frames.
    Good capture cards from back in the day handled HBI and VBI signals pretty good, The devices selling today for an average price of $20 don't have all the necessary chips to handle timing, they are designed for clean signal from analog CCTV cameras, people wrongly use them for VHS due to miss advertising by international crooks.
    Quote Quote  
  6. Member
    Join Date
    Feb 2018
    Location
    College Station, TX, USA
    Search Comp PM
    The information you seek is something I mulled over a couple years ago.

    The following images are from "Adaptive Length Length Tracking" an Analog Devices Application Note, which also appeared in an article for Embedded Audio Visual Journal many years ago. It explains the two types of error "Digital" TBC's correct, for "Broadcast" and "VCR" problems.

    What you need to know is what a "single" scanline of video looks like on a scope plotted Voltage vs Time for the Horizontal problems.





    And then "Zoomed out" so you can see the same thing for Voltage vs Time for the Vertical problems.



    In the first set of images those are "single scan lines", Left to Right.

    The left image is the messy video scanline after its decoded from Broadcast RF, you have to pass it through an Analog or Digital filter to get the "cleaner" signal on the Right.

    After its "cleaned up" you can see the "front porch" or first part of the scan line that indicates to the TV or Capture card.. "Here is the start of line".. its called the horizontal sync pulse, and its the "U" shaped part that dips all the way down almost to zero.

    "Cleaning the Broadcast signal up" so you and the capture card can "see" the start of line is "a type" of Time Base Correction.. it restores "visibility" and makes sure each subsequent line starts "on time" rather than randomly jumping back and forth.. appending "noise" to the front of a line or.. shoving it to the Left and starting to late. Mostly "Broadcast" TBC's can do this with analog circuits.. which have capacitors and age.. and get worse at their job over time. About the year 2002 it became more common to "digitize" the signal and perform the filtering "digitally".. hence Digital TBC's.

    Thats not the only type of Time Base Correction however.. the whole scanline waveform is kind of "floating" and all "relative" so it has to be "right sized" relative to a scale.. and this part is called "clamping" it to Zero.. or making the lowest part of the signal Zero.. and stretching or scaling the rest to "fit" in the Voltage window standard for everything from Black to White... called "Luma".

    The problem with the previous "Clean up" of the Broadcast signal however.. was all that noise might have "erased" the true start of line "sync pulse" that touched zero. Look at the second set of images. The first one has "no" sync pulse. So in a strictly Analog TBC this line would have to be thrown away or replaced with either a duplicate from above or below or from the previous field.. that's called 2D or 3D correction.. but its suboptimal.. what you really want to do is "restore" or (paste) in a fake sync pulse right where you know it should be and keep the line.. you can do that with a Digital TBC.. usually this is done in the Standard Definition Processor (SDP).. but it takes "smarts" and "memory".

    So those are the "horizontal" types of Time Base Correction most people think about first.. there are others.. like lining up the starting edge of a scanline that has been stretched out of shape horizontally and squishing it horizontally so it "fits" in the allotted time to trace from Left to Right that it should fit in. That also takes memory, and smarts to know what is correct and not.. and "relative".. there's that word again.. to all the other horizontal lines in a single "field" (or in a single "frame".. two fields interwoven and mashed into a single "picture").. if you do that.. you can make sure the entire picture is "square" and none of the lines "bleed over" or jitter back and forth horizontally.. but it takes "a lot of memory" to hold the entire picture in memory and then release it when it should to be "vertically" in sync with the next in coming and outgoing frame.

    Notice all this "meddling" took extra "time".. the Digital bit has to be converted from Analog to Digital and then stored.. and then manipulated.. and then released as a finished field or frame on schedule.. but there is "time loss" due to TBC processing.. not frame loss.. or "frame drop".. but processing "time loss". Every Digital TBC has it.. the older models had greater time loss.. newer models had less.. but usually on the order of a frame or two.. that adds up.. meanwhile the Audio signal was sampled one dimensionally and "flew" right on through almost unimpeded by the time it takes to digitize an audio sample.. The audio sample doesn't wait for the Video and they tend to get offset or out of sync.. there are ways of correcting for this.. but sticking to this TBC Topic for now.

    The Last image is a whole bunch of those horizontal scanlines "squished" up together.

    So much so you may not recognize them.

    When all the horizontal scanlines are played across the screen or capture memory.. for a full field the bottom has a whole new "Vertical" sync pulse.. and it looks very different from the Horizontal sync pulse.. it has to be longer and different enough it is not confused with an ordinary horizontal sync pulse.

    What that image shows.. is that in a VCR.. the twin heads of the drum are sweeping like the Bright Beams of a Light House.. reading each horizontal video line off the video tape.. when the attention of the VCR changes from the A to the B video head.. however briefly.. its not pointed at any tape .. none at all.. its pointed into the bleak darkness of "infinity" in the inside of the VCR box.. where no signal exists.. so the Voltage of the signal "drops" to absolute Zero.. no signal... and this leads to a "spike" to zero.

    The Vertical sync space.. is called the Vertical Blanking or Vertical Retrace region of the Video field.. its is supposed to be "blank" empty.. but its not for a VCR. "Its Full of Spikes!" (And those look a LOT like horizontal sync pulses!! Oh noes!)

    Instead there are these regular "disturbances in the Force" that disrupt things.. and "might".. just "might" be detected as the start of a new line.. prematurely... and spells "Doom".

    Pre-triggered.. the TV or Capture card "thinks" a scanline is starting its merry trip across the screen.. but "Its a FAKE!".. instead what follows is empty black void.. and an ominous dark blacker than black line appears at the top of the screen.. worse the vertical sync is "set" by that Vertical Blanking Interval by a circuit called a PLL - Phase Lock Loop.. and its been fed "lies lies lies".. it thinks the field has started.. but there is no signal.

    Depending on how often the horizontal PLL resamples the "truth" of where the start of line begins this "lie" can persist for some time.. so actual video lines can begin "before" there is actual video signal.. and blackness is appended to the start of the horizontal lines.. and we get "top curl".. gradually.. the PLL's start to recover.. and pull back the night.. restoring the Left edge of the video image to its proper position.. until the next field starts the Top Curl lie all over again.

    In old Analog TBCs they combated this problem by "gating" or setting the width of the PLLs to "wide" or "narrow".. reducing the amount of time in which a "lie" was discovered and corrected.. but that made the Broadcast TBC problem potentially worse.. it might miss the vertical retrace interval end and start to roll or "flicker".. so this solution was at odds.. no good choice.. "pick one".

    In Digital TBCs the "smartness" of the SDP "knew" how long those intervals "should be" and simply scribbled over the old places.. making it "So".. using the detected or rather "inspected" digitized signal for guidance as to where to put back nice clean digital representations of the horizontal and vertical sync pulses. It sounds "better" and perfect.. but..

    Every system that displays or captures has to "sync up" with the vertical retrace.. so the field doesn't appear to jitter up and down, or roll..

    Mixers and Frame synchronizers do this is essentially the same way... they digitize the whole field or frame in memory.. and then digitally play it back by converting digital memory back into analog video signal.. at the exact right time.. everytime.. with the brand spanking new .. sharp and clear horizontal and vertical sync pulses.. its now rock solid and easy for a TV or Capture device to "find" the start of horizontal lines and vertical fields and Bob's your Uncle.

    That's the broad strokes.. and I'm an Amateur.. stupid.. and people will jump all over this and correct me.

    I admit it.. I make mistakes.. and my understanding evolves over time.. a year from now.. I probably would be smart enough to not even try explaining so much in so little space.

    I left out entire "Epic Stories" in the Poem that describes the battle of the TBC against the Dark powers of Signal degradation.

    Know that before Broadcast Analog TBC's .. even "tried".. to tackle this problem.. analog video signals were much higher quality.. and the problems were "not as hard".

    Know that VCR analog TBC's were terrible.. even when brand new.. and they basically only exist in museums now.

    Know that Digital TBC's are mostly what we're talking about here now.. and the 2MB or 4MB, line or "full frame" are measures of "how far the TBC goes into solving -all- of the problems a TBC is assigned to do battle against. That's why there are so many "kinds" of TBC's.. they don't all do the same thing.. but they all try to tackle most of the most common problems.

    In the early days of cheap video capture.. simple filters were placed in front of the horizontal and vertical PLLs to try and "recover" those sync signals.. it was a little like "fishing" from a small boat. Those common inexpensive parts had no frame synchronizers.. and could do nothing if a frame lost the signal "mid capture" all they could do was drop the results (drop the field, drop the frame) and start over.. and try again with the next start of field or frame Vertical Blanking Interval / Retrace signal.

    NEC, Texas Instruments and Analog Devices all came up with their own types of TBC which tackled the same problems in different ways.. and if not for Uncompressed video capture.. "had to do this" to present "full frames" to Compression chips which performed the MPEG compression.. yeah some only performed DCT.. but I'm generalizing here. Poetic license okay?

    In the Last days of Standard Definition, February 2009... all the chip makers started adding HDMI and HDCP video capture to support LCD Televisions and repurposed the same chips.. some left the old Digital TBC functions in.. and that leads to confusion today.. but that's a whole other story.

    .. and now.. I think I'll go build a Digital TBC in minecraft.
    Last edited by jwillis84; 2nd Mar 2022 at 02:59.
    Quote Quote  
  7. Video Restorer lordsmurf's Avatar
    Join Date
    Jun 2003
    Location
    dFAQ.us/lordsmurf
    Search Comp PM
    Originally Posted by jwillis84 View Post
    Mixers and Frame synchronizers
    Several mixers "have TBCs" inside, but it's not what people think it is. That TBC is not for you, or for a passthrough. "TBC" is a wide term, and there are many kinds of TBCs. Some are indeed meant for in>out correction, ie TBC-1000 to digitize tapes. But some are there to assist the function of the unit (mixers, chroma keyers, etc). The passthrough is hit-or-miss, as it had a certain type of source in mind (ie, not old VHS tapes), and was only strong enough to do the function required for the unit. The "TBC" is for itself, not you. And it may not work how you want, or think it should.
    Want my help? Ask here! (not via PM!)
    FAQs: Best Blank DiscsBest TBCsBest VCRs for captureRestore VHS
    Quote Quote  



Similar Threads

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