VideoHelp Forum

Try DVDFab and download streaming video, copy, convert or make Blu-rays,DVDs! Download free trial !
+ Reply to Thread
Results 1 to 15 of 15
Thread
  1. Member
    Join Date
    Jan 2007
    Location
    Canada
    Search Comp PM
    I need some help with some PAL video. I used MeGUI to index the mpg file and analyze it. MeGUI says it's progressive and when I search through the clip I can't find any signs of interlacing either. When I transcode to avi it's interlaced and not progressive.

    I've tried Lagarith and MagicYUV both of which come out interlaced.
    TDeint(mode=1) gives me a progressive output, but at double the framerate

    I'm not experienced enough to figure this out on my own and would like some help.

    Thanx in advance.
    Quote Quote  
  2. If you post a stream copy / cut sample of the mpg someone will take a look at it and provide suggestions
    Quote Quote  
  3. Member
    Join Date
    Jan 2007
    Location
    Canada
    Search Comp PM
    Here is a short clip
    Image Attached Files
    Quote Quote  
  4. The video is encoded interlaced but the frames are progressive. Just treat it as progressive, 25p.
    Image Attached Files
    Quote Quote  
  5. Member
    Join Date
    Jan 2007
    Location
    Canada
    Search Comp PM
    I tried encoding directly to x264 and it does encode progressively. The exercise was to figure out why it was interlaced when encoding to avi.

    Code:
    Crop(8, 0, -8, -0)
    LanczosResize(768, 576)
    Still interlaced.

    Encoding to 720x576, still interlaced.

    Code:
    Crop(8, 0, -8, -0)
    LanczosResize(720, 540)
    Finally results in progressive avi.

    Is there any code for avisynth script to make it progressive at

    Code:
    Crop(8, 0, -8, -0)
    LanczosResize(768, 576)
    Quote Quote  
  6. Originally Posted by ziggy1971 View Post
    I tried encoding directly to x264 and it does encode progressively. The exercise was to figure out why it was interlaced when encoding to avi.

    Code:
    Crop(8, 0, -8, -0)
    LanczosResize(768, 576)
    Still interlaced.

    Encoding to 720x576, still interlaced.

    Code:
    Crop(8, 0, -8, -0)
    LanczosResize(720, 540)
    Finally results in progressive avi.

    Is there any code for avisynth script to make it progressive at

    Code:
    Crop(8, 0, -8, -0)
    LanczosResize(768, 576)
    The x264 encoder does what you tell it to do. Are you using it via a GUI? If so, it may have detected that the source is flagged as interlaced and instructed x264 to encode as interlaced (e.g. PAL DVD compliant).

    What is your x264 commandline?
    Quote Quote  
  7. Member
    Join Date
    Jan 2007
    Location
    Canada
    Search Comp PM
    Originally Posted by ziggy1971 View Post
    I tried encoding directly to x264 and it does encode progressively. The exercise was to figure out why it was interlaced when encoding to avi.
    Again, I'm not trying to encode to x264, I'm trying to encode to avi.

    Tried this:
    Code:
    LoadPlugin("D:\Applications\_Music-Video\Video Converters\MeGUI\tools\dgindex\DGDecode.dll")
    SetMTMode(2)
    a="H:\Season 00\S01-E02.d2v"
    
    Mpeg2source(a)
    ColorMatrix(d2v=a)
    
    Derainbow()
    Crop(8, 0, -8, -0)
    LanczosResize(768, 576)
    and this:
    Code:
    LoadPlugin("D:\Applications\_Music-Video\Video Converters\MeGUI\tools\dgindex\DGDecode.dll")
    LoadPlugin("D:\Applications\_Music-Video\Video Converters\MeGUI\tools\avisynth_plugin\ColorMatrix.dll")
    DGDecode_mpeg2source("H:\Season 00\S01-E02.d2v", cpu=4, info=3)
    ColorMatrix(hints=true, threads=0)
    
    Derainbow()
    Crop(8, 0, -8, -0)
    LanczosResize(768, 576)
    also:
    Code:
    LoadPlugin("D:\Applications\_Music-Video\Video Converters\MeGUI\tools\dgindex\DGDecode.dll")
    LoadPlugin("D:\Applications\_Music-Video\Video Converters\MeGUI\tools\avisynth_plugin\ColorMatrix.dll")
    DGDecode_mpeg2source("H:\Season 00\S01-E02.d2v", cpu=4, info=3)
    ColorMatrix(hints=true, threads=0)
    
    Derainbow()
    # No cropping or resizing
    still interlace avi

    Changing the resolution to 720x540 DOES output a progressive avi with the following:

    Code:
    LoadPlugin("D:\Applications\_Music-Video\Video Converters\MeGUI\tools\dgindex\DGDecode.dll")
    SetMTMode(2)
    a="H:\Season 00\S01-E02.d2v"
    
    Mpeg2source(a)
    ColorMatrix(d2v=a)
    
    Derainbow()
    Crop(8, 0, -8, -0)
    LanczosResize(720, 540)
    Is there some internal flag that gets triggered when using either 720x576 or 768x576?
    Quote Quote  
  8. AVI is a container, not a codec. AVI can contain video compressed with any codec. What codec are you using? Make sure it's not set to encode interlaced. For example, Xvid has an interlaced setting:

    Image
    [Attachment 50339 - Click to enlarge]


    All of your scripts will output progressive frames since the source has progressive frames.

    Some codecs might try to "help" you by automatically switching to interlaced mode with some frame sizes. Check the codecs settings.
    Last edited by jagabo; 29th Sep 2019 at 08:39.
    Quote Quote  
  9. Member
    Join Date
    Jan 2007
    Location
    Canada
    Search Comp PM
    Thanks for the help.

    MagicYUV does have a checkbox similar to the one illustrated in the Xvid configuration in the image above.

    However, if you look at the following link https://forums.creativecow.net/docs/forums/post.php?forumid=24&postid=952006&univposti...952006&pview=t just over half way down the page, apparently Vegas Pro has an issue of not READING the correct info of some media files; PAL being one of them.

    So, instead of smart-rendering unchanged sections of video (no re-encoding), Vegas has seen the clips to be interlaced and then re-encodes them to progressive unnecessarily.

    Not the fault of Avisynth or the codecs used, but in the software trying to read the media.

    So I hope that makes sense if others are looking for the same solution.
    Quote Quote  
  10. So just tell Vegas the video is progressive after you import it. I don't use Vegas but I believe you right click on the video in the timeline then select Properties or something like that.
    Quote Quote  
  11. Yes, just interpret the file as progressive. If everything is setup correctly (file interpretation, project properties, export settings) , it will smart render correctly. And you can verify this by checking the difference between export and original
    Quote Quote  
  12. And you can verify this by checking the difference between export and original
    How can this be done ? In Vegas itself or are there standalone tools to do such comparisons ?
    (See this thread.)
    Quote Quote  
  13. For video , you can check with 2 tracks overlaid "difference" mode in vegas or NLE, or use avisynth overlay (difference mode) or subtract . You can amplify the differences to see if there is a problem . You can visually see where or what frames are changed

    Or if you just want confirmation that 2 things are the same, you can use PSNR measurement (this can be per frame comparisons too, so you know exactly which frames differ). Another is binary compare of decoded file

    I don't know of a good way to compare 6 versions in your other thread, except manually checking and comparing. You don't have a known reference or which one is "good"- that's the problem
    Quote Quote  
  14. I don't know of a good way to compare 6 versions in your other thread, except manually checking and comparing. You don't have a known reference or which one is "good"- that's the problem
    I can proceed by elimination, in fact I'm pretty sure of which one is the good one, I just want to be sure and do a thorough comparison.
    I already did a binary compare, with the results I mentioned. Could you elaborate on how to this kind of overlay analysis with Avisynth ? And which tool(s) can do a global per frame PSNR measurement and report only the discrepancies ?
    (Perhaps it'd be best to continue in the other thread, didn't mean to hijack this one...)
    Quote Quote  
  15. Originally Posted by ziggy1971 View Post
    Originally Posted by ziggy1971 View Post
    I tried encoding directly to x264 and it does encode progressively. The exercise was to figure out why it was interlaced when encoding to avi.
    Again, I'm not trying to encode to x264, I'm trying to encode to avi.

    Tried this:
    Code:
    LanczosResize(768, 576)
    and this:
    Code:
    LanczosResize(768, 576)
    also:
    Code:
    # No cropping or resizing
    still interlace avi

    Changing the resolution to 720x540 DOES output a progressive avi with the following:

    Code:
    LanczosResize(720, 540)
    Is there some internal flag that gets triggered when using either 720x576 or 768x576?
    Yes, this is more than likely.
    Your source is flagged as interlaced. Hence the codec assumes that the content is interlaced, irrespective of being actually progressive video or not.
    Interlaced video must be deinterlaced before VERTICAL resizing, otherwise the scan structure gets messed up. There is however no need to deinterlace when the vertical resolution is kept intact and only the horizontal resolution is changed.
    It seems that your codec is smart enough to deinterlace and encode as progressive only when the VERTICAL resolution is changed but keep it interlaced otherwise.
    Last edited by Sharc; 30th Sep 2019 at 03:07. Reason: typos
    Quote Quote  



Similar Threads