Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gst-launch和pipeline方式资源占用差异 #65

Open
octocat9lee opened this issue Jan 22, 2025 · 1 comment
Open

gst-launch和pipeline方式资源占用差异 #65

octocat9lee opened this issue Jan 22, 2025 · 1 comment

Comments

@octocat9lee
Copy link

octocat9lee commented Jan 22, 2025

vpvp_rtsp_src_nodevp_rtsp_des_node源码中关于gstreamer的命令进行组合,使用gst-launch进行测试,观察命令行的资源使用情形:
gst-launch-1.0 rtspsrc location=rtsp://192.168.21.231:1684/live/mainstream latency=0 drop-on-latency=true ! application/x-rtp,media=video ! rtph264depay ! h264parse ! nvv4l2decoder ! nvvideoconvert ! nvv4l2h264enc ! h264parse ! rtspclientsink protocols=tcp latency=0 location=rtsp://localhost:7148/live/nvtest
从资源使用来看,CPUGPU的占用都特别的少:

Image
Image

使用vpvp_rtsp_src_node和vp_rtsp_des_node方案进行测试,测试仅包括rtsp拉流、解码、编码和推流流程,观察资源占用:

auto rtsp_src_0
= std::make_shared<vp_nodes::vp_rtsp_src_node>("rtsp_src_0", 0, "rtsp://192.168.21.231:1684/live/mainstream", 1, "nvv4l2decoder ! nvvideoconvert");
auto rtsp_des_0 = std::make_shared<vp_nodes::vp_rtsp_des_node>("rtsp_des_0", 0, 7148, "live/rtsp0");
rtsp_des_0->attach_to({ rtsp_src_0 });
rtsp_src_0->start();

疑问:GPU开始有3%的使用,CPU有一个核心的使用率在20%~40%的使用?为什么使用命令行与源码的差异在资源占用上如此大呢?使用代码方式导致资源占用高的原因是什么呢?

Image
Image

@taoxm
Copy link

taoxm commented Jan 22, 2025 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants