VideoHelp Forum




+ Reply to Thread
Results 1 to 22 of 22
  1. Hello everyone, I've been searching the forums over and over and searching google to no avail to the solution to this.

    I am using: CCCP 9-21-08 Version. CCE 2.70 SP2, Avisynth Ver 2.7.


    My source file is an MKV that I'm trying to encode to 16:9 720X480 Mpeg2 DVD compliant file.

    The mkv loads up fine and will encode fine. THe problem is that CCE encodes and thinks the file is 4:3 DAR (aspect ratio). What setting on FFDshow Video Decoder or what line of code should I add to Avisynth to force the 16:9 Aspect Ratio in CCE for encoding.

    Whats funny is that all my MP4 files *.mp4 stuff will encode at the proer 16:9 aspect ration.

    MY avi's and my MKVs, no.
    Quote Quote  
  2. I don't think the answer will be in avisynth or ffdshow.

    If i can recall, there is a 16:9 aspect ratio radio button in CCE.

    Another option is to use HCenc (free), set the 16:9 button.
    Quote Quote  
  3. I've tried both. They don't work. When I select the 16:9 Radio button on CCE. It reverts to 4:3. Same with HCenc.
    Quote Quote  
  4. How are you testing whether the aspect ratio is 16:9 or 4:3 on your final encode?
    "Shut up Wesley!" -- Captain Jean-Luc Picard
    Buy My Books
    Quote Quote  
  5. Well I open up the MPEG2 in VLC and compare it to the orignal.

    Also I opened it open in Mediainfo 4:3 720X480


    It looks vastly different compared to the orignal MKV which I opened in MediaInfo, which said it was 16:9.

    The Mpeg2 looks stretched
    Quote Quote  
  6. Really, how do you know it's not been encoded as 16:9? If you set it for 16:9 in CCE, it's encoded as 16:9. Open the resulting MPV/M2V in DGIndex and run the Preview. It'll say. As will GSpot, Bitrate Viewer, ReStream, etc.

    What's your AviSynth script? What's the original MKV resolution. The fault isn't with CCE.

    Open the ECL and scroll down not quite half way. If it was set for 16:9 the aspect_ratio will be 3:
    Code:
    blanking=0
    blank_top=0
    blank_left=0
    blank_right=0
    blank_bottom=0
    aspect_ratio=3
    gop_m=3
    gop_nm=4
    gop_hdr=12
    Quote Quote  
  7. Manono, I used Mediainfo it says 4:3.

    My simple Script:

    Directshowsource("H:\Series\Something.mkv")
    Converttoyuy2()
    AddBorders(20,20,20,20)
    BilinearResize(720,480) <--- I've tried it with Lanczos also.

    ---End Script----
    Ran it through Gspot also, Says: SAR 1.500(3:2) DAR 1.333 (4:3)

    Original MKV using MediaInfo: 1280X720 16:9 DAR
    Quote Quote  
  8. You're changing the AR a little bit by adding the same amount of black bars all the way around. The script should be more like:

    LanczosResize(672,448)
    AddBorders(24,16,24,16)

    unless you don't want that much black. And the ECL that CCE makes for you will have:

    aspect_ratio=2

    if encoding as 4:3. Usually you try and do all the filtering in the original color space and put the ConvertTo at the end. And Bilinear resizing is one of the poorer resizers (smoothes too much), in my opinion. Maybe you know those things and are doing it for a reason, like to make the video more compressible.
    Quote Quote  
  9. Checked the ECL. Aspect_ratio=3

    Also I am using your settings to try it out. Thanks

    After I press Encode though it chanes it to 4:3 Aspect_ratio=2

    It even asks if I want to save chanes to the original ECL before it changes it to 4:3 for encoding. It's weird.
    Quote Quote  
  10. I used your script revision Manono and it crashed CCE. I'll keep trying.

    Whats funny is that TMPEG Express 4.0 will load the AVS at the 1:1 Ratio like you said and I can set the output to 16:9 Properly for encoding. Could it be FFDShow Video Decoder?

    Is there any AVIsynth script to force 16:9 DAR?
    Quote Quote  
  11. Since you are using DirectShowSource() it passes all filters in the filter chain to the encoder, often with compounding effects if you don't know EXACTLY what is being used.

    So make sure your filter chain is clean, disable all the filters and postprocessing in ffdshow (if that is being used to decode). You also might consider checking with graphstudio to see if any other unwanted filters are in the filter chain, and disable/unregister the unwanted ones

    If you have an .avi file, use AviSource(). If your .mkv is h264, use DGAVCdec and AVCSource() instead. If your .mkv is VC-1, you have to use DirectShowSource() (unfortunately)

    DirectShowSource() is not necessarily frame accurate, and also has filter issues which might be causing your problem.

    Avisynth only frameserves, you can only resize and adjust the frame dimensions i.e. FAR (Frame Aspect Ratio) - there is no DAR information per se.

    DAR= FAR x PAR

    The DAR information can also be at the container level (e.g. mkv, or mp4) with signalling, or stream level (non-square pixels i.e. pixel aspect ratio) which is a function of the encoder.
    Quote Quote  
  12. After I press Encode though it chanes it to 4:3 Aspect_ratio=2

    It even asks if I want to save chanes to the original ECL before it changes it to 4:3 for encoding. It's weird.
    You can't run a pass or 2 and then change the DAR, as it will revert to the original one. You'll have to start over (by deleting the VAF file), or else you'll get the behaviour you describe. You can also change the DAR from 4:3 to 16:9 by opening the completed MPV/M2V in ReStream and rewriting it with the changed DAR.
    I used your script revision Manono and it crashed CCE
    Not because of the Resize and AddBorders I suggested. Maybe it was something else. I don't ever use DirectShowSource if I can help it, so you'll have to follow poisondeathray's advice there. And you can also avoid using DirectShowSource yourself if, as he says, your MKV contains either AVI or H.264 video.
    Quote Quote  
  13. Well I found out the problem. Thanks for that suggestion about running a pass or two. I feel pretty dumb that I sat here for 2-3 days trying to figure this out...

    In fact what happened was. When I first encode this stuff I had accidentally set the CCE template to 4:3. I never deleted the VAFS or renamed the Avs files. I assumed CCE would copy over them. I did notice it was weird that a VAF wasn't being created. If you have an old VAF and change settings your right it will revert back to the old settings and not create a new VAF.

    Regarding DirectShowSource. I don't see how it makes a difference. Does GraphEdit or DGAAvc make the resulting MPV any better? If I use DGAAVC or GraphEdit they want you to turn off the Audio and not have CCE encode it. Frankly I can't notice a difference in audio encoding. Its MPEG 2, Layer 1 quality stuff, how much better is something like Besweet compared to CCE or Tmpeg audio encoding? My output is 2.0 Stereo sound at 224 Kbit.



    Also Regarding Lanczos, nobody can tell a real difference between this and Bilenear. Not me and not anybody I've shown the resulting DVDs to. When you encode at 1735 Avg and 2000 Max I think it might be better to keep it billenear as a easy way of doing a Temporal Smoother.

    Whats the top (most popular) CCE/Avisynth Temporal Smoother these days?

    Thank you for your help Manono and Poison
    Quote Quote  
  14. Glad you got it figured out

    Originally Posted by octagon69
    Regarding DirectShowSource. I don't see how it makes a difference. Does GraphEdit or DGAAvc make the resulting MPV any better? If I use DGAAVC or GraphEdit they want you to turn off the Audio and not have CCE encode it. Frankly I can't notice a difference in audio encoding. Its MPEG 2, Layer 1 quality stuff, how much better is something like Besweet compared to CCE or Tmpeg audio encoding? My output is 2.0 Stereo sound at 224 Kbit.
    Regarding DirectShowSource vs. DGAVCdec - it can make a difference in those cases I listed. I can show you many examples if you want. It is very "dangerous" if you are not vigilant on keeping a clean filter chain.

    1) compounding filters and filter conflicts. (e.g. if you forget to turn of color conversions/ forced RGB or any other filters if ffdshow is used to decode the source material , they get passed on = worse quality)

    2) the source decoder choice DOES makes a difference. DirectShowSource() predisposes you to the directshow decoder indicated in GraphStudio (e.g. coreavc vs. ffdshow/libavcodec - I can show you h264 content that is improperly decoded by ffdshow (pixellated), but OK using coreavc). Another example is VC1 content - the WMDecoder is better than libavcodec decoding for VC1. For MPEG2 - There are subtle differences between Mainconcept MPEG2 decoder vs. Cyberlink. You can change the default decoder by using .grf files, or registering/unregistering filters

    3) sync issues - DGAVCdec will index your file and is more consistent, whereas DirectShowSource is more prone to desynchronization and frame drops.

    (But it's not like DirectShowSource sucks; it works fine most of the time if your filter chain is clean)

    Audio quality - again the choice of audio decoder makes a difference (RE: channel mapping, quality, 7.1 vs. 5.1), especially for TrueHD, EAC-3, but not so much for mp2...so I wouldn't worry about it in your case.

    CCE is known for audio encoding problems (or at least used to be when I used to use it years ago)

    As for temporal smoothers - you would have to post a sample and have someone look at it to make suggestions
    Quote Quote  
  15. Also Regarding Lanczos, nobody can tell a real difference between this and Bilenear. Not me and not anybody I've shown the resulting DVDs to.
    More power to you. Bilinear is smoother, though, and noticeably so, in my opinion. Maybe your MKVs aren't of such good quality to begin with. I like my reencoded DVDs as sharp as possible, and often go so far as applying LSF. But then, I don't encode at bitrates less than 1800, either.
    When you encode at 1735 Avg and 2000 Max I think it might be better to keep it billenear as a easy way of doing a Temporal Smoother.
    Well, I did say, "...like to make the video more compressible." And if using bitrates that absurdly low, you need all the help you can get. What are you doing, putting 2 movies on a DVDR? And it's not temporally smoothing, but spatially smoothing. I generally let my choice of quantisation matrix do my spatial smoothing for me. For fast temporal smoothers that don't do much damage, I will sometimes use RemoveGrain (on the extras) at default settings twice. Some of the better temporal smoothers are as slow as Christmas.
    Quote Quote  
  16. Member
    Join Date
    Jun 2005
    Location
    Portugal
    Search Comp PM
    Originally Posted by manono
    More power to you. Bilinear is smoother, though, and noticeably so, in my opinion.
    .
    But Bilinear is better to downsize than Lanczos, isn't it ?

    from AVISynth Doc's :

    "However, if you are shrinking it, you are probably just as well off, or even better off, with BilinearResize...
    I wouldn't be at all surprised if BilinearResize yields a better overall final result."

    Using a BilinearResize to smooth eventual artifacts during downsize rather than give it a better sharp with lanczos or bicubic, I think the resulting smaller video ( related to HD resolutions ) should look better

    I'm talking about using standard resizers, because pherhaps LimitedSharpenFaster from Diddé would probably look better, but with half of the speed...never tried it to downsize

    just my opinion
    Quote Quote  
  17. It's OK with me; use whatever you like, but your argument for Bilinear is a bit incomplete.
    But Bilinear is better to downsize than Lanczos, isn't it ?
    Not in my opinion it isn't, not when you have enough bitrate. That part of the Resize page at AviSynth.org you quoted was written before the Lanczos resizers became part of AviSynth. And I did say in my very first response that Bilinear was fine when using low bitrates:
    Originally Posted by manono
    And Bilinear resizing is one of the poorer resizers (smoothes too much), in my opinion. Maybe you know those things and are doing it for a reason, like to make the video more compressible.
    But if you're using high enough bitrates and want better (i.e., sharper and more detailed) quality when downsizing, Lanczos is way better in my opinion. You conveniently forgot to add what the AviSynth.org resize page has to say about Lanczos:
    Lanczos was created for AviSynth because it retained so much detail, more so even than BicubicResize(x,y,0,0.75). As you might know, the more detail a frame has, the more difficult it is to compress it. This means that Lanczos is NOT suited for low bitrate video, the various Bicubic flavours are much better for this. If however you have enough bitrate then using Lanczos will give you a better picture, but in general I do not recommend using it for 1 CD rips because the bitrate is usually too low (there are exceptions of course).
    Others prefer other resizers. There are no definitive answers, really. But since I don't make 1 CD AVIs anymore I never use BilinearResize. And even when I did I usually used BicubicResize(xxx,yyy,0,0.5) and then LanczosResize after it became available, if the resulting quality was going to be high enough. What you use depends at least partly on how compressible the source is and how much you're compressing it. For octagon69, once I learned he was using sub-2000 bitrates for DVD, I had to agree that Bilinear was best. Me, I don't use bitrates that low and always use Lanczos of one sort of another. Others like the Spline resizers. To each his own.
    Quote Quote  
  18. Bilinear vs Lanczos: neither is better, they are simply different.

    176x176 source:


    reduced to 128x128, bilinear left, lanczos right:


    enlarged to 240x240, bilinear left, lanczos right:


    176x176 source:


    reduced to 128x128, bilinear left, lanczos right:


    enlarged to 240x240, bilinear left, lanczos right:


    Lanczos gives sharper results but creates more moire (when downsizing), enhances noise, and increases macroblocking, all requiring more bitrate. Pick your evils.
    Quote Quote  
  19. Member
    Join Date
    Jun 2005
    Location
    Portugal
    Search Comp PM
    Originally Posted by manono
    But if you're using high enough bitrates and want better (i.e., sharper and more detailed) quality when downsizing, Lanczos is way better in my opinion. You conveniently forgot to add what the AviSynth.org resize page has to say about Lanczos...
    I'm never satisfied and I'm looking always for other opinions, new methods, to get the best quality as possible. And you are the best man for this questions, I take you very seriously

    I already know the differences between some resizers, and perhaps, rather than use Bilinear for all encoding bitrates ( WHEN DOWNSIZING ), I should use biliniar when encoding at low bitrates and Lanczos when encoding at high bitrates, i.e., > 3000kbps for example, right ?

    And when downsize and compress a lot to fit in a DVD, bitrate < 3000 kbps, using Bilinear

    I encoded the following HD source using CCE and bilinear to downsize to DVD resolutions, but I had to introduce some sharpen filter :

    http://img361.imageshack.us/img361/7783/comp3ka0.jpg

    Does it look bad ? what do you think ? look at the bullets I think there is some loss, is where I notice some differences
    Quote Quote  
  20. I've never worked with a hi-def source so I don't know what, if any, changes I might make when downsizing hi-def. It seems to me, though, that purposely smoothing it while downsizing followed by then artificially sharpening it, is the wrong way to go about it. But that's just my opinion and it's worth about what you paid for it.

    Me, I always use Lanczos, the regular one when downsizing and Lanczos4 when upsizing. Then I let the compressibility of my source determine my choice of quantisation matrix in CCE. Any softening of the picture to make it more compressible in order to fit my quality standards is done with the matrix. Therefore, the bitrate has next to nothing to do with it. It's all about the Q - Q as in Quality, and Q as in Quant. But, since not too many people do it this way, I don't know how useful any of this will be for you.

    By the way, is it my imagination or is the DVD picture looking a bit "lighter" or otherwise somehow different from the HD picture? This is most obvious, I think, in the sky part of the pictures. Didn't you change the colorimetry from Rec.709 to Rec.601 when reencoding for standard-def?
    Quote Quote  
  21. Member
    Join Date
    Jun 2005
    Location
    Portugal
    Search Comp PM
    Originally Posted by manono
    By the way, is it my imagination or is the DVD picture looking a bit "lighter" or otherwise somehow different from the HD picture? This is most obvious, I think, in the sky part of the pictures. Didn't you change the colorimetry from Rec.709 to Rec.601 when reencoding for standard-def?
    Manono,

    I used Tweak filter, and I know that Tweak is a kludge but I didn't changed colormatrix for CCE, I just made slight changes pherhaps brightness was too high, as you notice...but that was only a tick from a standard/default, it all depends on the source....using tweak is a kludge

    CCE assumes Rec.709 coefficients, pherhaps I should always make the following colorimetry change for all conversions with CCE

    ColorMatrix(mode="Rec.601->Rec.709")

    should I ? something like :

    Code:
    LoadPlugin("ffmpegsource.dll")
    FFmpegSource("sample.MKV")
    ColorMatrix(mode="Rec.601->Rec.709")
    ConvertToyv12()
    the problem is to know if HD material are encoded as Rec.601 coefficient, are they ?

    And what about HCEnc ?
    Quote Quote  
  22. HD is Rec.709 and standard-def DVD is Rec.601, so apply the ColorMatrix filter when downconverting, but the other way around from the way you used it.
    I used Tweak filter, and I know that Tweak is a kludge but I didn't changed colormatrix for CCE
    Since you used the word "kludge", and since it's a somewhat unusual word to use, maybe you've read jagabo's recent post where he says the same thing about the need to correct the colorimetry when going from Hi-Def to Std-Def:

    https://forum.videohelp.com/topic356440-30.html#1887797

    What colorspace is the video in the MKV? It isn't YV12? Anyway, when using CCE, you want:

    ConvertToYUY2()
    And what about HCEnc ?
    Yes, if using HCEnc it has to be converted to YV12, if it isn't already.
    Quote Quote  



Similar Threads

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