PDA

View Full Version : LOTR: TTT (SEE) HQ encode (i hope)


Dallemon
23rd August 2004, 19:13
hi... been using a few days to try and make a good hq rip of the mentioned motion picture...

avsscript (updated)

mpeg2source("C:\Documents and Settings\Daniel Thamdrup\Skrivebord\LOTR_TWO_TOWERS_SEE_D1\VIDEO_TS\video.d2v",idct=7)
crop(0,76,0,-76,align=true)
lanzcos4resize(720,404)


xvid settings

AQ
Qpel
Trellis
Chroma Optimizer
VHQ 4
MSP 6
Quant 2-31
Matrix: Didees 6-of-9 max=20
B-VOP 2/1.5/1
Closed GOV
Max I-Frame Interval 250


target size is 1 DVD

any suggestions for improvement are welcome...
alright i managed to join the 2 dts soundtracks... now i just need to figure out how to transcode to aac
btw forgot to mention this is a 2-pass encode ^^

image comparison

source


encode

chilledoutuk
23rd August 2004, 19:43
if the source quality is good then i would not use postprosessing as it will smooth out detail.

Also at that bitrate i would not bother removing the video grain as this will also loose film detail.

Infact you would be better off creating an anamorphic encode with no resizing of the image.

If you want a higher resolution version you should try to get hold of a hdtv source if you cant capture your own there are some on newsgroups etc

Dallemon
23rd August 2004, 20:54
merge with post #1

Andrey
23rd August 2004, 23:09
>>i would also like to know how to join the 2 AC3
Offtopic a bit, but BeSweet and Co will help you with joining .ac3 tracks.
But never tried joining .dts ...
EDIT:
>>If you want a higher resolution version you should try to get hold
>>of a hdtv source if you cant capture your own there are some on >>newsgroups etc
Just interesting, do they really use another source for HDTV broadcasts ? Or simply resize DVD copy ?

Dallemon
23rd August 2004, 23:10
what about converting the dts to aac then?

Andrey
23rd August 2004, 23:17
>>what about converting the dts to aac then?
The same here then: BeSweet will do this job for you.
BTW, it can be good idea to encode dts to aac in your HQ encode becaue of:
1. aac is native audio format for mpeg4. ac3 is not.
2. ac3 especially 5.1 have not a bright quality - it uses channel coupling right about 10Khz (usually), and so on. Reencoding it can add even more artifacts. So, it SEEMS to be better to use dts track for this job.
Just my 2 cents.
EDIT: grammar

SiXXGuNNZ
24th August 2004, 00:14
I am getting ready to encode this today, is there an audio/video async between disc 1 and 2 like with the fellowship see?

chilledoutuk
24th August 2004, 01:05
Just interesting, do they really use another source for HDTV broadcasts ? Or simply resize DVD copy ?

One hopes so as otherwise there is no point in HDTV broadcasts.

as long as they used decent cameras then films encoded especially for hdtv broadcasts will always have more detail and be more like the orginal film.

Dallemon
24th August 2004, 09:37
ive tried several dts guides but none of them will work on this track ;_; and if i opted to use the dts track i would also need to join them... also with besplit?

i will upload the pics when i get home from school

and i would guess you get the asynch probs if you dont remove the black frame...

Ana
24th August 2004, 10:27
You can use this tool to join 2 (or more) dts tracks:

http://home.zonnet.nl/koelooptiemanna/DTSTrim.zip

And I'm eager to see pictures of your encode. Hopefully you can upload them soon.

Andrey
24th August 2004, 12:46
>>ive tried several dts guides but none of them will work on this
>>track ;_; and if i opted to use the dts track i would also need to
>>join them... also with besplit?
There is another solution - join aacs after encoding :D
BTW, I've never managed to use dts tracks, so I'm sorry I can not help you on this problem...

