<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<p style="margin-bottom: 0cm; line-height: 100%">My <b>real </b>application
records
live video and uses x264enc to encode it. The compression is
'a bit too aggressive' for my liking.</p>
<p style="margin-bottom: 0cm; line-height: 100%">I have written a
program to convert a short video using x264enc to encode it so
that I
can compare the result using different levels of compression –
(both video quality and file size).</p>
<p style="margin-bottom: 0cm; line-height: 100%">I have read
elsewhere that “The range of the quantizer scale is 0-51: where 0
is lossless, 23 is default, and 51 is worst possible. A lower
value
is a higher quality and a subjectively sane range is 18-28.
Consider
18 to be visually lossless or nearly so” and that “increasing
the CRF value +6 is roughly half the bitrate while -6 is roughly
twice the bitrate ”.</p>
<p style="margin-bottom: 0cm; line-height: 100%">I notice from
gst-inspect that the x264enc plugin has a property “quantizer”
(Constant quantizer or quality to apply … Unsigned integer. Range:
1-50 Default:21)</p>
<p style="margin-bottom: 0cm; line-height: 100%">I converted a 4
minute video using the default settings and the output file size
was
31.4 MiB.</p>
<p style="margin-bottom: 0cm; line-height: 100%">I then changed the
value of the quantizer using this line</p>
<p style="margin-left: 1.25cm; margin-bottom: 0cm; line-height:
100%">
g_object_set (G_OBJECT (videnc), "quantizer", 18, NULL);</p>
<p style="margin-bottom: 0cm; line-height: 100%">and ran the program
again. This time the file size was 31.4 MiB – so no change. I
would have expected the file to be somewhat larger.</p>
<p style="margin-bottom: 0cm; line-height: 100%">So, </p>
<ul>
<li>
<p style="margin-bottom: 0cm; line-height: 100%">did I not
actually change the property (I did not see any indication
that the line had failed)</p>
</li>
<li>
<p style="margin-bottom: 0cm; line-height: 100%">should I have
changed something else (as well)</p>
</li>
<li>
<p style="margin-bottom: 0cm; line-height: 100%">should I have
done it differently</p>
</li>
<li>
<p style="margin-bottom: 0cm; line-height: 100%">does x264enc
ignore that property</p>
</li>
</ul>
<p style="margin-bottom: 0cm; line-height: 100%"><br>
</p>
<title></title>
<meta name="generator" content="LibreOffice 5.0.2.2 (Windows)">
<style type="text/css">
@page { margin: 2cm }
p { margin-bottom: 0.25cm; line-height: 120% }
</style>
<div class="moz-signature"><br>
</div>
</body>
</html>