VideoHelp Forum
+ Reply to Thread
Results 1 to 28 of 28
Thread
  1. Member
    Join Date
    May 2005
    Location
    Australia-PAL Land
    Search Comp PM
    Hello all, I'd like to do some trials to improve my understanding of fields and how they are converted during the various deinterlacing processes.

    To do this, I thought that a interlaced file, with markedly different fields, for example, one field has horizontal lines and the other field has vertical lines, would allow me to see how each field is processed.

    The problem is, I have no idea about how to create such a interlaced file. I have made up two images, attached, which could be used to create the file.

    I would be grateful if any of the video coding experts could create say a 30 second interlaced file using the two images. I'd prefer having the "top field" image first if possible as that will match the normal analogue interlacing convention.

    Thanks for any help here.

    Image
    [Attachment 80824 - Click to enlarge]


    Image
    [Attachment 80825 - Click to enlarge]
    Quote Quote  
  2. I don't think this is going to help you much. Made with AviSynth:

    Code:
    BlankClip(width=720, height=31, color=$ffffff, length=30*25).AddBorders(0,0,0,1)
    top = StackVertical(last, last, last, last, last, last, last, last, last)
    
    BlankClip(width=35, height=288, color=$ffffff, length=30*25).AddBorders(0,0,1,0)
    StackHorizontal(last, last, last, last, last)
    bot = StackHorizontal(last, last, last, last)
    
    Interleave(top, bot)
    AssumeTFF()
    AssumeFieldBased()
    Weave()
    
    AssumeFPS(25)
    ConvertToYV12(interlaced=true)
    MPEG 2 elementary stream, encoded with HCGui.
    Image Attached Files
    Last edited by jagabo; 19th Jul 2024 at 23:12. Reason: removed mpg file, added m2v file
    Quote Quote  
  3. Something like this might be more helpful:

    Code:
    BlankClip(width=720, height=576, color=$606060, length=60*25)
    ShowFrameNumber(x=50, y=350, size=250)
    AssumeTFF()
    ConvertToYV12(interlaced=true)
    SeparateFields()
    SelectEvery(4,0,3)
    Weave()
    AssumeFPS(25)
    Image Attached Files
    Quote Quote  
  4. Member
    Join Date
    May 2005
    Location
    Australia-PAL Land
    Search Comp PM
    Fantastic, Jagabo, thank you very much (again). The numbers file, especially, is brilliant.
    Quote Quote  
  5. Member
    Join Date
    May 2005
    Location
    Australia-PAL Land
    Search Comp PM
    I am pretty surprised by the bad job VDub Yadif x 2 did:

    Image
    [Attachment 80830 - Click to enlarge]


    QTGMC, on the other hand, was pretty clean:

    Image
    [Attachment 80832 - Click to enlarge]
    Quote Quote  
  6. Not really surprised, taking into account that:
    a. yadif isn't really new or updated
    b. the clip is rather synthetic
    for fun: https://imgsli.com/MjgwNTM1
    users currently on my ignore list: deadrats, Stears555
    Quote Quote  
  7. @Alwyn: You may also want to experiment with this interlaced clips. The 2 fields are from different pictures as you will easily see by separating the fields.
    Be surprised how differently various deinterlacers act on it.
    It's not a realistic deinterlacer test though as it is a synthetic non-natural source.
    (I made it some time ago to prove to the developpers that their NLE didn't handle interlaced YUV 4:2:0 footage properly.)
    Image Attached Files
    Last edited by Sharc; 20th Jul 2024 at 06:42.
    Quote Quote  
  8. Member
    Join Date
    May 2005
    Location
    Australia-PAL Land
    Search Comp PM
    Thanks Selur, interesting.


    Thanks Sharc, that mp4 doesn't play well in VDub or Magix.
    Quote Quote  
  9. Originally Posted by Alwyn View Post
    Thanks Sharc, that mp4 doesn't play well in VDub or Magix.
    I don't understand "doesn't play well". What do you expect?
    Quote Quote  
  10. Member
    Join Date
    May 2005
    Location
    Australia-PAL Land
    Search Comp PM
    What do you expect?
    Well, I expected it to play properly, like the AVI. It doesn't. The field lines are visible continuously, for a start. Some of the objects are solid, some have the field lines through them.
    Quote Quote  
  11. Originally Posted by Alwyn View Post
    What do you expect?
    Well, I expected it to play properly, like the AVI. It doesn't. The field lines are visible continuously, for a start. Some of the objects are solid, some have the field lines through them.
    Now (bob-)deinterlace it, and see and compare what the various tools (source filters and deinterlacers) do with the 2 fields. Step through the frames and separated fields to see the "leaks".

    Added:
    for example using QTGMC vs yadifmod2(mode=1) and stepping through:
    Image Attached Files
    Last edited by Sharc; 20th Jul 2024 at 08:44.
    Quote Quote  
  12. Originally Posted by Alwyn View Post
    I am pretty surprised by the bad job VDub Yadif x 2 did:
    VirtualDub doesn't work properly with interlaced 4:2:0 subsampled chroma. Hence the ghosting and horizontal stripes in the chroma.
    Quote Quote  
  13. Member
    Join Date
    May 2005
    Location
    Australia-PAL Land
    Search Comp PM
    Originally Posted by Sharc
    Now (bob-)deinterlace it, and see and compare what the various tools (source filters and deinterlacers) do with the 2 fields. Step through the frames and separated fields to see the "leaks".
    You missed my point. The AVI plays fine and is deinterlaced properly in all my NLEs and players. The MP4 is not. Only QTGMC deinterlaces it properly.

    I've never liked the concept of interlaced MP4s.
    Quote Quote  
  14. I have seen this done before, and you have to be very careful evaluating and comparing deinterlacing techniques when you use pathological test clips that you manufacture. You may discover "problems" that would never show up with normal video. The only thing this might be useful for is, for instance, to discover how well each deinterlacer might do with fast-blinking strobe lights or other, similar unnatural clips.
    Quote Quote  
  15. Member
    Join Date
    May 2005
    Location
    Australia-PAL Land
    Search Comp PM
    Originally Posted by Jagabo
    VirtualDub doesn't work properly with interlaced 4:2:0 subsampled chroma. Hence the ghosting and horizontal stripes in the chroma.
    Thanks Jagabo, could you make me an AVI of your counter file? I can't out of VDub because of the bad deinterlacing I'm getting.

    BTW, this has been terrific for helping my understanding of how my NLE works with interlaced files.
    Quote Quote  
  16. Member
    Join Date
    May 2005
    Location
    Australia-PAL Land
    Search Comp PM
    @John, this has confirmed Magix does a good job at DoubleRate deinterlacing so your lady friend will be in good hands with her DV-into-MP4 project.
    Quote Quote  
  17. Originally Posted by johnmeyer View Post
    I have seen this done before, and you have to be very careful evaluating and comparing deinterlacing techniques when you use pathological test clips that you manufacture. You may discover "problems" that would never show up with normal video. The only thing this might be useful for is, for instance, to discover how well each deinterlacer might do with fast-blinking strobe lights or other, similar unnatural clips.
    Agree. Chroma handling flaws of certain tools with YV12 and other artefacts are for me also a reason to leave interlaced video as interlaced for "archiving" and not to deinterlace it by all means - although there are good reasons for deinterlacing properly (not necessarily by Magix), of course, like in the case of (vertical) resizing.
    Last edited by Sharc; 20th Jul 2024 at 08:57.
    Quote Quote  
  18. Originally Posted by Sharc View Post
    Agree. For me also a reason to leave interlaced video as interlaced for "archiving" and not to deinterlace it by all means - although there are good reasons for deinterlacing properly (not necessarily by Magix), of course.
    I totally agree, and always recommend the same thing: don't deinterlace unless you have to (e.g., resizing). Otherwise, store it as interlaced. Most modern television sets do a very nice job of deinterlacing.

    Alywn, I didn't see anything above that confirmed that Magix's deinterlacing is sufficient for my friend's purposes (he is referring to a thread in another part of this forum). She just finished capturing, having switched the capture setup to transfer her VHS tapes, and has now captured close to sixty tapes, representing at least 120 hours of video. She's doing this while battling breast cancer and has had to take several breaks during the process. However, the capture system has been bulletproof.
    Quote Quote  
  19. Member
    Join Date
    May 2005
    Location
    Australia-PAL Land
    Search Comp PM
    Originally Posted by Alwyn
    @John, this has confirmed Magix does a good job at DoubleRate deinterlacing
    Originally Posted by Johnmeyer
    Alywn, I didn't see anything above that confirmed that Magix's deinterlacing is sufficient for my friend's purposes
    What I meant was, "this exercise has confirmed to me (using Magix), that it does a good job at double-rate deinterlacing", meaning I've done some detailed experiments with the latest version.
    Quote Quote  
  20. Originally Posted by Alwyn View Post
    Thanks Jagabo, could you make me an AVI of your counter file?
    Here's a 4:2:2 Lagarith AVI version.
    Image Attached Files
    Quote Quote  
  21. Member
    Join Date
    May 2005
    Location
    Australia-PAL Land
    Search Comp PM
    Thanks Jagabo.
    Quote Quote  
  22. Originally Posted by Alwyn View Post
    Originally Posted by Sharc
    Now (bob-)deinterlace it, and see and compare what the various tools (source filters and deinterlacers) do with the 2 fields. Step through the frames and separated fields to see the "leaks".
    You missed my point. The AVI plays fine and is deinterlaced properly in all my NLEs and players. The MP4 is not. Only QTGMC deinterlaces it properly.
    That's what I meant by "Be surprised how differently various deinterlacers act on it". It's not the file's fault, although you may call it pathalogic. It's what you requested in the title of the thread.

    Edit: Some time ago someone posted a file of a surveillance system which multiplexed 2 streams by interleaving them as fields, means video1 as the odd field and video2 as the even field.

    I've never liked the concept of interlaced MP4s.
    What concept? What's wrong with it? Some tools have/had problems with handling interlaced YV12 (YUV 4:2:0) correctly. This has nothing to do with .mp4.
    Last edited by Sharc; 20th Jul 2024 at 17:37.
    Quote Quote  
  23. Originally Posted by Alwyn View Post
    What I meant was, "this exercise has confirmed to me (using Magix), that it does a good job at double-rate deinterlacing", meaning I've done some detailed experiments with the latest version.
    Ah, I didn't know about your experiments. It is good to know that Magix will likely be sufficient for her purposes.
    Quote Quote  
  24. Originally Posted by Alwyn View Post
    The AVI plays fine and is deinterlaced properly in all my NLEs and players.
    How do you know what is proper? Is the video a spacial pattern of alternating red and green lines in the background? Or is it a temporal pattern where the entire background is red for 1/50 second, then entirely green for 1/50 second? A 50 Hz CRT monitor displaying the video would give the latter. You would be blown out of the room by the flicker.
    Quote Quote  
  25. Member
    Join Date
    May 2005
    Location
    Australia-PAL Land
    Search Comp PM
    Originally Posted by Jagabo
    How do you know what is proper?
    I should have said "differently".

    Sharc threw two files at me, he said "Now (bob-)deinterlace it, and see and compare what the various tools (source filters and deinterlacers) do with the 2 fields. Step through the frames and separated fields to see the "leaks"."

    I did that, I reported that the two files behave differently and then he asked "What do you expect?" and a series of other questions as though this is a test.

    All I wanted, which you (Jagabo) provided, was a file where the fields were different so I could see how deinterlacing worked. That was great, thank you, and I achieved my aim. Then, with Sharc's files, the thread quickly morphed into an interrogation session.

    I don't know what those two files of @Sharcs are supposed to look like. The MP4 clearly behaves differently to the AVI after being deinterlaced and it would be nice to know why. I don't know the answer.
    Quote Quote  
  26. Originally Posted by Alwyn View Post
    Originally Posted by Jagabo
    How do you know what is proper?
    I should have said "differently".

    Sharc threw two files at me, he said "Now (bob-)deinterlace it, and see and compare what the various tools (source filters and deinterlacers) do with the 2 fields. Step through the frames and separated fields to see the "leaks"."

    I did that, I reported that the two files behave differently and then he asked "What do you expect?" and a series of other questions as though this is a test.

    All I wanted, which you (Jagabo) provided, was a file where the fields were different so I could see how deinterlacing worked. That was great, thank you, and I achieved my aim. Then, with Sharc's files, the thread quickly morphed into an interrogation session.

    I don't know what those two files of @Sharcs are supposed to look like. The MP4 clearly behaves differently to the AVI after being deinterlaced and it would be nice to know why. I don't know the answer.
    @Alwyn: Frankly, I don't understand your complaints. I submitted examples as you requested, suggesting to try and experiment with your deinterlacers on these, and perhaps scratch your head. What shall I conclude from your feedback "...that .mp4 doesn't play well in Vdub or Magix"? Corrupt file? I have no crystal ball nor do I have your Magix, nor did I know what you did or what you observed. So I asked back what you expected. Did you expect me to tell you to ditch Vdub and Magix? Did you assume my files are flawed? Maybe.

    Similar "I've never liked the concept of interlaced MP4s". Noted, but what to do with this statement? Something real, or a problem between the keyboard and the chair perhaps?

    I regret to have contributed to your request.
    Quote Quote  
  27. Member
    Join Date
    May 2005
    Location
    Australia-PAL Land
    Search Comp PM
    @Sharc, I don't mean to sound ungrateful, but I don't know what I'm supposed to be looking for in your two files. Of course the fields are different; I can see that in your AVI. I assume that was the whole purpose of you posting them. But what is the MP4, which plays differently, supposed to be telling me?

    Are you saying that they play exactly the same, when deinterlaced, in your VDub? Because they don't here. Are they supposed to be the same?

    Similar "I've never liked the concept of interlaced MP4s". Noted, but what to do with this statement?
    Nothing. It was a statement, not a question.

    Here's what I'm seeing with your two files, Double Rate deinterlaced with VDub2.
    Image Attached Files
    Quote Quote  
  28. Originally Posted by Alwyn View Post
    @Sharc, I don't mean to sound ungrateful, but I don't know what I'm supposed to be looking for in your two files. Of course the fields are different; I can see that in your AVI. I assume that was the whole purpose of you posting them. But what is the MP4, which plays differently, supposed to be telling me?

    Are you saying that they play exactly the same, when deinterlaced, in your VDub? Because they don't here. Are they supposed to be the same?

    Similar "I've never liked the concept of interlaced MP4s". Noted, but what to do with this statement?
    Nothing. It was a statement, not a question.

    Here's what I'm seeing with your two files, Double Rate deinterlaced with VDub2.
    Althoug Vdub has several filters for fields separation it seems not to be able to do it correctly with the YUV 4:2:0 (.mp4) file. So Vdub has a problem in that respect. Also see jagabo's post#12.
    For comparison, one can sepearate the fields in Avisynth perfectly
    Code:
    LWLibavVideoSource("420i x264.mp4")
    separatefields()
    Such and similar experience have always made be cautios with "blindly" applying deinterlacing.

    Files in post#11 are deinterlaced .mp4 using Avisynth: You will find that various deinterlacers behave differently. Which one is correct/"best"? My example revealed some colour issues. But the video is still static, means no motion. Motion like on "natural" videos is the next level of testing/comparing the real performance of deinterlacers.
    With the synthetic samples you can at least see and wonder how the various deinterlacers and tools "manipulate" the 2 fields.
    Last edited by Sharc; 21st Jul 2024 at 05:47.
    Quote Quote  



Similar Threads

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