olavitur
24th August 2004, 16:09
mpeg2source("C:\Documents and Settings\Daniel Thamdrup\Skrivebord\LOTR_TWO_TOWERS_SEE_D1\VIDEO_TS\video.d2v",cpu=0,idct=7,ipp=false)
[

I would remove those cpu, idct and ipp thingys because default values work well (I've never used them).


xvid settings

AQ
Qpel
Trellis
Chroma Optimizer
VHQ 4
MSP 6
Quant 2-31
Matrix: Didees 6-of-9 max=20
B-VOP 3/1.5/1
Closed GOV
Max I-Frame Interval 250



Here I wouldn't use AQ, Qpel or Trellis (you won't need them because you are encoding with high bitrate). Furthermore, I would use VHQ 1 because the encoding speed will be much faster. I would also set B-VOPs to 1/1/1.

Teegedeck
24th August 2004, 16:35
Originally posted by olavitur
I would remove those cpu, idct and ipp thingys because default values work well (I've never used them).

IDCT=7 is a good idea (though hardly visually detectable); otherwise you're right - the cpu and iPP setting shouldn't do anything as '0' and 'false' are the default values, anyway.



Here I wouldn't use AQ, Qpel or Trellis (you won't need them because you are encoding with high bitrate). Furthermore, I would use VHQ 1 because the encoding speed will be much faster. I would also set B-VOPs to 1/1/1.
Here I completely disagree. Dallemon's settings are absolutely fine. Keep them that way.

Edit: Excuse my initial harsh answer; olavitur. Your B-VOP settings aren't a complete desaster but I'd rather stick with the defaults, they're superior. I seem to be in a bad mood today, posting stuff in a haste (as you could see in the other thread about the SixOfNine-HVS matrix. Please excuse that, everyone!

Tee

JimiK
24th August 2004, 16:50
I have to disagree with olavitur on some points.
AQ: never used it, so I can't really say something about it, but I haven't heard it hurts quality.
Trellis: does not hurt quality, no reason to turn it off.
B-VOPs: I would say with a setting of 1/1/1 they're not very effective, but could even lead to a higher bitrate. Use defaults (or your settings that are similar) or don't use them at all. I could imagine even a constant quant 2 encode would fit on one DVD-R when the audio get encoded to a smaller size (although Didees 6-of-9 is a very high bitrate matrix).
VHQ: I'm a fan of VHQ, so I mostly keep it at 4. My impression is that it helps keeping background from swiming (maybe that's just imagination).
QPel: here I have to agree. QPel is ineffective when keeping the same resolution and not downsizing. So you could save some time when not using it.
Best regards,
JimiK
P.S. When writing this I saw that Teegedeck again beat all others in the "answer-game".

Andrey
24th August 2004, 17:02
>>Use defaults (or your settings that are similar) or don't use them at all.
Not using B frames could hurt a quality if movie encoded not at constant quantizer 2...
Use defaluts - it is a magical phrase :)

Teegedeck
24th August 2004, 17:05
Yep; though I'd like to update the defaults to include QPel and maybe even GMC (slooooow...). ;)

Soulhunter
24th August 2004, 21:21
Even when you menace to thrash me... :D

-> Hides under the desk


- Trellis

- B-VOPs = 2/1/1

- Chroma motion

- VHQ 1 (IMO enough...)

- Didče's Six of Nine (HVS) or my Soulhunters v3

- And maybe spiced with some "slight" spatial denoising !!!


Bye

Teegedeck
24th August 2004, 22:01
Eeeeeeeeeck!
*Denoising* :D ...for all kinds of sources?!?

I think VHQ=4 does wonders for clean/low noise sources when compared to VHQ=1. But VHQ=1 on the other hand seems the choice if you want a 'close to the original' look for very noisy sources.

Soulhunter
24th August 2004, 22:58
Originally posted by Teegedeck
Eeeeeeeeeck!
*Denoising* :D ...for all kinds of sources?!?
Yeah, but for the most source I use only very low values... ;)

Mainly to kill the "invisible" detail you wont notice anyway !!!

I love VagueDenoiser for this... http://img69.exs.cx/img69/8748/drool3.gif


Bye

SiXXGuNNZ
25th August 2004, 01:44
well, I started mine, R1/NTSC

my script

LoadPlugin("C:\PROGRA~1\GORDIA~1\AviSynthPlugins\dgdecode.dll")
video1=mpeg2source("C:\DVDRIP\TTT.SEE.D1\D1.d2v").crop(8,60,704,356).LanczosResize(720,368)
video2=mpeg2source("C:\DVDRIP\TTT.SEE.D2\D2.d2v").crop(8,60,704,356).LanczosResize(720,368).trim(0,155700)
total=video1+video2
return total

