View Full Version : need help encoding my very 1st manual CCE
EuropeanMan
30th September 2007, 21:34
Hi everyone,
I've been running CCEs for the past 6 months using DVD-RB. At the present time, I would like to try my hand at a manual CCE, without the use of DVD-RB.
These are the steps I have gone through so far.
1. I extracted the MPEG2 stream via DGIndex, and also got a resulting AC3 5.1DD audio file as well.
2. I used that stream and created a d2v file from which I made my .avs script. The source DVD9 is interlaced. Properly deinterlaced brings it to 25fps.
My .avs script in a nutshell:
deinterlaced to 25fps (not 24.975)
cropped properly (6, 54, -4, 52)
denoised, colour corrections, sharpening
resized to 720x304
AddBorders(0,99,0,97)
lanc.resize 720 x 480 (to get the aspect ratio properly framed, because in MY eyes, the source DVD9 was vertically stretched a little)
This .avs file I fed into CCE.
The settings I changed/used are as follows:
Video:
MPEG2(for dvd), 1pass CBR, elementary
the frame size is set at 720
bitrate calculator gave me 2842 for this 3hr5min film; i used 2840 for mine here
now this is where i am confused. framerate.
i tried using 25fps, which made the framerate 720/576 and the output that was generated was larger and stretched (also because i used 16:9 setting)...not the way i wanted it to be seen. initially i had kept at 29.97, but the output was 4:3 widescreen, and i wanted an anamorphic output,not 4:3!!! so i dont know what to use for anamorphic output...
i don't know which pulldown to use iin cce...the 3:2 or 2:3 (which is defaulted)
in the advanced tab, m/n are 3/4...quant matrix is extra low...
in picture quality tab, i've used the value of 23 for quant
and zizzag block order...
------------
Now, can you please guide me to a proper way of doing this?
I would like a 16:9 anamorphic output...I don't know what framerate will result or should be used...25? or 29.97? I don't know what pulldown flags to use...so your help would be much appreciated, thanks.
EuropeanMan
30th September 2007, 22:00
ok my last addborders line was slightly off, and fixed that...
45tripp
1st October 2007, 03:45
I've been running CCEs
version?
The source DVD9 is interlaced. Properly deinterlaced brings it to 25fps.
deinterlacing doesn't change framerate.
so it was pal 25fps to begin with?
more info on your source should be provided.
My .avs script in a nutshell:
"things that can be put in a nutshell, should stay there"
provide full script
Video:
MPEG2(for dvd), 1pass CBR, elementary
why cbr?
i consider that option a mistake.
i don't know which pulldown to use iin cce...the 3:2 or 2:3 (which is defaulted)
neither, none.
CCE can't pulldown 25fps to 29.97.
I would like a 16:9 anamorphic output...I don't know what framerate will result or should be used...25? or 29.97?
aspect ratio and framerate have nothing to do with each other.
now this is where i am confused. framerate.
i tried using 25fps, which made the framerate 720/576
pal dvd is 720x576 at 25fps
ntsc dvd is 720x480 at 29.97fps
if you've retrieved 25fps progressive from 720x480 at 29.97fps,
you want to disable dvd compliancy in CCE so you may encode
720x480 at 25fps and then after the encode use dgpulldown to pulldown 25fps to 29.97 so you have ntsc dvd.
I've not attempted to make sense of your resizing/cropping/resizing/padding...
it seems you have 2.35:1 and are mistreating it.
Perhaps not understanding non square pixels?
read this for aspect ratios:
http://forum.videohelp.com/topic174200.html
gl
EuropeanMan
1st October 2007, 23:55
My script:
SetMemoryMax(1024)
DGDecode_mpeg2source("C:\Users\...\Desktop\test vz.d2v",cpu=2,info=3)
# Plugins
LoadCPlugin("c:\program files\avisynth 2.5\plugins\SmartDecimate.dll")
Load_Stdcall_Plugin("C:\program files\avisynth 2.5\plugins\yadif.dll")
Import("C:\Program Files\AviSynth 2.5\plugins\Ylevels_MT.avs")
# ColorMatrix
ColorMatrix(mode="Rec.709->Rec.601",opt=0,threads=0,scaling=1,interlaced=true)
# Deinterlacing, Deblending
ord = last.getparity() ? 1 : 0
a=Yadif (mode=3,order=ord)
SmartDecimate(2500,5994,bob=a,tel=.55)
# Cropping
crop( 6, 54, -4, -52)
# Denoising
MT("fft3dfilter(ow=32/2,oh=32/2,sigma=1.2)")
# Colour Adjustments
YlevelsS(0,1.15,255,0,255).Tweak(sat=1.05)
# Resizing
Lanczos4Resize(720,304) # Lanczos (Sharp)
# Sharpening
dull = last
sharp = dull.MT("LimitedSharpenFaster()")
SootheMT(sharp,dull,45)
# AddBorder - Last
#AddBorders(0,59,0,57)
# Final Resizing
#Lanczos4Resize(720,480)
EuropeanMan
1st October 2007, 23:57
version?
1.15
deinterlacing doesn't change framerate.
so it was pal 25fps to begin with?
more info on your source should be provided.
original DVD9 is R0, 29.97
"things that can be put in a nutshell, should stay there"
provide full script
posted above
why cbr?
i consider that option a mistake.
I saw if i clicked VBR the filesize increased; thus stayed with CBR.
I was checking the progress of the CCE and cancelled it, because I noticed huge blocking in the action scenes. :( Bitrate was set at 2840.
neither, none.
CCE can't pulldown 25fps to 29.97.
I realise this now. Thanks. Will do the pulldown after encode.
aspect ratio and framerate have nothing to do with each other.
pal dvd is 720x576 at 25fps
ntsc dvd is 720x480 at 29.97fps
if you've retrieved 25fps progressive from 720x480 at 29.97fps,
you want to disable dvd compliancy in CCE so you may encode
720x480 at 25fps and then after the encode use dgpulldown to pulldown 25fps to 29.97 so you have ntsc dvd.
I've not attempted to make sense of your resizing/cropping/resizing/padding...
it seems you have 2.35:1 and are mistreating it.
Perhaps not understanding non square pixels?
read this for aspect ratios:
http://forum.videohelp.com/topic174200.html
gl
Hoping to hear from you soon.
45tripp
2nd October 2007, 19:38
Not much more to add without some sample.
ColorMatrix(mode="Rec.709->Rec.601",opt=0,threads=0,scaling=1,interlaced=true)
why?
the colormatrix manual itself says to use ColorMatrix(mode="Rec.601->Rec.709") to feed cce, if necessary.
get rid of it.
# Deinterlacing, Deblending
ord = last.getparity() ? 1 : 0
a=Yadif (mode=3,order=ord)
SmartDecimate(2500,5994,bob=a,tel=.55)
Can only assume it's ok, without sample.
Not my thing anyway. more like something for manono
because in MY eyes, the source DVD9 was vertically stretched a little
can't tell without sample.
i'd assume the following though from what you say, and what you're trying:
crop( 6, 54, -4, -52)
lanczos4resize(720,360)
Addborders(0,60,0,60)
then encode with a 16:9 aspect flag of course.
I've already mentioned you have to untick the 'dvd compliant' box
so you can encode to 720x480 at 25 fps.
then you take the output and pulldown to 29.97 in dgpulldown.
Of course the name EuropeanMan, makes me wonder.
Can't we make it pal?
keep progressive 25fps and resize to pal resolution:
crop( 6, 54, -4, -52)
lanczos4resize(720,432)
Addborders(0,72,0,72)
I saw if i clicked VBR the filesize increased; thus stayed with CBR.
I was checking the progress of the CCE and cancelled it, because I noticed huge blocking in the action scenes. Bitrate was set at 2840.
obviously.
Multipass VBR will ensure target filesize.
select multipass vbr, set passes to 2, maybe lower v/c a bit,
set min to 0, max to 9200 and avg to your estimated bitrate (2840).
As for other options they look ok.
you should also tick 'progressive frame' and set 'dc precision' to 8
I would disable filtering in picture settings.
and
quant matrix is extra low
I wouldn't use that matrix.
gl
PhillipWyllie
2nd October 2007, 23:39
I assume you're trying to shrink a PAL DVD9 to fit on a DVD5.
Don't guess if the video is interlaced or not, find out. This script does that:
assumetff()# or assumebff()
separatefields()
In a motion area, if the motion looks jerky in either tff(top field first), or bff(bottom filed first) than the video is indeed interlaced. If not then it's progressive.
Crop out the black bars, then find the DAR by dividing 1024 by the new vertical height, I suspect the DAR is 2.35:1.
Resize to 720*432, on the last line add converttoyuy2() as CCE likes YUY2 input.
Feed the avs into CCE, select VBR elementary with as many passes as you like. In the frame-size box put 576 where it says 432, hit the "Area setting" button, in the "output file" section where it says "Region of interest -> (w,h)" put 432 in the height field, where it says "where it says "Region of interest -> (x,y)" put 72 in the y field. In the "settings information" bit it should say blanking top and bottom by 72.
Encode the Video.
3hrs 5mins on one DVD5 is pushing it a bit, lowering the horizontal resolution to 704 will help.
I've posted a sample, which I think this is a good example of CCE doing the black bars for you.
http://www.mediafire.com/?1zmxydsjpd9
EuropeanMan
3rd October 2007, 00:43
I had some problems with the script as well, and have referenced here that solution...which works now.
My question to you guys...is it NOT possible to do a 1pass VBR? I understood the above. This is an NTSC DVD9. It was originally pal 25fps P to NTSC transfer at 30i.
Here is what Didee and I were working on.
http://forum.doom9.org/showthread.php?t=130449
EuropeanMan
3rd October 2007, 00:57
ColorMatrix(mode="Rec.601->Rec.709") to feed cce, if necessary.
get rid of it.
IT'S BEEN RID OF...it was originally there for my Xvid rip... :)
can't tell without sample.
SAMPLE of dvd9 that i tested is in link in above post
i'd assume the following though from what you say, and what you're trying:
crop( 6, 54, -4, -52)
lanczos4resize(720,360)
Addborders(0,60,0,60)
then encode with a 16:9 aspect flag of course.
i added 5 to top & bottom myself...
I've already mentioned you have to untick the 'dvd compliant' box
so you can encode to 720x480 at 25 fps.
then you take the output and pulldown to 29.97 in dgpulldown.
This DVD compliant box you speak of is directly under "MPEG-2", correct? (top right)
Of course the name EuropeanMan, makes me wonder.
Can't we make it pal?
keep progressive 25fps and resize to pal resolution:
crop( 6, 54, -4, -52)
lanczos4resize(720,432)
Addborders(0,72,0,72)
NTSC dvd9, sorry...will need to encode to NTSC as well.
obviously.
Multipass VBR will ensure target filesize.
select multipass vbr, set passes to 2, maybe lower v/c a bit,
set min to 0, max to 9200 and avg to your estimated bitrate (2840).
What is V/C? What does do? Currently it's at 30...you recommended in lowering it...so I put it at 25? Would like some input on this.
As for other options they look ok.
you should also tick 'progressive frame' and set 'dc precision' to 8
I would disable filtering in picture settings.
and I wouldn't use that matrix.
I would like to be able to use Avamat 6 or 7...which would you recommend @ 2840 bit rate...and it doesn't seem like I can select any other customised Matrix. Must I open up the Avamat and replace the digits with ones I want ? Please explain this as well...and I thank YOU so much!
gl
If you look at the link I provided in the above post, you'll see that I have a new deinterlacing routine. With Mrestore, I will need to divide this 3hr5 min movie into 3 pieces, so that I won't have to worry about memory leaks associated with films longer than 1hr30mins for Mrestore. I'll piece that together...and then feed the .avi into CCE...I'll assume it will be the same steps above here? Because it will be a lossfile encode for CCE...
EuropeanMan
3rd October 2007, 00:59
Here is a test that I've done using the new script.
http://maxupload.com/48601DD1
~39.4MB (no audio)
EuropeanMan
3rd October 2007, 01:04
I assume you're trying to shrink a PAL DVD9 to fit on a DVD5.
Don't guess if the video is interlaced or not, find out. This script does that:
assumetff()# or assumebff()
separatefields()
In a motion area, if the motion looks jerky in either tff(top field first), or bff(bottom filed first) than the video is indeed interlaced. If not then it's progressive.
Crop out the black bars, then find the DAR by dividing 1024 by the new vertical height, I suspect the DAR is 2.35:1.
Resize to 720*432, on the last line add converttoyuy2() as CCE likes YUY2 input.
Feed the avs into CCE, select VBR elementary with as many passes as you like. In the frame-size box put 576 where it says 432, hit the "Area setting" button, in the "output file" section where it says "Region of interest -> (w,h)" put 432 in the height field, where it says "where it says "Region of interest -> (x,y)" put 72 in the y field. In the "settings information" bit it should say blanking top and bottom by 72.
Encode the Video.
3hrs 5mins on one DVD5 is pushing it a bit, lowering the horizontal resolution to 704 will help.
I've posted a sample, which I think this is a good example of CCE doing the black bars for you.
http://www.mediafire.com/?1zmxydsjpd9
I thank you deeply for your input. The deinterlacing part has been taking care of, thanks to input from Didee. I've put the link here in a post to see DVD9 sample we were working from. Also another link posted to show what my script has done. I wished I could have had more detail come out of this source...but I am already pushing nearly 1.4fps for the lagarith encode... :)
PS...IF i do it at 704, can this still be anamorphic? Only asking because this is my very first manually done CCE...I hope to be wowed by the results :) So far enjoying this process...quite a learning lesson!
45tripp
3rd October 2007, 01:52
Seems like you're almost there
My question to you guys...is it NOT possible to do a 1pass VBR?
of course it is.
if you want the best do the 2-pass.
This DVD compliant box you speak of is directly under "MPEG-2", correct? (top right)
yes
What is V/C? What does do? Currently it's at 30...you recommended in lowering it...so I put it at 25? Would like some input on this.
25 is good.
it changes bitrate variabillity, fluctuations.
Lower increases, higher decreases.
Must I open up the Avamat and replace the digits with ones I want ? Please explain this as well...and I thank YOU so much!
open cce quant matrices,
start replacing the cells, painfully one by one with you custom values.
type a preset name and save.
should be an easier way via the registry to load your matrices but i'm not aware of it.
gl
EuropeanMan
3rd October 2007, 02:05
thanks IMMERSION so so so much! appreciate your help.
IF you have seen the other thread an you know any of the answers or have suggestions, please let me know. at the present time, doing my 1st part (59minutes) encode to lags... :) will take about 10hrs...
and as for the CCE i see the painful part of substituting the #s in the matrix from avamat :) and i got everything else down.
thank you! ps...did u see my sample output above? what did you think?
PS...it's best I will assume to use VD to put all 3 lags together, and then use that to feed into CCE, correct?
EuropeanMan
3rd October 2007, 02:08
P.S. i live near los angeles...but i also live in germany part-time...near heidelberg. IF i had my choice i would live in europe permanently...my heart's still there, and thus, the ID Europeanman...though I am an american citizen.
Tx again
PhillipWyllie
3rd October 2007, 02:48
IF i do it at 704, can this still be anamorphic? Only asking because this is my very first manually done CCE...I hope to be wowed by the results :) So far enjoying this process...quite a learning lesson!
Of course, your TV doesn't care what the original resolution was, in fact you could have a horizontal resolution of 352 and still have it displayed correctly on your TV, and in full(although there would be half the detail missing). 16:9(widescreen-PAL) TVs will always stretch 16:9 video to 1024 "pixels" wide. 16:9(widescreen-NTSC) TVs will always stretch 16:9 video to 853 "pixels" wide. On 4:3(standard-PAL) TVs the picture is stretched to 768 "pixels" wide, regardless if the video is 16:9 or 4:3. On 4:3(standard-NTSC) TVs the picture is shrunk to 640 "pixels", regardless if the video is 16:9 or 4:3. On 4:3(standard) TVs, when widescreen(16:9) content is played letterboxes are added to keep the 16:9 aspect ratio, of cource you can change some TV's/ DVD player's settings to alter this behaviour. An example is to have 16:9(widescreen) content played "Pan-Scan".
I use the term "pixels" to describe horizontal resolution loosely as analogue TVs don't measure resolution in pixels, but bandwidth. It's acceptable to describe vertical resolution in pixels as TVs have distinct lines which can be equated to pixels quite easily.
The sample you posted in the earlier thread, is that from the original DVD9?
EuropeanMan
3rd October 2007, 03:10
Yes, there should be a DVD9 sample and also 2 encoded outputs...
then i believe i also at the end either here or there, released another final encoded product to look at :) which is what i will be going with...
704 you are suggesting to save on bitrate, correct? or better compression...
PhillipWyllie
3rd October 2007, 03:26
Correct about saving bit-rate. I have a question, why are you encoding your intermediate files to Lagarith, don't you know that's probably the slowest codec out there(even x264 beats that on it's most insane settings)? Uncompressed video in the YV12 colour-space @720*576 only takes ~600 kB per frame, making the average movie around 80 GB. I'd invest in an aditional HDD(say 250 GB), if you're planning on doing more projects like this.
EuropeanMan
3rd October 2007, 03:40
^ 120HD as it is...and it's usually 70-80 free :) so these projects, IF i like the quality that turns out in the end, will be ~ 1 per month...will select some of my favourites and do it...
to lagarith u ask...to also encode to Xvid later on if i choose to. thus saving many hours for that process :) cuz NOW for the xvid,i just have to crop the black borders and that's it...simple & fast...cuz it'll already be processed the way i want it.
PhillipWyllie
3rd October 2007, 04:10
to lagarith u ask...to also encode to Xvid later on if i choose to. thus saving many hours for that process :) cuz NOW for the xvid,i just have to crop the black borders and that's it...simple & fast...cuz it'll already be processed the way i want it.
I recomend uncompressed as you don't have the overhead of decompressing(ie using a codec) the video when you encode to MPEG-2 or XVid. Also SATA II drives are fairly fast and can handle the data transfer rate required. The fastest I've got CCE up to was around 100 fps using the SATA II(my on-board raid controller is shat), it's usually 60-70 fps when I use a simple avisynth script. If I encode a Blu Ray disc to DVD it's ~20 fps(if I'm lucky), that's because of the overhead with DGAVCDec.
EuropeanMan
3rd October 2007, 18:00
Quick question...
In the future, I have a 2 DVD set of a movie, which was 2 parted...well you have the first movie, then 3 years later there was a sequel. If i make lagariths of both, can I add them BOTH in CCE and put them on ONE dvd5? i know the bitrates are NOt going to be that great...but can that be done at all?
PhillipWyllie
5th October 2007, 04:19
Yes, but the bit-rate will be have to be very low. Resizing to 352*576 or 352*288 will be a must. Both these resolutions are DVD compliant and will still result in anamorphic widescreen that fills up yor TV screen. A note about the 352*288 resolution, some DVD players don't like resizing vertically(althought the PS2 doesn't mind).
EuropeanMan
5th October 2007, 07:54
i have 76 minutes left on my cce encode...
and i will have to mux it all together...
NOW i have 8 subtitle streams from my orig dvd9...how the HECK am i gonna extract them into .sup files? cuz i do NOT understand how to do it in ifoedit...i thought i was doing it right, but it started creating hundreds of these small files...is that correct?
i HOPE someone is alive & awake...thanks :) PLEASE help...
i had thought i would get this nice one .sup file to add along with my ac3 file in muxman...but 100s of them?
EuropeanMan
5th October 2007, 15:46
One other thing, the AC3 file had an over 9000ms delay...and IFOedit only handles up to 5000...
I'm on Vista...and for some reason I can't get AC3 to work? So I can possibly pull the AC3 File in BeLite/Sweet to adjust the delay? I don't get it :( And yes, I have AC3 filter installed.
45tripp
5th October 2007, 18:21
You might find pgcdemux and delaycut
useful tools.
And you may want to start a new thread in the appropriate section to get specific re-authoring help.
gl
EuropeanMan
5th October 2007, 19:17
I have done that to no avail :( thanks :)
EuropeanMan
5th October 2007, 19:34
Immersion...I love you...really I do. THANK YOU.
vBulletin® v3.8.5, Copyright ©2000-2012, Jelsoft Enterprises Ltd.