{
client_format << "video/x-raw,format=" << config->config.video.frame.format;
client_format << ",width=" << config->config.video.frame.width << ",height=" << config->config.video.frame.height << ",framerate=" << config->config.video.fps << "/1";
- if (strstr(config->config.video.frame.format, "I420")) {
- client_format << " ! vp8enc";
- } else {
+ if (strstr(config->config.video.frame.format, "I420") == nullptr) {
// Note: VP8 only supports I420 format
- client_format << " ! videoconvert ! video/x-raw,format=I420 ! vp8enc";
+ client_format << " ! videoconvert ! video/x-raw,format=I420";
}
+ client_format << " ! vp8enc end-usage=cbr cpu-used=4 threads=2 deadline=2 target-bitrate=256000 undershoot=95 keyframe-max-dist=999999 max-quantizer=56 min-quantizer=4 ! queue";
- server_format << "vp8dec ! videoconvert";
+ server_format << "vp8dec ! queue ! videoconvert";
if (config->config.video.frame.width != config->config.video.frame.convert_width || config->config.video.frame.height != config->config.video.frame.convert_height) {
server_format << " ! videoscale ";
}
server_format << " ! tensor_transform mode=" << config->config.video.frame.transform_mode;
server_format << " option=" << config->config.video.frame.transform_option;
}
+ server_format << " ! queue leaky=2 max-size-buffers=1";
}
int Peer::ConfigureInput(const beyond_config *options)
return -EFAULT;
}
- desc->request = g_strdup_printf("appsrc name=" SRCX_NAME " ! %s ! queue leaky=2 max-size-buffers=1 ! %s", infoString, postPipeline);
+ desc->request = g_strdup_printf("appsrc name=" SRCX_NAME " ! queue leaky=2 max-size-buffers=1 ! %s ! %s", infoString, postPipeline);
g_free(postPipeline);
postPipeline = nullptr;
free(infoString);