I encoded the credits at 1000 kbps, they actually averaged, 986 kbps, they look great(I ran a test encode last night and I noticed on the two pass, the credits got like 3200 kbps so I decided to cut trim them and do a single pass on them)

my credits settings

Didees HVS/24(I didn't know if I could switch matrices and then join, so I played it safe)
AQ, Q-Pel, B-VOPs - 2/1.50/1.00, Packed Bitstream - off
chroma optimizer enabled
MSP - 6, VHQ - 1, Use Chroma motion, I-frame - 240
Quants - 2/31, Trellis - off

my movie settings

Didees HVS/24
Q-Pel, B-VOPs - 2/1.00/1.00, Packed Bitstream - off
chroma optimizer enabled
MSP - 6, VHQ - 1, Use Chroma motion, I-frame - 240
Quants - 2/31, Trellis - off

audio - AAC-LC, 6ch, 334 kbps VBR, 577,782 KB
credits - 149,256 KB
movie - 3,839,535 KB

was about 20 MB undersized on my test run.

I will post some samples if anybody is interested, the encode should be done about 2am PST, about the time I get home from the bar ;)

JimiK
25th August 2004, 09:46
Just wanted to say what made me think "my way" about the settings. There are some posts in the xvid-mailinglist I was referring to. It's just not easy to say which settings are optimal. A quote by gruel:
There are some clips where B-frames do wonders, and some where they don't help at all. The same for QPel (e.g. for MPEG-2 input like DVDs it's known not to help not much, if at all). GMC hardly ever helps, and it computationally very expensive.
from here: http://edu.bnhof.de/pipermail/xvid-devel/2004-July/004374.html
The following posts in this mailinglist try to explain why QPel may not be necessary when encoding from DVD source.

ObiKenobi
25th August 2004, 09:54
Originally posted by Andrey
Just interesting, do they really use another source for HDTV broadcasts ? Or simply resize DVD copy ? [/B]

Yes they use an HD, 1080i, source for HDTV broadcasts not a downconverted NTSC source.

http://www.videophile.info/Review/FOTR/FOTR_01.htm

That has a good comparison between the HD broadcast and NTSC dvd of the first LOTR move at the bottom of the page to show the difference between them.

Teegedeck
25th August 2004, 13:54
Originally posted by JimiK
Just wanted to say what made me think "my way" about the settings. There are some posts in the xvid-mailinglist I was referring to. It's just not easy to say which settings are optimal. A quote by gruel:

from here: http://edu.bnhof.de/pipermail/xvid-devel/2004-July/004374.html
The following posts in this mailinglist try to explain why QPel may not be necessary when encoding from DVD source.

Yes, I know that post. (edit: the time I first read it, I immediately ran some tests for comparison and decided to stick with QPel) Christoph states that it may not be necessary to use qpel for DVD transcodes because qpel can preserve/stress a sharpness which sometimes isn't there in those blurry MPEG-2 sources. (Actually Christoph has technical reasons, MPEG-2 having lower quality ME etc, which I have translated into my own primitive English above. But see below for a possibly good reason to use quarterpel anyway.)

Originally posted by Christoph Lampert
So, one explanation for MPEG-4s rather poor performance in Qpel mode would
therefore be that MPEG-2 images are more smoothed/blurred level than
MPEG-4 can directly reproduce with it's sharpness preserving filter. It
therefore needs to spend additional texture bits to just simulate the
smoothness of MPEG-2.

I interpret this as quarterpel not being very cost-effective (quality/space), basically.

But thing is, quarterpel almost always does make for a subjective gain in quality although it can sometimes produce a look sharper than that of the original (which, in contrast to smoothing, I can hardly find bad). So strictly speaking it isn't in all cases beneficial if you aim for the original's look. But in absolutely the most cases the perceived sharpness of quarterpel makes up for MPEG-4's lack of DC-precision (which also makes for a 'sharp' look) and thus contributes to a transparent encoding IMHO.

As for GMC not 'helping', I believe we must keep in mind that Christoph speak as a techie and may also have had 'saving bits' in mind when using that word or 'PSNR' which is common for measuring performance when coding XviD although we've agreed on this forum that it certainly has only very limited correlation to actual perceived quality. Yes, GMC is the last thing I'd switch on if I was short on computing power.

Originally posted by Christoph Lampert

I might have stated it wrong in the original posting: It's not that
MPEG-4 Qpel is bad at encoding MPEG-2 material or anything. It's just that MPEG-4 Hpel is extremely good at it, otherwise it would be impossible to reduce a 8 Mbps to less than 2 Mbps with almost no visual quality loss.
QPel doesn't make improve it any further.
But this is also a problem of measuring performance, because a high PSNR
value (which many people take as "good quality") here only means that the
MPEG-4 result is close to MPEG-2's output including all visual artefacts
that that might have had.
In fact, some people say that Qpel images look better than Hpel ones, even
at same PSNR.

JimiK
25th August 2004, 16:15
Yes, I was quite sure you read that post. I just wanted to show another perspective. You're certainly correct when you say that Christoph is looking at this from an almost only technical point of view. These guys are so busy programming, they don't find the time to encode themselves.
You're absolutely right that QPel changes the look of the encode. Sometimes I like that look, sometimes not. What Christoph says is that QPel may not preserve more information. Most of the time I use noise to 'sharpen' the image (you see, I also don't like the 'original' image ;) ) and I often prefer this look over the QPel look. Of course that is always subjective. In my opinion it is good to know, that HPel is already doing a great job.
GMC: I know it doesn't hurt and I was always looking forward to the final implementation in the 'old days'. But I have less than one week for every encode ;)

Andrey
25th August 2004, 20:51
ObiKenobi: Yes they use an HD, 1080i, source for HDTV broadcasts not a downconverted NTSC source.
Oh ! I really convinced now that HDTV is a good idea ! :p
Thanks for the link !

Rober2D2
28th August 2004, 16:14
A few things to improve the script:

LoadPlugin("C:\PROGRA~1\GORDIA~1\AviSynthPlugins\dgdecode.dll")
video1=mpeg2source("C:\DVDRIP\TTT.SEE.D1\D1.d2v").crop(8,60,704,356).LanczosResize(720,368)
video2=mpeg2source("C:\DVDRIP\TTT.SEE.D2\D2.d2v").crop(8,60,704,356).LanczosResize(720,368).trim(0,155700)
total=video1+video2
return total

1) Use LanczosResize(720,368,8,60,704,356) instead of crop(8,60,704,356).LanczosResize(720,368). They do the same, but avisynth manual say it works faster if done in a single step.

2) Aspect ratio in DVDs is a little distorted. If you don't reduce frame height, video may have a slight vertical distortion. If original image (including black bars) is supposed to be 4:3, then multiply height by 540 an divide by 576. If supposed to be 16:9, multiply by 405 an divide by 576. In both options round to the nearest multiple of 16. So:

For 4:3 ---> LanczosResize(720,336,8,60,704,356)
For 16:9 ---> LanczosResize(720,256,8,60,704,356)

3) For the credits part you may use blur image using Blur(1), as it will reduce needed bitrate.

SiXXGuNNZ
30th August 2004, 23:15
Originally posted by Rober2D2
A few things to improve the script:



1) Use LanczosResize(720,368,8,60,704,356) instead of crop(8,60,704,356).LanczosResize(720,368). They do the same, but avisynth manual say it works faster if done in a single step.

2) Aspect ratio in DVDs is a little distorted. If you don't reduce frame height, video may have a slight vertical distortion. If original image (including black bars) is supposed to be 4:3, then multiply height by 540 an divide by 576. If supposed to be 16:9, multiply by 405 an divide by 576. In both options round to the nearest multiple of 16. So:

For 4:3 ---> LanczosResize(720,336,8,60,704,356)
For 16:9 ---> LanczosResize(720,256,8,60,704,356)

3) For the credits part you may use blur image using Blur(1), as it will reduce needed bitrate.

thanks for the tip for crop

for #2, I am setting the mp4 aspect to 16:9 NTSC, so from what I read, I do not believe it applies to me, either that, or I don't understand at all what #2 is saying :D

Dallemon
31st August 2004, 08:58
i have retuned *amazed*!
anyway, sry for being so quiet... havent been home lately/had any energy to fiddle with encoding

