Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion.

Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules.

 

Go Back   Doom9's Forum > Video Encoding > MPEG-4 AVC / H.264

Reply
 
Thread Tools Search this Thread Display Modes
Old 16th January 2008, 20:42   #1  |  Link
((( atom )))
noise is all around us...
 
((( atom )))'s Avatar
 
Join Date: Nov 2001
Location: - deep within -
Posts: 466
LOST and x264 settings help

Ok, so I've been doing my recent 40 or what encodes with x264 using crf and so far I am very happy with the improved quality and the little bigger filesizes then my old standard xvid 2pass.

Now I'm LOST: 3 seasons, 24, 23 and 23 episodes, wich I will want to be able burn to dvd. So I will have to deal with a target size using x264 for the fist time. I would really like keeping the unscaled, cropped picture and encode anamorphically and keep the original ac3 (around 120MB), but I am not sure if and how far I can squeeze all while staying close to the original DVD quality.

Since I have only been using x264 with crf so far, I have no good starting point and no idea if I can achieve my goals at all.

Any hints, please?
__________________
((( atom )))
((( atom ))) is offline   Reply With Quote
Old 16th January 2008, 20:52   #2  |  Link
Sharktooth
Mr. Sandman
 
Sharktooth's Avatar
 
Join Date: Sep 2003
Location: Haddonfield, IL
Posts: 11,768
easy. encode 2% of randomly chosen scenes (the usual selectevery() stuff) of an episode at a certain CRF (the one you're aiming - usually 18 is enough for complete tansparency) and look at the filesize.
multiply that by 50 and you'll have approximately the whole encoded movie file size (minus the audio size that you should take into consideration too!). if that's bigger than your target filesize (if it's smaller or equal then your desired filesize will be OK for sure), divide your target filesize by the previous number and you'll gain a quality ratio. multiply by 100 and you'll get how much % of "quality" you will loose from the desider CRF by using the desired filesize.

Last edited by Sharktooth; 16th January 2008 at 20:59.
Sharktooth is offline   Reply With Quote
Old 16th January 2008, 20:56   #3  |  Link
Dark Shikari
x264 developer
 
Dark Shikari's Avatar
 
Join Date: Sep 2005
Posts: 8,666
If you want a specific bitrate, just use twopass mode.
Dark Shikari is offline   Reply With Quote
Old 16th January 2008, 21:00   #4  |  Link
Sharktooth
Mr. Sandman
 
Sharktooth's Avatar
 
Join Date: Sep 2003
Location: Haddonfield, IL
Posts: 11,768
D S, yeah... i have made a compression test example to help him decide the final filesize since he always used CRF modes...
Sharktooth is offline   Reply With Quote
Old 16th January 2008, 21:01   #5  |  Link
((( atom )))
noise is all around us...
 
((( atom )))'s Avatar
 
Join Date: Nov 2001
Location: - deep within -
Posts: 466
Ok, sound simple, but is CRF still the way to go when targetting for a filesize? And if so, what CRF would still be ok?
I just ran a full encode of the pilot at CRf 18 and ended up with 917MB. I can quickly encode that again, since I have a core2 quad now, yess!, and it only takes 20 minutes or so..
__________________
((( atom )))
((( atom ))) is offline   Reply With Quote
Old 16th January 2008, 21:08   #6  |  Link
Sharktooth
Mr. Sandman
 
Sharktooth's Avatar
 
Join Date: Sep 2003
Location: Haddonfield, IL
Posts: 11,768
no... the CRF in the example is just a test encode to help you decide the final filesize (bitrate).
the test was meant to tell you how much quality % you'll loose from your desired quality when aiming at a certain filesize, so you can decide if that filesize will be good for your needs or not...
needless to say you should use the same options for both CRF test encode and your final encode...
Sharktooth is offline   Reply With Quote
Old 16th January 2008, 21:08   #7  |  Link
((( atom )))
noise is all around us...
 
((( atom )))'s Avatar
 
Join Date: Nov 2001
Location: - deep within -
Posts: 466
Sharktooth, you and D S answered while I was typing.. So are aou saying I should use your example to figure how many episodes I will actually get onto a DVD with decent quality and then set up a two-pass encode?
__________________
((( atom )))
((( atom ))) is offline   Reply With Quote
Old 16th January 2008, 21:09   #8  |  Link
Sharktooth
Mr. Sandman
 
Sharktooth's Avatar
 
Join Date: Sep 2003
Location: Haddonfield, IL
Posts: 11,768
yes. exactly.
ok, now you have your 918MB encode... try to do what i said

EDIT: lets say you want to put 5 episodes in one DVD. that's 896MB per episode.
so, making the operations i explained in my first reply, you will find that 896MB is 97.6% of 918MB... that means you will only loose 2.4% from your CRF 18 quality encode. is that acceptable?
if yes, you can go on with 5 episodes per DVD...
NOTE: we didnt took the audio into consideration... you should account for that too by subtracting the audio filesize from 896MB and from 918MB...

Last edited by Sharktooth; 16th January 2008 at 21:29.
Sharktooth is offline   Reply With Quote
Old 16th January 2008, 21:12   #9  |  Link
((( atom )))
noise is all around us...
 
((( atom )))'s Avatar
 
Join Date: Nov 2001
Location: - deep within -
Posts: 466
running it at 21 again.. Projected filesize shows 556 MB so far, still to much.. Will be back when done in a couple of minutes..
__________________
((( atom )))
((( atom ))) is offline   Reply With Quote
Old 16th January 2008, 21:17   #10  |  Link
Sharktooth
Mr. Sandman
 
Sharktooth's Avatar
 
Join Date: Sep 2003
Location: Haddonfield, IL
Posts: 11,768
no... you dont need multiple CRF encodes...
do just a CRF 18 encode. then do what i said.
Sharktooth is offline   Reply With Quote
Old 16th January 2008, 21:22   #11  |  Link
((( atom )))
noise is all around us...
 
((( atom )))'s Avatar
 
Join Date: Nov 2001
Location: - deep within -
Posts: 466
ok, starting 18 now.
__________________
((( atom )))
((( atom ))) is offline   Reply With Quote
Old 16th January 2008, 21:26   #12  |  Link
Sharktooth
Mr. Sandman
 
Sharktooth's Avatar
 
Join Date: Sep 2003
Location: Haddonfield, IL
Posts: 11,768
ok. let's do it step by step.
the problem is: you dont know how much bitrate to specify to obtain a good quality encode.
solution: do a compression test against your ideal quality.
Steps:
1- choose final filesize (that leads to a final bitrate too)
2- do a CRF 18 encode (whole or partial as described above)
3- compare the CRF 18 filesize against YOUR DESIRED filesize (as described above)
4- once you have a % of difference you are able to decide if your chosen filesize is OK or NOT, by looking at that % number... usually (and that's pretty subjective!!!) a 15-25% difference is acceptable but not more.
5- if it's ok you can proceed with a 2 pass encode with your chosen filesize (->bitrate), if not then choose a bigger filesize and go to point 3.

NOTE: the step 2 is just an analysis pass and you dont need to do the whole encode at that step. a 2% of the encode is ok (at the end, remember to multiply the filesize you obtain with this encoding by 50, for successive the successive steps/operations)

Last edited by Sharktooth; 16th January 2008 at 21:42.
Sharktooth is offline   Reply With Quote
Old 16th January 2008, 21:38   #13  |  Link
((( atom )))
noise is all around us...
 
((( atom )))'s Avatar
 
Join Date: Nov 2001
Location: - deep within -
Posts: 466
Ok, much clearer now, thx. The CRF 18 encode is still running, projected filesize 972 MB right now and after my noodles I will go on..
__________________
((( atom )))
((( atom ))) is offline   Reply With Quote
Old 16th January 2008, 21:41   #14  |  Link
Sharktooth
Mr. Sandman
 
Sharktooth's Avatar
 
Join Date: Sep 2003
Location: Haddonfield, IL
Posts: 11,768
ok. keep in mind that is a very good a way to calculate the quality loss from an ideal encode (at CRF18) to a filesize limited encode... that will always help you to answer by yourself questions like "what bitrate should i use?" or "how much episodes can i put on a DVD without loosing too much quality?"
oh... and dont forget to take the audio size into consideration too...

Last edited by Sharktooth; 16th January 2008 at 21:44.
Sharktooth is offline   Reply With Quote
Old 16th January 2008, 22:20   #15  |  Link
((( atom )))
noise is all around us...
 
((( atom )))'s Avatar
 
Join Date: Nov 2001
Location: - deep within -
Posts: 466
So CRF 18 turns out 917 MB.
8 episodes for 1 DVD makes 560 MB per episode
Audio is 113 MB, so I have 447 MB for my video, not even 50%.

I guess the next step is to throw anamorphic encoding overboardand see if i can at least keep the vertical resolution

Testing...
__________________
((( atom )))
((( atom ))) is offline   Reply With Quote
Old 16th January 2008, 22:22   #16  |  Link
((( atom )))
noise is all around us...
 
((( atom )))'s Avatar
 
Join Date: Nov 2001
Location: - deep within -
Posts: 466
ahh, horizontal that was
__________________
((( atom )))
((( atom ))) is offline   Reply With Quote
Old 16th January 2008, 22:35   #17  |  Link
Ranguvar
Registered User
 
Ranguvar's Avatar
 
Join Date: Feb 2007
Location: ::1
Posts: 1,236
IMDB says the aspect ratio is 1.78:1. I would go with either 720x400 or 688x384 for the resolution in that case. The former comes out to 1.8:1, the latter to 1.79:1. The former will most likely be better quality since it is higher resolution by a little, but the latter is slightly closer to the original aspect ratio. I'd probably go with the former, since while it's easy to tell when a video has been "squished", it's hard to tell when it's been "stretched", and it's only barely stretched at all.

Hope that helped
Ranguvar is offline   Reply With Quote
Old 16th January 2008, 22:49   #18  |  Link
((( atom )))
noise is all around us...
 
((( atom )))'s Avatar
 
Join Date: Nov 2001
Location: - deep within -
Posts: 466
yeah, meanwhile i did a resized non-anamorphic encode at 720x400 wich will gave me 634 MB. 20% off would still be 508 MB. Since I rezise anyway and remember to have read that the eye sees sharper in the vertical resolution I will try now 592x464 [EDIT] anamorphic [/EDIT]. This way I will have a little less pixels to encode than using 720x400 and will keep more of the important vertical pixels. Never tried anamorph encoding after having resized, but as I understand the whole trick is keeping as much of the vertical pixels. Well, I'll see. Any coments on that idea?
__________________
((( atom )))

Last edited by ((( atom ))); 16th January 2008 at 23:00.
((( atom ))) is offline   Reply With Quote
Old 16th January 2008, 23:11   #19  |  Link
Ranguvar
Registered User
 
Ranguvar's Avatar
 
Join Date: Feb 2007
Location: ::1
Posts: 1,236
Not really sure... I never use anamorphic since several players I use are incompatible with it; I just use normal. Since you're doing huge x264 encodes, I highly doubt there'll be any visible difference; I'd go with the 720x400. Try and see though
Ranguvar is offline   Reply With Quote
Old 16th January 2008, 23:25   #20  |  Link
((( atom )))
noise is all around us...
 
((( atom )))'s Avatar
 
Join Date: Nov 2001
Location: - deep within -
Posts: 466
Well, so I tried that anamorphic encoding after resizing but I have the feeling, that the statement about vertical resolution is not quite true. I will have a closer look at my results tomorrow, time for bed now..
__________________
((( atom )))
((( atom ))) is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 05:34.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.