recorder: Port to new gstreamer vp8enc api
The speed and quality properties have been removed in favor of properties closer to the upstream library. Removing the properies from the pipeline would result into a huge slowdown so we have to map the old values to the new ones. According to the source code of the old vp8enc element quality maps to (int)(63 - quality * 6.2) for min_quantizer and max_quantizer, while speed maps to cpu-used = speed == 0 ? 0 : (speed - 1). So set min_quantizer and min_quantizer to 13, and cpu-used to 5 based on the above formulas. https://bugzilla.gnome.org/show_bug.cgi?id=684206
This commit is contained in:
parent
633bbd8a9e
commit
e71c016477
@ -132,7 +132,7 @@ value here is from the GsmPresenceStatus enumeration.</_summary>
|
||||
take care of its own output - this might be used to send the output
|
||||
to an icecast server via shout2send or similar. When unset or set
|
||||
to an empty value, the default pipeline will be used. This is currently
|
||||
'vp8enc quality=8 speed=6 threads=%T ! queue ! webmmux'
|
||||
'vp8enc min_quantizer=13 max_quantizer=13 cpu-used=5 deadline=1000000 threads=%T ! queue ! webmmux'
|
||||
and records to WEBM using the VP8 codec. %T is used as a placeholder
|
||||
for a guess at the optimal thread count on the system.
|
||||
</_description>
|
||||
|
@ -143,7 +143,7 @@ G_DEFINE_TYPE(ShellRecorder, shell_recorder, G_TYPE_OBJECT);
|
||||
* (Theora does have some support for frames at non-uniform times, but
|
||||
* things seem to break down if there are large gaps.)
|
||||
*/
|
||||
#define DEFAULT_PIPELINE "vp8enc quality=8 speed=6 threads=%T ! queue ! webmmux"
|
||||
#define DEFAULT_PIPELINE "vp8enc min_quantizer=13 max_quantizer=13 cpu-used=5 deadline=1000000 threads=%T ! queue ! webmmux"
|
||||
|
||||
/* If we can find the amount of memory on the machine, we use half
|
||||
* of that for memory_target, otherwise, we use this value, in kB.
|
||||
@ -1598,7 +1598,7 @@ shell_recorder_set_filename (ShellRecorder *recorder,
|
||||
* might be used to send the output to an icecast server
|
||||
* via shout2send or similar.
|
||||
*
|
||||
* The default value is 'vp8enc quality=8 speed=6 threads=%T ! queue ! webmmux'
|
||||
* The default value is 'vp8enc min_quantizer=13 max_quantizer=13 cpu-used=5 deadline=1000000 threads=%T ! queue ! webmmux'
|
||||
*/
|
||||
void
|
||||
shell_recorder_set_pipeline (ShellRecorder *recorder,
|
||||
|
Loading…
Reference in New Issue
Block a user