View Full Version : Suggestion on x264 2 pass encoding
Lele-brz
18th December 2007, 15:27
Hi all,
I'm trying to define a custom profile for my encoding.
It will be used on different kind of sources(sport, movies, cartoon), with different source bitrate. So it should be as flexible as possible (I know it would be better to have a different profile for every single clip...)
(I removed for clarity common parameters: thread, stat, output... )
This is basically a Main Profile with 3 b-frames.
I'm not sure about the really useful parameters and I don't know how much the first pass should be (is that good having bframes there?)
PASS 1
--subme 1 --bframes 3 --analyse none --me umh --ref 1
PASS2
--ref 3 --me umh --bframes 3 --b-pyramid --weightb --b-rdo --bime --analyse p8x8,b8x8,i4x4,p4x4 --subme 6 --trellis 1 --mixed-refs
Thanks for any tips on that
bye
nm
18th December 2007, 17:01
It will be used on different kind of sources(sport, movies, cartoon), with different source bitrate. So it should be as flexible as possible (I know it would be better to have a different profile for every single clip...)
You could consider using CRF instead of 2-pass for more flexibility (appropriate quality level is easier to guess than bitrate).
Concerning the parameters, Dark Shikari has posted a nice table of x264 settings for various levels of encoding quality (and speed): http://forum.doom9.org/showthread.php?p=1072386#post1072386
Dark Shikari
18th December 2007, 17:13
First pass must have the same frametype parameters as the second pass. It should have --b-pyramid if the second pass does, though unlike a difference in B-frames this won't result in a fatal error. UMH on your first pass is pointless; if there's any benefit to gain from an improved first pass, its raising subme to 3 or 4 or so.
And yeah, check my list of settings per the above.
Lele-brz
20th December 2007, 12:17
I tried to remove
--b-pyramid and --mixed-refs for reducing encoding time.
Do you think it's a good way or do I have to expect degrading in quality on different kind of videos?
thanks
audyovydeo
20th December 2007, 12:40
I'm trying to define a custom profile for my encoding.
It will be used on different kind of sources
...
I tried to remove --b-pyramid and --mixed-refs for reducing encoding time.
Do you think it's a good way or do I have to expect degrading in quality on different kind of videos?
Hello.
I went through the same process a few months ago.
I came up with something like 6 "profiles", but now find I'm using 2 of them 99% of the time.
Also I definitely dumped 2-pass for crf.
--mixed-refs won't change much : it's how many --refs you use that makes a difference, speed and bitrate-wise.
Also, you can set bframes at 16 in all your profiles, and let x264 decides how many it actually uses.
I put all my ruminations on the subject on this page :
http://mapage.noos.fr/manamba/x264/manambas_x264_page.html
tell me if you find it useful.
cheers
audyovydeo
Lele-brz
20th December 2007, 13:00
thanks, that looked exactly what I was looking for!
I keep 2 pass because I want to have an average bitrate, since I then progressive download the resulting video through the Internet.
thanks again
bye
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.