but i have actually got NO plans for after school today (except for reporting my bike stolen ;_; ) so i will have a go @ dtstrim and posting those god damn pics ^^

and how come no one uses lanczos4resize? :/

SiXXGuNNZ
31st August 2004, 09:14
Originally posted by Dallemon
and how come no one uses lanczos4resize? :/ I didn't know what it was until I just now, google helps me out

I will definately try out lanczos4

Rober2D2
31st August 2004, 14:47
for #2, I am setting the mp4 aspect to 16:9 NTSC, so from what I read, I do not believe it applies to me, either that, or I don't understand at all what #2 is saying

I normally encode to ogm, so I make video stream with aspect ratio already corrected before muxing. May be in mp4 is different. I have never used this mp4 container for a real encoding. Only for a few tests.

4:3 and 16:9 refers to the aspect ratio in which original DVD image should be displayed. This is before cropping, that is, including black bars. Image is always 720x576, but DVD player automatically corrects height. If original aspect ratio is supposed to be 4:3, then DVD player should reduce height from 576 to 540, so you won't notice much distortion. If it is 16:9, height will change from 576 to 405 , so you will clearly see it. Specially you will notice that faces are too large or slim. Anyway, I will look for a few examples to show you what I mean.

SiXXGuNNZ
1st September 2004, 00:35
Originally posted by Rober2D2
I normally encode to ogm, so I make video stream with aspect ratio already corrected before muxing. May be in mp4 is different. I have never used this mp4 container for a real encoding. Only for a few tests.

4:3 and 16:9 refers to the aspect ratio in which original DVD image should be displayed. This is before cropping, that is, including black bars. Image is always 720x576, but DVD player automatically corrects height. If original aspect ratio is supposed to be 4:3, then DVD player should reduce height from 576 to 540, so you won't notice much distortion. If it is 16:9, height will change from 576 to 405 , so you will clearly see it. Specially you will notice that faces are too large or slim. Anyway, I will look for a few examples to show you what I mean.

as I understand it

16:9 NTSC = 854x480 w/ bars | 854/480=1.78
16:9 PAL = 1024x576 w/ bars | 1024/576=1.78
4:3 NTSC = 640x480 w/ bars | 640/480=1.33
4:3 PAL = 768x576 w/ bars | 768/576=1.33

Rober2D2
1st September 2004, 15:13
16:9 NTSC = 854x480 w/ bars | 854/480=1.78
16:9 PAL = 1024x576 w/ bars | 1024/576=1.78
4:3 NTSC = 640x480 w/ bars | 640/480=1.33
4:3 PAL = 768x576 w/ bars | 768/576=1.33

Ok, so you leave height fixed to 576 and increase width, while I leave width fixed to 720, and reduce height. Anyway final aspect ratio is the same.

16:9 PAL = 720x405 w/ bars | 720/405=1.78
4:3 PAL = 720x540 w/ bars | 720/540=1.33[/QUOTE]

I have no american DVDs, so never used NTSC.

Dallemon
2nd September 2004, 17:15
W00T?! i posted the pics... must say i prefer the cropped only pic... (most detail funnily enough ^^)

changed pics

Teegedeck
2nd September 2004, 17:23
Not so surprisingly IMHO; resizing doesn't create any details. Unresized - unfiltered - no pp: Yes.

Dallemon
2nd September 2004, 17:41
i wasnt suprised either... though looking at the diffence made me reconsider any filtering :P

but what about resizing the current pic from 720x424 to 720x404 to achieve 1.78 aspect ratio (almost)

and i successfully merged the 2 dts files... though still having probs converting to aac :S but i was wondering, should i still cut the black frame, coz i would guess that the audio also includes that frame... and if i cut the frame in the video and not in the audio the duration wouldnt be the same :/

Dallemon
7th September 2004, 14:08
set my pc to do a q2 encode last night, hopefully it will be done by the time i get home (approx 6˝-7 hrs) and then i will post new pics

same settings, xvid 1.0.2

Dallemon
7th September 2004, 15:48
wow, came home earlier and it was finished :P
though the final filesize was only a bit smaller than the original :(

VOB:8,15GB
AVI:6,74GB