Add hardware encoding for direct capture

This commit is contained in:
Gerald Storer 2025-04-01 14:10:14 +08:00
parent ac36d5eee6
commit 24b3903c2e
No known key found for this signature in database
GPG Key ID: 5F418FD212632274
1 changed files with 1 additions and 1 deletions

View File

@ -54,7 +54,7 @@ Image2rtsp::Image2rtsp() : Node("image2rtsp"){
RCLCPP_INFO(this->get_logger(), "pipeline: %s", pipeline.c_str());
}
else {
pipeline = "( " + source + " ! videoconvert ! videoscale ! " + caps_1 + framerate + caps_2 + " ! x264enc tune=zerolatency bitrate=" + bitrate + pipeline_tail;
pipeline = "( " + source + " ! videoconvert ! videoscale ! " + caps_1 + framerate + caps_2 + " ! " + encoder + " bitrate=" + bitrate + pipeline_tail;
rtsp_server_add_url(mountpoint.c_str(), pipeline.c_str(), NULL);
}
RCLCPP_INFO(this->get_logger(), "Stream available at rtsp://%s:%s%s", gst_rtsp_server_get_address(rtsp_server), port.c_str(), mountpoint.c_str());