<div dir="ltr"><div>The quantizer value is only application if pass=4 or 5. I use 5 rather than 4 (I can't remember why but I know there is a good reason for it)<br><br></div>Anyway, if you set pass to 5, quantizer will make a difference.<br></div><div class="gmail_extra"><br><div class="gmail_quote">On 7 December 2015 at 12:39, Ian Davidson <span dir="ltr"><<a href="mailto:id012c3076@blueyonder.co.uk" target="_blank">id012c3076@blueyonder.co.uk</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div bgcolor="#FFFFFF" text="#000000">
<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>
<div><br>
</div>
</div>
<br>_______________________________________________<br>
gstreamer-devel mailing list<br>
<a href="mailto:gstreamer-devel@lists.freedesktop.org">gstreamer-devel@lists.freedesktop.org</a><br>
<a href="http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel" rel="noreferrer" target="_blank">http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel</a><br>
<br></blockquote></div><br></div>