VideoHelp Forum




+ Reply to Thread
Results 1 to 17 of 17
  1. Member
    Join Date
    Jul 2007
    Location
    United Kingdom
    Search Comp PM
    Quick question, I have a video that needs deinterlacing BFF, I am deinterlacing by simple replication (blending). Since I have to swap the field order to avoid ghosting, will this desync the audio?

    At 25 fps each frame lasts 40 ms, so by my logic, swapping the field order should knock it out of sync by 20 ms. Is this right?
    Quote Quote  
  2. Member FulciLives's Avatar
    Join Date
    May 2003
    Location
    Pittsburgh, PA in the USA
    Search Comp PM
    You aren't making any sense what-so-ever.

    The best thing to do would be to cut a piece of the original video so that you get a file size that is no more than 100MB and then post that sample to a website such as http://www.rapidshare.com/ so we can download it and take a look at it.

    - John "FulciLives" Coleman
    "The eyes are the first thing that you have to destroy ... because they have seen too many bad things" - Lucio Fulci
    EXPLORE THE FILMS OF LUCIO FULCI - THE MAESTRO OF GORE
    Quote Quote  
  3. Is this right?
    No. Unless you're simply tossing out the first field, the video remains the same length, and the audio remains in synch. You can't pick up a 20 ms asynch with your ears anyway.

    However, I question most of your first paragraph. I don't understand why swapping the field order keeps from introducing ghosting when using a blend deinterlacer. Unless you just have the common PAL problem of phase shifted fields, and you've put them back in phase. Which would mean no deinterlacing is needed.

    I see now that FulciLives has also answered. And he beat me to what was going to be my next suggestion, a short sample of the video in question.

    100 MB? 10 seconds or so should be enough to see what's going on.
    Quote Quote  
  4. Member
    Join Date
    Jul 2007
    Location
    United Kingdom
    Search Comp PM
    Makes sense to me. Each field is shown for half the time each frame lasts. If I swap the fields and deinterlace, then the audio should be knocked out of sync by one half of the frame time.

    I think I've noticed this but it's hard to be sure.
    Quote Quote  
  5. Always Watching guns1inger's Avatar
    Join Date
    Apr 2004
    Location
    Miskatonic U
    Search Comp PM
    All that swapping the fields does is change the order in which they are drawn. It does nothing to the number of fields, frame or duration as far as I can see. Unless you actually discard a field somewhere in the process, you should not have any issues.
    Read my blog here.
    Quote Quote  
  6. Member
    Join Date
    Jul 2007
    Location
    United Kingdom
    Search Comp PM
    Originally Posted by manono
    Is this right?
    No. Unless you're simply tossing out the first field, the video remains the same length, and the audio remains in synch. You can't pick up a 20 ms asynch with your ears anyway.

    However, I question most of your first paragraph. I don't understand why swapping the field order keeps from introducing ghosting when using a blend deinterlacer. Unless you just have the common PAL problem of phase shifted fields, and you've put them back in phase. Which would mean no deinterlacing is needed.

    I see now that FulciLives has also answered. And he beat me to what was going to be my next suggestion, a short sample of the video in question.

    100 MB? 10 seconds or so should be enough to see what's going on.
    I can easily spot a 20 ms desync, especially using headphones, possibly even 5 ms.

    Here is a sample of the video.

    http://rapidshare.com/files/43951408/f.mpg.html

    See how the interlacing by BFF causes it to be constantly out of phase. By swapping the field order and blending this is easily fixed, but does this effect the sync?
    Quote Quote  
  7. Member
    Join Date
    Jul 2007
    Location
    United Kingdom
    Search Comp PM
    Originally Posted by guns1inger
    All that swapping the fields does is change the order in which they are drawn. It does nothing to the number of fields, frame or duration as far as I can see. Unless you actually discard a field somewhere in the process, you should not have any issues.
    Yes, but what if there is different information in each field? By swapping them, you are showing something too early or too late.
    Quote Quote  
  8. Member FulciLives's Avatar
    Join Date
    May 2003
    Location
    Pittsburgh, PA in the USA
    Search Comp PM
    Here is your AviSynth script:

    Code:
    LoadPlugin("DGDecode.dll")
    LoadPlugin("Decomb.dll")
    MPEG2Source("D:\ZZZ\sample.d2v")
    AssumeTFF()
    Telecide(guide=2)
    ConvertToYUY2()
    I used CCE SP to re-encode (7500kbps 1-pass CBR) and I converted the audio to a 320kbps 2.0 AC-3 audio file using GoldWave and Soft Encode. I muxed it together with MPEG2VCR.

    Download Link: http://rapidshare.com/files/43956353/sample.mpg

    The name of the file is "sample.mpg"

    The last frame is interlaced but that's just due to the frame it was cut on. The video is now progressive other than that last frame.

    Do I win something? :P

    - John "FulciLives" Coleman
    "The eyes are the first thing that you have to destroy ... because they have seen too many bad things" - Lucio Fulci
    EXPLORE THE FILMS OF LUCIO FULCI - THE MAESTRO OF GORE
    Quote Quote  
  9. Member
    Join Date
    Jul 2007
    Location
    United Kingdom
    Search Comp PM
    Thats cool FulciLives, I can do all that with TmpgEnc in one operation. My problem is not knowing if the audio is still perfectly sync'ed.
    Quote Quote  
  10. Member
    Join Date
    Jul 2007
    Location
    United Kingdom
    Search Comp PM
    I think it makes perfect sense. Using TmpgEnc, when you swap the fields and deinterlace, you are essentially moving everthing back by half a frame. Half a frame is 20 ms, so setting the audio shift to -20 ms is needed to keep it perfectly in sync.

    I leave it to anyone to prove I'm wrong.
    Quote Quote  
  11. Do I win something?
    Hardly, since I was first to suggest that might be what's going on:
    Originally Posted by manono
    Unless you just have the common PAL problem of phase shifted fields, and you've put them back in phase. Which would mean no deinterlacing is needed.
    Originally Posted by Alex DeLarge
    I can easily spot a 20 ms desync, especially using headphones, possibly even 5 ms.
    You're saying you can spot an audio asynch of as little as 1/200th of a second, and also tell if the audio is advanced or delayed when compared to the video? I don't believe you.
    Originally Posted by Alex DeLarge
    Using TmpgEnc, when you swap the fields and deinterlace
    You're not really deinterlacing, are you? Once the fields are realigned properly, there's no need to deinterlace.

    Think what you want about the audio, but I haven't ever heard of anyone feeling the need to adjust the audio delay after performing a simple Telecide (or its equivalent).
    Quote Quote  
  12. Member
    Join Date
    Jul 2007
    Location
    United Kingdom
    Search Comp PM
    Originally Posted by manono
    Originally Posted by Alex DeLarge
    I can easily spot a 20 ms desync, especially using headphones, possibly even 5 ms.
    You're saying you can spot an audio asynch of as little as 1/200th of a second, and also tell if the audio is advanced or delayed when compared to the video? I don't believe you.
    That was with extreme concentration viewing the same material over and over with a highly sync'ed bit of material. Justin Timberlakes 'My Love' video.

    20 ms is easy to spot though.

    Originally Posted by manono
    Originally Posted by Alex DeLarge
    Using TmpgEnc, when you swap the fields and deinterlace
    You're not really deinterlacing, are you? Once the fields are realigned properly, there's no need to deinterlace.

    Think what you want about the audio, but I haven't ever heard of anyone feeling the need to adjust the audio delay after performing a simple Telecide (or its equivalent).
    Interesting, so you just swap the fields and encode as interlaced. What if you want to change the aspect ratio? Then you would have to deinterlace first. Yes?
    Quote Quote  
  13. I was just playing with this some more. Am I right in thinking that you're not frameserving with AviSynth? Because I was experimenting with 2 AviSynth IVTCs on your sample just now. FulciLives is right in saying that the last frame is interlaced (if the default deinterlacer is turned off) when using Decomb's Telecide for the field matching. And his first frame is nice looking. It seems that Decomb's IVTC is tossing out the first field (for which there is no good match), thereby creating a 20ms asynch in the audio.

    But, when using TIVTC for the job, the first frame is interlaced (with the default deinterlacer turned off), and the last frame is nice looking. Both methods have the same 241 frames as the sample, but it looks to me as if TIVTC is keeping the first field, and also keeps the audio synch.

    So, I guess in answer to your question about whether or not the audio gets out of synch (even by so little that "normal" people can't tell), the answer is, "It depends". But I have no idea what TMPGEnc does. Maybe use your sample in TMPGEnc, swap the fields, and see if the first or last frame remains interlaced.
    Interesting, so you just swap the fields and encode as interlaced.
    Personally, I'd do a proper colorspace progressive conversion in AviSynth before feeding it to TMPGEnc, but you can still encode it as interlaced, yes.
    What if you want to change the aspect ratio?
    Like from 4:3 to 16:9? First make it progressive (and here's where a proper colorspace conversion becomes even more important), then crop 72 rows of pixels from both the top and bottom, resize to 720x576, and encode for progressive 16:9. Again, more easily done using AviSynth, especially if you want to encode it as interlaced.
    Then you would have to deinterlace first. Yes?
    Well, yes, but what you're doing isn't really deinterlacing. It's more properly called realigning the fields, or field matching. One benefit is that there's no longer any interlacing. But the improvement in the video quality is huge, compared to if you had just blend deinterlaced the original video, or used any other kind of a deinterlacer. No deinterlacing artifacts.

    By the way, that sample is Top Field First. Perhaps the field order got switched when you cut the sample. Or maybe you didn't figure the field order correctly (hint: don't believe TMPGEnc).
    Quote Quote  
  14. Member
    Join Date
    Jul 2007
    Location
    United Kingdom
    Search Comp PM
    No, I'm not using avisynth, I sometimes use it for loading difficult files into TmpgEnc, but not here.

    It seems very clear to me, load the file in TmpgEnc, skip along to a scene change or easily identifiable cut. Then deinterlace, when you swap the fields the picture changes. It moves back and forward by one frame. The time stays the same, the position of the audio file stays the same, but the frame changes.

    This clealy shows that deinterlacing this clip, badly interlaced as it is, as lots of others are too, knocks the audio out of sync by exactly one half frame. Ie, 20 ms.

    The only way to keep the sync would be to keep it as it is, blend as it is, or move the audio back by 20 ms.
    Quote Quote  
  15. Always Watching guns1inger's Avatar
    Join Date
    Apr 2004
    Location
    Miskatonic U
    Search Comp PM
    Or shift the audio 20 ms
    Read my blog here.
    Quote Quote  
  16. Member
    Join Date
    Jul 2007
    Location
    United Kingdom
    Search Comp PM
    Yeah, I just edited that guns1inger. Thats the good thing about TmpgEnc. You can see the sound wave, and the frames at the same time. I don't know, maybe I'm missing something, but it seems obvious to me.
    Quote Quote  
  17. Always Watching guns1inger's Avatar
    Join Date
    Apr 2004
    Location
    Miskatonic U
    Search Comp PM
    As I always encode audio and video separately, I would just load them into MPC and test the delay to see if it really makes a difference. The + and - keys shift the audio by 10 ms at a time in either direction. If it does make a difference, it's easy enough to fix.
    Read my blog here.
    Quote Quote  



Similar Threads

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