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.
+ Reply to Thread
Results 1 to 22 of 22
-
-
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 -
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
-
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 -
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. -
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. -
-
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. -
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.
I used your script revision Manono and it crashed CCE -
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 -
Glad you got it figured out
Originally Posted by octagon69
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 -
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. -
Originally Posted by manono
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 -
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 ?
Originally Posted by manono
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). -
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. -
Originally Posted by manono
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 -
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? -
Originally Posted by 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()
And what about HCEnc ? -
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
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 ?
Similar Threads
-
Mkv to avchd results 13x longer than it should be
By kukkamies in forum Authoring (Blu-ray)Replies: 10Last Post: 8th Nov 2011, 16:52 -
CCCP - DirectShow filter pack
By joepic in forum Newbie / General discussionsReplies: 10Last Post: 31st May 2008, 09:11 -
AVI->MPEG2 (CCE Basic) encoding results in incorrect video length in pla
By binister in forum Video ConversionReplies: 8Last Post: 26th Feb 2008, 18:29 -
CCE, Procoder, Quenc or HCEnc: which one do you get better results?
By devilcoelhodog in forum Video ConversionReplies: 28Last Post: 31st Jan 2008, 22:41 -
MKV conversion always results with poor AV sync
By johnhouk in forum Video ConversionReplies: 4Last Post: 23rd Jan 2008, 17:13