VideoHelp Forum




+ Reply to Thread
Results 1 to 21 of 21
  1. Hey all,

    decided I might as well ask. I probably won't find out without asking, so here I go. I think this goes under this section and not the advanced section?

    Interlaced content, it plays fine and all with my media players and the codecs I have. Although as soon as I re-encode it, the fields show at different times and it gives the video a "scanline-ghosting" effect.
    Like this:


    Which is really irritating. Although if I deinterlace it, then that doesn't happen. Although iv heard that it can cause ghosting, apparently to fix the ghosting problem when deinterlacing content is to telecine/telecide it?
    I remember looking it up and it seems to be the process of either converting NTSC to PAL or PAL to NTSC? Soo, a change in frame rates?


    I recently heard from a friend that interlaced content refreshes much faster than progressive content, although its obviously not going to make much of a difference to most of us as most of the monitors we use would have a rather low refresh rate and our eye can only see around 30 frames/changes per second.
    Also the framte rate may make this kinda pointless/useless?


    So now, what are the pros and cons of interlaced content. Also Interlaced content vs Progressive scan content, whats the main difference and why would you go for one over the other?

    What is the best way to re-encode interlaced content and not get that annoying "scanline-ghosting" effect?

    Thanks
    Quote Quote  
  2. The picture you posted is not a standard frame size so it has either been cropped or resized. These operations need to be done correctly on interlaced material or you'll get the "ghosting" problem.

    Telecine is not necessarily PAL to NTSC, although it can be used for that. Telecine is the process of converting standard film framerate (24fps) to NTSC broadcast standard (29.97fps). It can be used to convert to PAL (25fps) but it's more common to just speed it up a little.

    Interlaced content does not refresh faster than it's progressive counterpart, but it displays only half a frame at a time (either even scan lines or odd scan lines first) and the two half-frames (called fields) are from two different points in time, so for 1 second of 29.97 fps interlaced material, you'll see 59.94 fields.
    Progressive content is complete frames with both the odd and even scan lines from the same moment in time. All film is progressive, or a series of complete pictures.

    The telecine process separates progressive material into fields, then through a series of repeating and reordering the fields converts to the desired frame rate. Telecined material can usually be spotted by stepping through a video a frame at a time and seeing some frames that are complete pictures (both fields from the same moment) and some frames that are interlaced (fields from two different moments). Telecined material should be treated as interlaced unless an inverse-telecine is performed to return it to it's progressive state.

    I often see people use the terms deinterlace and inverse-telecine as if they mean the same thing, but they don't.
    They both are methods to create progressive frames from interlaced frames, but inverse-telecine can only be performed on material that originated as progressive material and had a telecine process applied to it. For true interlaced material, in order to deinterlace correctly, the process needs to interpret and create information not present in the fields. The simplest method discards 1 field from each frame and stretches the remaining field to the full frame size. So, of course, half the detail is gone. The better deinterlacers interpret from adjoining frames to create new progressive frames.

    All TVs will display interlaced material correctly. Older TVs display everything as interlaced content because that's how they work. The newer flatscreen TVs are progressive displays, so they perform a "deinterlace" process for interlaced material.
    "Shut up Wesley!" -- Captain Jean-Luc Picard
    Buy My Books
    Quote Quote  
  3. Yes, I took a screenshot and did a quick crop in photoshop to get just the video and none of the program. I only really needed the white/black thing where the 2 fields are showing.

    When I deinterlace video's I normally blend the 2 fields together.
    This would blend the 2 fields from different times together? Or would it try and match the fields.

    Which would be one of the better deinterlacers? Not too sure what you mean by adjoining. Merging/joining/blending the frames together?

    Also it seems like when it comes to re-encoding interlaced content you are likely bound to loose a bit of quality if you deinterlace it? As you will either be removing around half of the video as well as stretching it twice as much and if you get one of the deinterlacers that interpret whats ment to be in the missing gap then the detail will possibly be slightly off?

    If so, why do we still get interlaced videos I wonder. That also makes Progressive Scan better than interlaced content and if possible get Progressive content over interlaced?
    Quote Quote  
  4. Television signals are broadcast as interlaced to conserve bandwidth. Most camcorders record interlaced. All CRT type TVs display interlaced. All TVs know how to handle interlaced signals. If re-encoding in necessary, maintain interlace and field order and quality is preserved. Better software players will deinterlace on playback. Not usually as well as TVs, but adequate for watching on computer. If your re-encodes don't look nearly as good as the source, then there is something wrong with your process or the tools you are using. If you want to improve your re-encodes then explain what your source is, what your destination is, and what process and tools you are using. There are many helpful and knowledgeable people here that can help you, all you have to do is ask...
    "Shut up Wesley!" -- Captain Jean-Luc Picard
    Buy My Books
    Quote Quote  
  5. Originally Posted by PsyCLown
    When I deinterlace video's I normally blend the 2 fields together.
    This would blend the 2 fields from different times together? Or would it try and match the fields.
    "Blend" functions usually just blur the two fields together. The end result looks like a double exposure when there is significant motion:



    The simplest deinterlacers just drop one field and repeat the first, or interoplate the in-between scan lines. Better deinterlacers will analyze successive frames and pass both fields through in areas where there is no motion (retaining full resolution in those areas) and only deinterlace where there is motion. Smarter deinterlacers will look at motion in the frame(s) and try to match up parts from the second field, even fields from other frames. This is difficult and it isn't always possible to get a perfect match or prediction anyway. So smart deinterlacers vary in their output quality.

    Originally Posted by PsyCLown
    Which would be one of the better deinterlacers?
    The very best one I know of at this time is AviSynth's TempGaussMC_beta1().

    You can also Bob (dumb or smart). That is the process of turning each field into a frame. A 29.97 fps interlaced video will become a 59.94 fps progressive video. This retains the full temporal resoltion (fluid motion) of the source. Again, results vary depending on how well the algorithm works and the nature of the video. Progressive HDTVs do this with varying degrees of quality.

    It's not true that you can only see 30 frames per second. Here's a video with 24 fps, 30 fps, and 60 fps motion:

    24v30v60.avi

    If you are watching this on a 60 fps monitor you will see the 60 fps bars are moving much more smoothly than the other two.

    Originally Posted by PsyCLown
    Also it seems like when it comes to re-encoding interlaced content you are likely bound to loose a bit of quality if you deinterlace it?
    Yes. If you reduce 29.97i to 29.97p you will lose half the temporal resolution and up to half the spacial resolution depending on the method used. You may also get artifacts where the deinterlacer didn't work quite right. If you convert to 60p with a good motion adaptive deinterlacer you will retain the temporal resolution but will hopefully only lose a little spacial resolution.

    Originally Posted by PsyCLown
    As you will either be removing around half of the video as well as stretching it twice as much and if you get one of the deinterlacers that interpret whats ment to be in the missing gap then the detail will possibly be slightly off?
    Exactly.

    Originally Posted by PsyCLown
    If so, why do we still get interlaced videos I wonder. That also makes Progressive Scan better than interlaced content and if possible get Progressive content over interlaced?
    Because broadcasters like the fact that interlaced video only requires half the bandwidth.
    Quote Quote  
  6. Alright, thanks!

    I have a few smaller questions, although they arent really related to this topic.

    For encoding I normally use Avidemux as its multithreaded for quads, although I prefer using VirtualDub, but VD is a lot slower as it only makes use of 2 cores I think.

    I dont use Avi Synth Scrips, although id like to start. Just not too sure as to how I should go about it.
    Quote Quote  
  7. Originally Posted by PsyCLown
    For encoding I normally use Avidemux as its multithreaded for quads, although I prefer using VirtualDub, but VD is a lot slower as it only makes use of 2 cores I think.
    Although VirtualDub uses only two threads (one for filtering, another for encoding) the encoder can create as many child threads as it likes. So your job is 90 percent encoding and 10 percent filtering (and the encoder can efficiently use all cores), you will be able to use almost 100 percent of your CPU. If your job is 90 percent filtering and 10 percent encoding you'll only be able to use a little over 25 percent of a quad core CPU.

    Xvid isn't very well multithreaded so it can't effectively use all four cores of a quad core CPU (I get around 70 percent). Divx is a better at using 4 cores (85 percent). x264vfw is well multithreaded and can use all for cores effectively.

    One easy way to get started with AviSynth is to use AvsP -- a GUI for creating AVS scripts. AVS scripts are plain text files you can edit them with Notepad.
    Quote Quote  
  8. Originally Posted by jagabo
    Originally Posted by PsyCLown
    For encoding I normally use Avidemux as its multithreaded for quads, although I prefer using VirtualDub, but VD is a lot slower as it only makes use of 2 cores I think.
    Although VirtualDub uses only two threads (one for filtering, another for encoding) the encoder can create as many child threads as it likes. So your job is 90 percent encoding and 10 percent filtering (and the encoder can efficiently use all cores), you will be able to use almost 100 percent of your CPU. If your job is 90 percent filtering and 10 percent encoding you'll only be able to use a little over 25 percent of a quad core CPU.

    Xvid isn't very well multithreaded so it can't effectively use all four cores of a quad core CPU (I get around 70 percent). Divx is a little better. x264vfw is well multithreaded and can use all for cores effectively.
    So the codec has to be multithreaded and then the application making use of the codec needs to be able to use the codec properly and create the multiple threads so more than just 1 core gets used?

    I normally work with H264 video and the x264 codec, seldomly use XviD and never use DivX.

    I started playing around with some GUI's for AviSynth and for now I rather like meGUI, is there perhaps any other GUI which I could look at that is relatively easy to use or a place where I can learn more about doing avisynth scripting manually from notepad?
    A site that may have a few basics, like joining various files together to make one and changing containers and so on perhaps?
    I have had a need in the past to use an AviSynth script to merge VOB files and re-encode it into a single 700MB rip.
    Quote Quote  
  9. Originally Posted by PsyCLown
    So the codec has to be multithreaded and then the application making use of the codec needs to be able to use the codec properly and create the multiple threads so more than just 1 core gets used?
    No, the codec can create child threads regardless of the program that's using it.

    Originally Posted by PsyCLown
    I normally work with H264 video and the x264 codec, seldomly use XviD and never use DivX.
    x264vfw works well with VirtualDub. But AVI isn't a great container for h.264 video.

    Originally Posted by PsyCLown
    I started playing around with some GUI's for AviSynth and for now I rather like meGUI, is there perhaps any other GUI which I could look at that is relatively easy to use or a place where I can learn more about doing avisynth scripting manually from notepad?
    You can always open AVS scripts created by other programs with Notepad.

    Originally Posted by PsyCLown
    A site that may have a few basics, like joining various files together to make one and changing containers and so on perhaps?
    I have had a need in the past to use an AviSynth script to merge VOB files and re-encode it into a single 700MB rip.
    AviSynth's site is a good place to start:
    http://avisynth.org/mediawiki/Main_Page

    Merging VOB files is easy. First create index files (.D2V) with DgIndex (part of the DgMpgDec package) then:

    Code:
    v1 = Mpeg2Source("file1.d2v")
    v2 = Mpeg2Source("file2.d2v")
    v3 = Mpeg2Source("file3.d2v")
    
    return(v1+v2+v3)
    To make a 700MB file you will probably want to resize too:

    Code:
    v1 = Mpeg2Source("file1.d2v")
    v2 = Mpeg2Source("file2.d2v")
    v3 = Mpeg2Source("file3.d2v")
    
    return(v1+v2+v3).BicubicResize(640,480)
    Quote Quote  
  10. Originally Posted by jagabo
    Originally Posted by PsyCLown
    So the codec has to be multithreaded and then the application making use of the codec needs to be able to use the codec properly and create the multiple threads so more than just 1 core gets used?
    No, the codec can create child threads regardless of the program that's using it.

    Originally Posted by PsyCLown
    I started playing around with some GUI's for AviSynth and for now I rather like meGUI, is there perhaps any other GUI which I could look at that is relatively easy to use or a place where I can learn more about doing avisynth scripting manually from notepad?
    You can always open AVS scripts created by other programs with Notepad.

    Originally Posted by PsyCLown
    A site that may have a few basics, like joining various files together to make one and changing containers and so on perhaps?
    I have had a need in the past to use an AviSynth script to merge VOB files and re-encode it into a single 700MB rip.
    AviSynth's site is a good place to start:
    http://avisynth.org/mediawiki/Main_Page
    Thanks, will spend some time on their site and try to start using some synth scripts
    Take a look at some scripts and perhaps eventually ill be able to do a few things myself, I think it will be easier to make the scripts yourself in notepad if you know how to

    Originally Posted by jagabo
    Originally Posted by PsyCLown
    I normally work with H264 video and the x264 codec, seldomly use XviD and never use DivX.
    x264vfw works well with VirtualDub. But AVI isn't a great container for h.264 video.
    Yeh, I have heard so. Im still not sure why, some does it not support some features which H264 normally enabled by default or something similar to that?
    Also if I have an H264 stream inside an AVI container and I move it into an MKV container, it would be the same as if I had created it inside the MKV container?
    I wouldnt loose something just for having it created inside an AVi container?

    EDIT: Only noticed now that you gave me the script to join VOB files. Thanks
    Quote Quote  
  11. Originally Posted by PsyCLown
    Originally Posted by jagabo
    Originally Posted by PsyCLown
    I normally work with H264 video and the x264 codec, seldomly use XviD and never use DivX.
    x264vfw works well with VirtualDub. But AVI isn't a great container for h.264 video.
    Yeh, I have heard so. Im still not sure why, some does it not support some features which H264 normally enabled by default or something similar to that?
    The problem isn't so much the container itself but in VFW's handling of AVI. VFW is based on a one-frame-in-one-frame out model. This causes problem with codecs that use backwards prediction. (Most high compression codecs only encode the differences between frames most of the time. A backwards predicted frame is one that can't be reconstructed until a later frame has been reconstructed.) So codecs that use backwards prediction are forced to use tricks (Divx's packed bitstream for example) in order for VFW to work. AVI can also have problems with variable frame rates.

    Originally Posted by PsyCLown
    Also if I have an H264 stream inside an AVI container and I move it into an MKV container, it would be the same as if I had created it inside the MKV container?
    I wouldnt loose something just for having it created inside an AVi container?
    I'm not real sure about this. I think you'll have no problems going from h.264 in an AVI container to MKV. The other way around is often a problem.
    Quote Quote  
  12. Member
    Join Date
    Nov 2007
    Location
    United States
    Search Comp PM
    Greets,

    Since you are not happy with your current method of de-interlacing, prefer not to use Avi Synth scripts, like H.264 and have multiple cores. I would suggest trying the latest version of Handbrake 0.9.3 along with it's modified Decomb method if you have not already. It uses Yadif along with mcdeint and a lowpass-5 filter as needed. More detail here http://trac.handbrake.fr/wiki/Decomb .

    I have been using this method for some time now and really liking the results. Tried quite a few of the popular deinterlacing methods with avs scripts and prefer Handbrake's output. My SD DVD HTPC encodes look very nice to my eyes at CQ 60%, no Trellis, SME9, MKV, AC3, plus other settings blah blah on my 32" SD TV.

    Cheers,
    Rick
    Rene: Could you not just wound him a little bit?
    Hans: Well now, with a 25 pound shell that is not easy.

    'Allo 'Allo
    Quote Quote  
  13. Video Restorer lordsmurf's Avatar
    Join Date
    Jun 2003
    Location
    dFAQ.us/lordsmurf
    Search Comp PM
    Rarely does anybody need to deinterlace.
    Want my help? Ask here! (not via PM!)
    FAQs: Best Blank DiscsBest TBCsBest VCRs for captureRestore VHS
    Quote Quote  
  14. If you're making h.264 MKV files you'll want to IVTC or deinterlace.
    Quote Quote  
  15. Originally Posted by lordsmurf
    Rarely does anybody need to deinterlace.
    By that you mean.... There are other methods apart from deinterlacing such as IVTC or you dont often come accross content that is interlaced which you'd like to re-encode?

    Originally Posted by jagabo
    If you're making h.264 MKV files you'll want to IVTC or deinterlace.
    Yeh, I checked out MeGUI and it has an analyse button that analysis the video and determines what type of video it is and if its interlaced it picks up the field order and so on.
    It automatically selected IVTC and the results were really nice, the only problem is that the audio is out of sync...

    I tried the same with another interlaced file and the same happend, audio gets out of sync more as the video keeps playing.
    Im assuming it has something to do with the drop in frame rates? Although its rather strange, the length stays the same and all.

    What would be the cons of changing the frame rate back to 29.970 by adding a line into the script to do that? Would there be some ghosting or perhaps the video will jerk a bit?

    Also what would be the best way to get the audio and video back into sync?

    As well as how would I go about using AviSynth's TempGaussMC_beta1 deinterlacer? Is it built into AviSynth? What line of code should I add to the script?

    Thanks, really appreciate all the help I'm getting
    Quote Quote  
  16. IVTC doesn't cause sync problems. The frame rate is reduced by 20 percent and the number of frames is reduced 20 percent. The result is a file with exactly the same runnign time. Something else is going wrong with your conversion. What is your source? DVD?
    Quote Quote  
  17. Member
    Join Date
    Aug 2004
    Location
    Western Ma. United States
    Search Comp PM
    OP said: "Although as soon as I re-encode it, the fields show at different times and it gives the video a "scanline-ghosting" effect."

    My guess would be that whatever he/she is useing to re-encode, is flipping the fields. Check the options for that program.

    Don't remember offhand what field comes first A or B, but I do know they are different for DV or TV.

    Good luck
    The Second Amendment:
    AMERICA'S ORIGINAL
    HOMELAND SECURITY
    Quote Quote  
  18. Originally Posted by jagabo
    IVTC doesn't cause sync problems. The frame rate is reduced by 20 percent and the number of frames is reduced 20 percent. The result is a file with exactly the same runnign time. Something else is going wrong with your conversion. What is your source? DVD?
    One is off a DVD, a single VOB which looks fine untill I try to re-encode it.

    The other is an AVI file and there I can see the fields already, there are 4 AVI files and I need to merge them as well...
    I appended them with MKV Merge and it was perfectly in sync after I merged them. Once I do the IVTC then it goes out of sync.

    At the beginning, the intro (2min or so) seems to be in sync then after that its out of sync and as the video goes on it seems as if it gets out of sync even more.
    I created chapters for it (from the merged file which was in sync) and if I go by the chapters on the version that is out of sync its just the video that is out of sync. The audio is sync'd with the chapters.

    Here is the Script that I used for the encoding of the VOB file.

    Code:
    DGDecode_mpeg2source("file_path.d2v",info=3)
    ColorMatrix(hints=true,interlaced=true)
    tfm(order=-1).tdecimate(hybrid=1)
    crop( 2, 42, -2, -58)
    LanczosResize(624,368) # Lanczos (Sharp)
    I used meGUI to create it, updated it fully as well. Im wondering if MeGUI perhaps isnt doing something incorrectly. Its the only program iv used that script with, perhaps ill try with VD mod then edit this post.

    Originally Posted by hunter99
    OP said: "Although as soon as I re-encode it, the fields show at different times and it gives the video a "scanline-ghosting" effect."

    My guess would be that whatever he/she is useing to re-encode, is flipping the fields. Check the options for that program.

    Don't remember offhand what field comes first A or B, but I do know they are different for DV or TV.

    Good luck
    Hmm, flipping the fields. No clue, I have tried with more than 1 program to re-encode interlaced content and they all seem to give me the same results unless I deinterlace it.

    I'd prefer to IVTC the video though, just with both of thoes files the audio is out of sync.
    Quote Quote  
  19. Reversed field order causes a very fast jerkiness. On an interlaced display fully interlaced video will jerk back and forth 60 times a second in a two steps forward, one step back fashion. This is fast enough that people may describe it as strobing or flickering.

    rev.avi

    Telecined film will jerk less often because only two of every 5 frames is interlaced.

    Interlaced frames contain two half images, each taken at a different time, called fields. One field is contained in all the even numbered scanlines, the other in all the odd numbered scanlines. Fully interlaced video will have 60 fields per second, each from a different point in time, and each to be viewed individually on the TV screen (you never see an entire frame at once). Two out of every five frames in a telecined movie are interlaced, one field from one film frame, the other from the next film frame.

    Since these two fields are to be viewed sequentially the player must know which one to display first. This is the field order. Different programs use different terminology for the field order. Top/bottom, even/odd, A/B, 1/2, etc.

    Regarding your IVTC:

    Many VOB files have variable frame rates. They may switch back and forth between progressive with 3:2 pulldown and fully interlaced frames. This often happens with studio logos and such at the start of the video. I would get the latest version of DgMpgDec and examine the source with DgIndex. If the main body of the movie is encoded at 23.976 fps rebuild the D2V file with Forced Film. There will be no need to IVTC in the script. If the body of the film is interlaced use Honor Pulldown Flags then IVTC in the script. Be sure to note any audio delay (it's in the filename) and add it in when you encode with VirtualDub.
    Quote Quote  
  20. Originally Posted by jagabo
    Reversed field order causes a very fast jerkiness. On an interlaced display fully interlaced video will jerk back and forth 60 times a second in a two steps forward, one step back fashion. This is fast enough that people may describe it as strobing or flickering.

    rev.avi

    Telecined film will jerk less often because only two of every 5 frames is interlaced.

    Interlaced frames contain two half images, each taken at a different time, called fields. One field is contained in all the even numbered scanlines, the other in all the odd numbered scanlines. Fully interlaced video will have 60 fields per second, each from a different point in time, and each to be viewed individually on the TV screen (you never see an entire frame at once). Two out of every five frames in a telecined movie are interlaced, one field from one film frame, the other from the next film frame.

    Since these two fields are to be viewed sequentially the player must know which one to display first. This is the field order. Different programs use different terminology for the field order. Top/bottom, even/odd, A/B, 1/2, etc.

    Regarding your IVTC:

    Many VOB files have variable frame rates. They may switch back and forth between progressive with 3:2 pulldown and fully interlaced frames. This often happens with studio logos and such at the start of the video. I would get the latest version of DgMpgDec and examine the source with DgIndex. If the main body of the movie is encoded at 23.976 fps rebuild the D2V file with Forced Film. There will be no need to IVTC in the script. If the body of the film is interlaced use Honor Pulldown Flags then IVTC in the script. Be sure to note any audio delay (it's in the filename) and add it in when you encode with VirtualDub.
    Ok, well, did that and this is a screenshot of the side panel thingy.



    The frame rate never changes and neither does the frame type or field order.
    The coding type changes rapidly, its B and I think it changes to P as well.

    With MeGUI after I used the d2v file I created with DGIndex (Honour Pulldown) and I analyse it...
    This is what I get.



    So im assuming the method MeGUI used returned incorrect info? As the source type should be interlaced, field order is top.
    MeGUI also changes its selectable deinterlacers/methods according to the source type. If I set the source type to Interlaced then there is no IVTC option.
    When I set it to what it selected after analysing the video, there is TIVTC, TIVTC + TDeint(EDI) and Decomb IVTC...
    I've been using TIVTC, I thought it read IVTC. Always just glanced over that option untill now.

    Also Lanczos is one of the better resize filters?


    PS. I used the same script as I posted in my above post and I used VD Mod this time and it seems as if the audio is in sync once I mux the audio and video together.
    Soo, I think it may have been a problem with the encoder MeGUI was using? That script only changes the video. I used the same audio iv been using for the one which was out of sync and the VD encode.
    Quote Quote  
  21. I don't use MeGUI so it's hard for me to speculate what is going wrong when you use it to encode. The script looks fine to me. But it sounds like you found a way around the problem -- generate a script with MeGUI then use VirtualDubMod to encode.

    TIVTC() is one of the better IVTC filters for AviSynth. The best IVTC/deinterlace filter I've seen is TempGaussMC_beta1(). But it is very slow. Something like 1/50 the speed of TIVTC(), Yadif(), etc.

    The best way to IVTC is manually but it's hard to describe and can be rather tedious. In short it looks like:

    WhateverSource()
    SeparateFields().SelectEvery(10, 0,1, 2,3, 4,5 7,8).Weave()

    The SelectEvery() arguments vary depending on where in the telecine pattern the video starts. And if there are any breaks you have to manually search for them and work in sections. A movie may IVTC with a single pattern, or only have a few breaks. Sometimes you'll find a break at every new camera shot.

    Lanczos4 will give sharp resizing without generating too many moire artifacts. Lanczos3 is a tiny bit less sharp. The Bicubics are sharp but generates slightly more moire artifacts. The differences between all of them is subtle. Note that sharpening filters will sharpen macroblock, DCT ringing artifacts, and noise too.

    Bilinear is less sharp than all of the above but is a good choice is you have noisy, blurry video to start with (like VHS). The results will compress better because of the natural noise reduction you get with it.
    Quote Quote  



Similar Threads

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