[gstreamer-bugs] [Bug 621663] x264enc: support changing bitrate property on the fly
GStreamer (bugzilla.gnome.org)
bugzilla at gnome.org
Thu Nov 25 00:11:09 PST 2010
https://bugzilla.gnome.org/show_bug.cgi?id=621663
GStreamer | gst-plugins-ugly | git
--- Comment #17 from Ian Mitchell <mitch_1977muk at yahoo.co.uk> 2010-11-25 08:11:04 UTC ---
Created an attachment (id=175221)
--> (https://bugzilla.gnome.org/attachment.cgi?id=175221)
Video encoded at an average of 250k
The constant bitrate stream.
----------------------------
The arguments are:
--threads 1 --rc-lookahead 0 --no-psy --bitrate 250 --vbv-maxrate 250
--vbv-bufsize 250 --psnr --input-res 352x288 -b 0 --no-scenecut --no-progress
-i 25 -I 25 -o video1 /devel/statmux/rawvid/quadforeman_cif
The average stream.
-------------------
Once each frame is encoded(from x264_encoder_frame_end in encoder.c) this is
called:
if( (frameCount % 50) == 0 )
{
int newBitrate;
if( test_args[0].bitrate == 350)
{
newBitrate = 150;
}
else
{
newBitrate = 350;
}
for( i=0 ; i < NO_ENCODERS ; i++ )
{
set_bitrate( i, newBitrate );
}
}
The workings of the set_bitrate function are:
x264_encoder_parameters( test_args[encoderIndex].handle , ¶m );
param.rc.i_bitrate = bitrate;
param.rc.i_vbv_max_bitrate = bitrate;
param.rc.i_vbv_buffer_size = bitrate; /* the size = bitrate x delay, say 1
second delay at the moment so bitrate = buffer size */
if( (ret = x264_encoder_reconfig( test_args[encoderIndex].handle, ¶m))
!= 0 )
{
--
Configure bugmail: https://bugzilla.gnome.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.
More information about the Gstreamer-bugs
mailing list