View Full Version : Choice basic setting Present+tune value or many value setting for X264
vfx3love
22nd May 2012, 09:45
Hi all,
I'm newbie use X264 . I had read setting value in wiki and ask some guys know it . But I don't know right setting X264 for good because I was getting a lot of different instructions. Do your can help me know that ?
I want encoding 720p HD to SD Video 720x576; Video bitrate ~ 1,8 Mbps or 2,3 Mbps; speed 1:1 ( My PC : Xeon 3220; Ram:DDR3 4gb; HDD 500Gb )
Ex : One guy say this is the better setting for this :
"x264" --crf 1 --sar 64:45 --profile main --level 3.2 --ref 4 --bframes 5 --deblock -1:-1 --aq-strength 0.8 --vbv-bufsize 1800 --vbv-maxrate 1800 --direct auto --partitions p8x8,b8x8,i8x8,i4x4 --keyint 100 --no-mbtree --no-fast-pskip --no-dct-decimate --b-adapt 2 --subme 8 --trellis 2 --psy-rd 1.0:0.0 --me umh --no-scenecut --output "encode.mkv" "source.avs" 2> "pass2.log"
But other guy say it was just written by a moron. Him setting for this :
x264 --preset slow --tune film --bitrate 1800 --pass 1 -o NUL input.xyz
x264 --preset slow --tune film --bitrate 1800 --pass 2 -o output.mkv input.xyz
What is the right choice ? Can you explain for me . Sorry my english not good
Thank so much for help .
sneaker_ger
22nd May 2012, 12:51
The second one is way better. It uses an average bitrate of 1800 kbit/s, as you requested.
The first is very bad, because it limits the bitrate locally to 1800 kbit/s, which in combination with --crf 1 will result in an encode that has a constant bitrate of 1800 kbit/s. This is bad, because scenes that are easy to encode will get more bitrate than needed and scenes that need more bitrate will not get enough. So some scsenes will look nice, but you will get ugly artifacts in scenes that need more bitrate. You only need constant bitrate if you want host a streaming site, similar to youtube.
(You need to use --sar on the second one, too, if you want to encode anamorphic.)
Bloax
22nd May 2012, 13:12
This couple of settings: "--vbv-bufsize 1800 --vbv-maxrate 1800" look quite strange to me, since why the hell would you use CRF - but at the same time restrict it to 1800 kbps.
Unless you strictly need 1.8-2.1 Mbps, I'd suggest just messing around a bit with the crf value.
Though depending on the source (loads of fast motion isn't healthy for low sizes) you may need to go as far down (up, heh) as --crf 25.xx.
Though that's for a tricky case like aliased FPS gameplay footage.
You may also want to try the internal "--nr" noise reduction, it's pretty good. (I haven't found it destructive (even on 1000 o_O), but what do I know, haha.)
By the way, --no-dct-decimate is a Quality for Size option. (blahblah It increases the video size.)
vfx3love
23rd May 2012, 03:43
Thanks sneaker_ger and Bloax for help. Yes, I want want host a streaming site with CBR bitrate, ~ 1,8-2Mbps (Video+Audio) with the best possible quality. Do your can help me make tut for this ? Because I try second comanline in bat auto file but can't output file.
Selur
23rd May 2012, 06:50
Yes, I want want host a streaming site with CBR bitrate, ~ 1,8-2Mbps (Video+Audio) with the best possible quality.
are you sure you want cbr? normally you aim for an average bitrate instead of a constant bitrate,..
playing a bit with http://handbrake.dynaflashtech.net/cgi-bin/vbv_calculator.cgi might help to shine some light on the effect of vbv restrictions,...
(most people your aim for an average bitrate with vbv restriction)
vfx3love
24th May 2012, 03:42
May be I get think wrong . So, I only want limit bitrate video streaming no feak than 2Mbps . I try vbv calculator link when set :
Frame Rate (fps) :25
Video ABR (kbps):2Mbps
Peak Duration (sec): 1
vbv-maxrate=2Mbps
vbv-bufsize=2Mbps
Results: Allows a peak bitrate of 4000 kbps for 1.00 second(s) with a vbv buffer length of 1.00 second(s).
It mean if I setting like that output video will get feak 4 Mbps when streaming. This right? Many thank for help .
sneaker_ger
24th May 2012, 14:03
I have trouble understanding your post, but to put it simple:
--vbv-maxrate sets the fillrate of the buffer. This should be set to the connection speed of the user (minus a bit safety). So you'd set it to 2000 if your user has a 3 Mbit/s connection for example.
--vbv-bufsize controls the size of the buffer. As you have correctly found out, if --vbv-bufsize == --vbv-maxrate (disregarding units...), then the buffer is 1 second long. This means that the user will have to wait no more than 1 second before playback can start. You might want to set this a bit higher than 1 second, e.g. 3 seconds. (3 x 2000 = 6000)
vfx3love
24th May 2012, 17:30
Thank so much sneaker_ger. I can clear , so easy with your guide.
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.