View Full Version : Needing help with x264 encode from a PAL source
EuropeanMan
25th January 2008, 00:59
Hi guys...
Another n00b question perhaps...
I have a movie (Lagaan, 2007 edition from 3-Disc Collector's set...movie is on the first 2 DVD9s) which is in PAL format...
720x576 of course...Pixel-wise, it is 1024 wide by 576. I've encoded already an Xvid of the 3hr33min movie onto a 4.36GB file size with the first audio channel of AC3 DD 5.1 448kbps. The 2nd audio channel is DTS...nearly 1GB in size.
The intended size for my new rip is DVD9...doesn't matter what size. However, I'm looking for quality.
on the Xvid side, here is a sample
sample 1 (http://maxupload.com/5E044205)
and screens (http://creative.freewebhosting360.com/screenshots.php?s1=http%3A%2F%2Fmaxupload.com%2Fimg%2FA540D5F9.png&s2=http%3A%2F%2Fmaxupload.com%2Fimg%2FFC1DC1CF.png&s3=http%3A%2F%2Fmaxupload.com%2Fimg%2F296D54C0.png&s4=http%3A%2F%2Fmaxupload.com%2Fimg%2F45BA5BD6.png&s5=http%3A%2F%2Fmaxupload.com%2Fimg%2F4B98D20F.png&s6=http%3A%2F%2Fmaxupload.com%2Fimg%2FC298BA1C.png&s7=http%3A%2F%2Fmaxupload.com%2Fimg%2FC296DF34.png&s8=http%3A%2F%2Fmaxupload.com%2Fimg%2FDE6CE560.png)
As you can see I kept it at 1024 (x432). I wish to make it now in 720p (1280x544) with x264 codec.
Now I normally rip via VD or MeGUI. Can someone please tell me if I must do things differently, or just select the x264 codec from the profiles available, or use some custom one that I can use perhaps?...or even point me to a very good high-quality one. I am not particularly worried about speed of encoding, just the end quality.
Here is an EXAMPLE of before (below) & after (on top)...
http://maxupload.com/img/8F702C56.png
any tips would be much apprecaited. i'll begin my rip in about 1 weeks time...i'm EXTREMELY new to this codec. I also realise that perhaps many SAPs may not play 720p or x264 codecs? However, I'm guessing I might have to buy an XBox or something to play this file then after it gets burned to DVD9 Media...
Also if there is some NEW high-quality codec you folks can point me to as well...would be appreciated. At least a codec that could be played on either an Xbox or PS3...I'll imagine at THIS TIME, no standard DVD player will play x264 or H264...
Thanks in advance for any & all help...
Sagekilla
25th January 2008, 01:10
Be aware that x264 is slower than xvid, but the quality is much better. With that said, the following settings can be used for very good quality, but it will be very slow to encode:
x264 --crf 18 --ref 4 --mixed-refs --no-fast-pskip --bframes 16 --b-rdo --bime --weightb --b-pyramids --8x8dct --subme 7 --me umh --trellis 1 --aq-strength 1 --threads auto --thread-input --progress --output "video.264" "source.avs"
Use the latest AQ build by Dark Shikari. You'll find it on this board somewhere in the last few posts. You should be able to get under DVD-9 sizes with this, and much better quality than that xvid. Also, please don't use 1280x544 since if it's 720x576 from pal upscaled and cropped to 1024x432, there's no quality to be gained. No detail exists beyond that 1024x432 pixels, so you'd be wasting bitrate to encode @ 1280x544.
Good luck!
EuropeanMan
25th January 2008, 01:34
^ IF I'm using MeGUI to encode...hmmm, I'm guessing that LINE of code you gave me goes inside one of those CONFIGURE frames...I believe I know where I need to insert that. As for the AQ Build...will have to find out what that is and how to download & place it properly.
And next question...I've heard of AVC...
Is my output going to be x264 AVC inside an MP4 container? And am I allowed to use DTS audio with this?
as for 1280, i'd like to TRY at least...and see what comes out. will test a small sample first. and if it doesn't work, i'll keep the 1024/432. :) thanks for replying...appreciate the heads-up!
EDIT: to WHICH profile must I add the above specifications? HQ-Insane for example?
EuropeanMan
25th January 2008, 03:02
I've tried encoding this WITHOUT the parametre --b-pyramid (because it errored out in MeGUI)...1st pass went fine.
2nd pass, it errored out in Vista, saying x264.exe STOPPED working...any reason why?
Sagekilla
25th January 2008, 04:12
Honestly, encoding as 1280x544 is a complete waste of bits. Unless you've discovered a magical resizing algorithm that can recreate detail (lots of people have gone down this road, none of it works) then there's no point in doing it. If you're using megui, all you have to do is enable the specific options I listed.
Options to enable: B pyramids, B RDO, Weighted B-Frames, bime (optimize motion vectors), 8x8dct, subme 7, motion estimation "uneven multi-hex" (umh), 16 B-frames, 4 reference frames, mixed references, no fast skip on P-Frames, Trellis on final macroblock (trellis 1).
Then add "aq-strength 1" to the custom commands area, which should be under zones. Set the encoding mode to constant quality/constant rate factor (crf) mode, and use a value of "18" for transparent quality. You shouldn't adding all these options to the custom command line, instead enable each one in MeGUI. That's probably why MeGUI was screwing up.
Also, AVC is the video codec of H.264/MPEG-4. When someone says H.264 or MPEG-4 here, they're talking about AVC. For that matter, x264 is an implementation of AVC which is a part of H.264/MPEG-4. (Confusing, I know.) But to answer your question, you can't place DTS (or AC3) in a mp4 container with AVC video. You'll need to transcode to AAC, unfortunately.
EuropeanMan
25th January 2008, 04:18
^ Thanks for this...will try to encode over again...
So there is NO way to use x264 with DTS audio? perhaps .mkv container? I'm sorry for asking these dumb questions...I'm just a virgin to x264 codec.
rampampam
25th January 2008, 04:21
just use the HQ-Insane profile ... the parameters above are if you encoding from the command line ...
in megui these parameters are passed to x264.exe via the gui ... hq-insane profile - probably has all of the parameters max'd out - so it will be the slowest to encode ... atleast 3-4 times slower than xvid in my case ...
avi-mux gui can put dts audio into an mkv contaner with x264... this might have problems on vista though ... http://www.alexander-noe.com/video/amg/
mkvtoolnix might be able to do it also - not sure, i havent used it ...
Sagekilla
25th January 2008, 04:22
^ Thanks for this...will try to encode over again...
So there is NO way to use x264 with DTS audio? perhaps .mkv container? I'm sorry for asking these dumb questions...I'm just a virgin to x264 codec.
Well, you can use x264 with ANY audio of any sort, as long as the container supports it and your decoder supports the combination. For playback on your PC, you can use x264 + DTS in mkv. But x264 + DTS in mp4 is a huge no-no since mp4 doesn't support AC3 or DTS.
No worries about your questions, we were all new at one point or another. I was, and still am to an extent.
EuropeanMan
25th January 2008, 04:26
^ will report back on encoding results in a few hours...let me leave work now :) and go home...and THANK YOU so much for everything.
last little bit...i checked OFF l4x4x4, and all my 8x8x8s were checked...
Sagekilla
25th January 2008, 04:28
^ will report back on encoding results in a few hours...let me leave work now :) and go home...and THANK YOU so much for everything.
last little bit...i checked OFF l4x4x4, and all my 8x8x8s were checked...
p8x8, b8x8, i8x8, and i4x4 should be enabled whenever possible. It's only p4x4 that tends to be a bit iffy since it usually doesn't help a lot.
EuropeanMan
25th January 2008, 07:09
It's a SUCCESS!! woohoo!
here is .mkv sample (no audio) please let me know what you think :)
http://maxupload.com/9CC9737E
Dark Shikari
25th January 2008, 07:23
Your settings:
x264 - core 57 svn-699C - H.264/MPEG-4 AVC codec - Copyleft 2005 - http://www.videolan.org/x264.html - options: cabac=1 ref=16 deblock=1:-2:-1 analyse=0x3:0x112 me=umh fpel_cmp=sad subme=7 me-prepass=0 brdo=1 mixed_ref=1 me_range=16 chroma_me=1 trellis=1 8x8dct=1 cqm=0 deadzone=21,11 chroma_qp_offset=0 threads=3 nr=0 decimate=0 mbaff=0 bframes=16 b_pyramid=1 b_adapt=1 b_bias=0 direct=3 wpredb=1 bime=1 keyint=250 keyint_min=25 scenecut=40(pre) rc=2pass bitrate=3500 ratetol=1.0
rceq='blurCplx^(1-qComp)' qcomp=0.60 qpmin=10 qpmax=51 qpstep=4 cplxblur=20.0 qblur=0.5 ip_ratio=1.40 pb_ratio=1.30 aq=1:1.0:15.0
Going by the quantizer distribution, its clear that you aren't using the new AQ (which you should be!) You can download the new AQ build here (http://files.x264.nl/AQ/x264.721.dark.aq.0.47.exe).
Your other settings seem great though, and the result looks quite good. It could definitely benefit from AQ though :p
EuropeanMan
25th January 2008, 07:24
but sir i did download it...and i ran the exe file...but nothing happened, and i figured it was auto everything... :(
and honestly, i don't even know what AQ stands for or what it does... :( i'm an xVid encoder...but this was my first try in x264...
Dark Shikari
25th January 2008, 07:25
but sir i did download it...and i ran the exe file...but nothing happened, and i figured it was auto everything... :(x264 is a commandline program, not an installer!
If you're using MeGUI, you'll need to take the executable and overwrite MeGUI's internal copy of x264.exe.
EuropeanMan
25th January 2008, 07:27
ahhh ok...brb with the results :)
edit: replaced the file...now i guess i'll try to re-encode and bring back results whenever it finishes :)
PS, thanks for explaining to a n00b like me!!! much appreciated...
Dark Shikari
25th January 2008, 07:28
but sir i did download it...and i ran the exe file...but nothing happened, and i figured it was auto everything... :(
and honestly, i don't even know what AQ stands for or what it does... :( i'm an xVid encoder...but this was my first try in x264...Xvid had AQ too ;)
x264 has better AQ though, and more versatile also (since H.264 allows much more quantizer variation than MPEG-4 ASP does).
EuropeanMan
25th January 2008, 07:35
I'm guessing G-SPOT can NOT analyse this mkv file...will need to find another software that can give a complete analysis of the output...
Now, will start this small encode...see u in about 45 min or less...
Devilman1
25th January 2008, 09:45
You can use avinaptic to analyse your work
EuropeanMan
25th January 2008, 11:48
@ dark shikari...sorry, fell asleep waiting for the encode to finish...
http://maxupload.com/B3F429CA
2.47am here now...going back to bed...please let me know what you think... and THANKS!!
@devil...will check it out when i wake up...TY
vBulletin® v3.8.5, Copyright ©2000-2012, Jelsoft Enterprises Ltd.