Log in

View Full Version : Which X264 Profile to choose?


arrirc
22nd March 2008, 04:54
Hello

This is the first time I am trying to convert DVD movies to X.264 (MP4) but I am not yet sure about which X.264 profiles to use out of all the profiles listed by sharktooth and what bit rate should be optimum if I have reconvert the X.264 files back to DVD.

All my sources are general commercial movies (mostly progressive) and non animation. I have tried HQ Fastest, HQ Fast, HQ Slowest and HQ Slow. Now if I am not that worried about the end file size, then as kindly mentioned by Stax, CQ profiles should be used and in that category Sharktooth kindly pointed me to CQ-ASP_Q2_eq(crf) profile.

Now I'm bit confused. :confused:


Could some one tell me what will be the file size difference between two profiles (HQ slowest and CQ-ASP_Q2_eq(crf)) if I use a 2 hr movie as source and about 2000 kbps as average bitrate?

What bit rate should I choose while encoding if I need to convert this file back to DVD of acceptable quality?


Please help.

Thank you.

Dark Shikari
22nd March 2008, 04:59
If you want a specific bitrate, HQ-slow is your best bet because its twopass. Constant quality mode can't guarantee a specific bitrate.

stax76
22nd March 2008, 08:46
What bit rate should I choose while encoding if I need to convert this file back to DVD of acceptable quality?

it depends on complexity and image size

bond
22nd March 2008, 10:27
Now if I am not that worried about the end file size, if filesize doesnt matter use lossless encoding in x264

arrirc
22nd March 2008, 14:59
Thanks everybody....

Well could you please tell me what end file size (approx) should I expect for a 2 Hr normal movie (non animation and as available on commercial movie DVDs) if I use:


HQ Slower
CQ-ASP_Q2_eq(crf)
Loseless

?

Secondly,


Quote:
What bit rate should I choose while encoding if I need to convert this file back to DVD of acceptable quality?
it depends on complexity and image size

I understand, but in my case (and aim as mentioned in the first) what should is the bit rate commonly used?

J_Darnley
22nd March 2008, 15:57
1 - What bitrate are you going to use? The you can calc. it yourself. 2000 kbit/s *7200s = 1716 MiB
2 - What crf value are you going to use? I use 21 (and slow compression) and get files from 443 to 1892 MiB for varying movie lengths (80 to 240 min) or ~750 kbit/s to 1200 kbit/s
3 - Huge, maybe 20 Mbit/s or more.

As for what you should use for bitrate it depends, thats why quality mode exists, also I don't use bitrate mode nor do I really note the bitrate. If you need a target file size, e.g. 1CD, 2CD, DVD5, DVD9 then you should know what bitrate you need to use, you should be able to calculate it.

stax76
22nd March 2008, 17:23
@arrirc

there is many things like complexity not easy to understand for novice users, if you have a source with a lot dark and static scenes you'll need significant less bitrate compared to a movie with a lot colorful action. Constant quality (crf) or compressibility check (recommend to use 50% - 60% quality) takes care of this. If you encode to hard drive, of course you don't want to waste disk space, I recommend to use the 'Constant Quality' profile in StaxRip which is crf 22, the filesize and image quality is comparable to using 2 pass with 50% - 60% quality. I dare to say that HQ Slow with 2 pass at 50% - 60% quality or HQ Slow with constant quality crf at 22 produce big differences in image quality and file size compared to the 'Constant Quality' profile.

arrirc
23rd March 2008, 07:27
@arrirc

there is many things like complexity not easy to understand for novice users, if you have a source with a lot dark and static scenes you'll need significant less bitrate compared to a movie with a lot colorful action. Constant quality (crf) or compressibility check (recommend to use 50% - 60% quality) takes care of this. If you encode to hard drive, of course you don't want to waste disk space, I recommend to use the 'Constant Quality' profile in StaxRip which is crf 22, the filesize and image quality is comparable to using 2 pass with 50% - 60% quality. I dare to say that HQ Slow with 2 pass at 50% - 60% quality or HQ Slow with constant quality crf at 22 produce big differences in image quality and file size compared to the 'Constant Quality' profile.

Thank you very much J_Darnley for clearing the air on file sizes and stax for helping me on the profiles.

