Profile high444 for libx264

For the developers that use FFmpeg in their software.
Post Reply
Posts: 3
Joined: Mon Feb 27, 2012 2:52 pm

Profile high444 for libx264

Post by Vicul »

Hi all,

is it possible to change libx264 default profile (profile High, level 3.0) to high444.

Tried to use the option '-profile':

Code: Select all

ffmpeg .... -vcodec libx264 -b:v 200000 -s 640x480  -profile high444 -flv "rtmp:// ..... 
but it was not work there, ffmpeg always selected 'profile High'.

Any ideas

Posts: 51
Joined: Thu May 12, 2011 5:19 pm

Re: Profile high444 for libx264

Post by navilor »

Vicul wrote:is it possible to change libx264 default profile (profile High, level 3.0) to high444.
Yes, I use the following in a script that I wrote:

Code: Select all

ffmpeg.exe -i inputfile.ext -vsync 1 -vcodec libx264 -threads 0 -b:v bitrate -acodec libfaac -ab audiobitrate -ac 2 -ar 44100 -async 1 -preset veryslow -tune film -profile:v high444 -y outputfile.ext
Options for your encoding preset are:

Code: Select all

-preset ultrafast, superfast, veryfast, faster, fast, medium, slow, slower, veryslow, placebo
For tuning to your type of input:

Code: Select all

-tune film, animation, grain, stillimage, psnr, ssim, fastdecode, zerolatency
Options for your encoding profile:

Code: Select all

-profile:v baseline, main, high, high10, high422, high444
If you are doing animation you might want to look here: ... evision=27

This is the noise filter that he uses:

Code: Select all

I found that adding a mild amount of denoise, per the article above, helps when converting animation. This won't have major impact on high levels of noise found on content like older animation that was on film but does help a bit even on newer content.

Don't take my word for it because you might not like the results with your content. Do multiple encodes using film and animation with noise on and off using the encoding parameters of your choice. Pick the same frame from each encode and compare them side by side.

On a side note your bitrate may be off. I use a bit per pixel multiplier:

Code: Select all

Width * Height * FPS * (0.067 ~ 0.150) == bits per second
You may be encoding at a lower bitrate than you should. Think about adjusting the width and height of the outbound video and the quality will be higher at the same bitrate.

Using your numbers without access to your FPS:

640 x 480 x 23.976 x 0.0271538900011122 = 200000
640 x 480 x 29.970 x 0.0217231120008898 = 200000

This should be minimum quality for things like talking heads with no movement:
640 x 480 x 23.976 x 0.067 = 493483.6224
640 x 480 x 29.970 x 0.067 = 616854.528

This is for higher action like sports or action:
640 x 480 x 23.976 x 0.150 = 1104814.08
640 x 480 x 29.970 x 0.150 = 1381017.6

A few articles to look at: ... ng_content

This is for the URL in the link above but is somewhat outdated: ... -rate.html

This is an updated article of the previous link that states the the bare minimum should be a bit per pixel density of 0.100 all the way up to 0.200. YMMV: ... es%29.html

Again, your bit per pixel density appears to be far too low. Consider increasing your bitrate or lowering the resolution of the video. You can adjust the output frame rate but that may introduce judder.

Post Reply