This commit is contained in:
cxh 2025-11-21 15:43:00 +08:00
parent 0fd1a90afb
commit 0db2b1f45c

View File

@ -35,13 +35,14 @@ GstRTSPMediaFactory *RTSPManager::create_media_factory(const Camera &cam)
" ! video/x-raw,format=NV12,width=" + std::to_string(out_width) + " ! video/x-raw,format=NV12,width=" + std::to_string(out_width) +
",height=" + std::to_string(out_height) + ",height=" + std::to_string(out_height) +
",framerate=" + std::to_string(cam.fps) + "/1" ",framerate=" + std::to_string(cam.fps) + "/1"
" ! queue max-size-buffers=1 leaky=downstream" " ! queue max-size-time=100000000"
" ! mpph265enc rc-mode=cbr bps=" + " ! videoconvert"
" ! mpph264enc rc-mode=cbr bps=" +
std::to_string(cam.bitrate) + std::to_string(cam.bitrate) +
" gop=" + std::to_string(cam.fps) + " gop=" + std::to_string(cam.fps) +
" b-frames=0" " profile=high"
" ! h265parse config-interval=1" " ! h264parse"
" ! rtph265pay name=pay0 pt=96 config-interval=1 )"; " ! rtph264pay name=pay0 pt=96 )";
GstRTSPMediaFactory *factory = gst_rtsp_media_factory_new(); GstRTSPMediaFactory *factory = gst_rtsp_media_factory_new();
gst_rtsp_media_factory_set_launch(factory, launch_str.c_str()); gst_rtsp_media_factory_set_launch(factory, launch_str.c_str());