Now regarding this quality factor I am not really sure. I hope you can recall about a post in the official StaxRip discussion thread in this matter. As I mentioned I have done a number of encoding in XviD format using AutoGK. In this program if I set the quality to 80% the resultant output file shows a average video 2060 kbps, for the same source when I tried to convert to X264, at the recommended quality setting for StaxRip, that is 55%, the average video bit rate was only about 981 kbps (far less than XviD). Now my common senses tells me that lower the bit rate, lower the quality. Now I can set the quality factor high by choosing a high bit rate, but that gives error of setting the quality factor too high.

Thus, why should I encode in such a low quality factor which gives me very low bit rate, when I would be happy with a higher quality factor even though that will result a larger file size. :confused:

stax76
23rd March 2008, 08:10
50% or crf 22 is really enough, image size should be as high as possible, best don't resize at all but encode anamorphic.

arrirc
26th March 2008, 06:17
Thanks Stax....:)

envagyok
29th August 2008, 19:44
Hy !

I have a problem...
I need convert 720p mkv files to xbox xbmc.
I find a tutorial, but it uses megui, what is wonderful to dvd->mkv encoide, but mkv ->mkv not too.

I find staxrip is a very good program with very good possibilities, but i don't know how can i make own profile to xbox h.264 mkv files.

Here is the megui profile :
12. For the Video Profile, we will configure our own. This is the trick to getting H.264 to play nicely with XBMC. So configure your own video profile with the following settings:

program --pass 2 --bitrate XXXX --stats ".stats" --level 4.1 --keyint 240 --min-keyint 24 --ref 6 --no-fast-pskip --bframes 6 --b-rdo --weightb --nf --subme 7 --trellis 2 --partitions p8x8,b8x8,i4x4 --ratetol 20.0 --me umh --merange 32 --threads auto --thread-input --progress --no-psnr --no-ssim --output "output" "input"

And the website :
http://xbmc.org/wiki/?title=HOW-TO_Encode_H.264_Videos_Compatible_With_XBMC_For_Xbox

Please help me someone transcode this profile from megui to staxrip.

Thanks..

Comatose
29th August 2008, 20:07
How did you get the MKV? Or more like, if you don't know how to transcode, then it's probably a scene rip - and we don't help with that stuff on doom9.

envagyok
29th August 2008, 20:21
The mkv is copy from my cars hd-dvd, because my kid is very agressive with all disc media, and can make crap from dvd about a week.
I transcoded when it was new, but the original is already crap, and the copy what i make to my computer making safe backup don't play the xbmc, what i put my son's room.

Thanks for "help" ....

wyti
29th August 2008, 20:35
My question may be stupid, but why you don't use Megui ?
Make a simple avisynth script with something like this
DirectShowSource("c:\foo\bar.mkv")
and load this script in Megui (as far as a know DirectShowSource don't have any problem with matroska)
with this method you can follow your tutorial.

envagyok
29th August 2008, 21:33
My question may be stupid, but why you don't use Megui ?
Make a simple avisynth script with something like this

and load this script in Megui (as far as a know DirectShowSource don't have any problem with matroska)
with this method you can follow your tutorial.


I tried, but when i load the script to megui, then close with error.
But i don't have matroska installed, maybe that is the problem, i try...

later...

With both mkv splitter i make a probe (haali media splitter, and matroska splitter), but the megui when i open the script close with error.

Maybe vista 64 bit is the problem?
With matroska or haali splitter i can play the video file with media player without any problem...

wyti
29th August 2008, 22:18
try to open your avs script with windows media player (on Windows Xp wmp 11 can read avs files), if you see the input video i don't know where the problem is, if you saw an error, you will know where is your problem

envagyok
29th August 2008, 22:33
I try the avs play with mediaplayer, i see the haali media splitter start working, and then the windows media player stopped, not respond, and closed.
When i try play the file what is linked at avs, then its played troublefree with windows mediaplayer....

my video.avs has the following :
DirectShowSource("C:\video.mkv")

Video.mkv is the sample file. With direct start working, over avs don't

wyti
29th August 2008, 22:35
try to add
SetMemoryMax(256)
at the top of your script (before the directshowsource) if that help not i can't help you more sorry.

envagyok
30th August 2008, 09:23
I try the avs play with mediaplayer, i see the haali media splitter start working, and then the windows media player stopped, not respond, and closed.
When i try play the file what is linked at avs, then its played troublefree with windows mediaplayer....

my video.avs has the following :
DirectShowSource("C:\video.mkv")

Video.mkv is the sample file. With direct start working, over avs don't

I tried uninstall avisynth 2.5.7, and install the latest beta 2.5.8, and then work to me.
I don't know why 2.5.7 hangs...