NVDecoder一次解码多个帧

发布于 2025-02-08 06:26:26 字数 562 浏览 1 评论 0原文

我们正在使用以下GSTREAMER管道来解析RTSP流:

gst-launch-1.0 rtspsrc port-range = 5000-5100 location =“ rtsp:// ..” rtsp:// ..“ latency = 300 is-live = true!队列 ! rtph264depay名称= depayer!视频/x-h264,stream-format =字节流,对齐= au! H264Parse!视频/x-h264,stream-format =字节流,对齐= au! AppSink Name = MySink Sync = true

然后,我们使用NVIDIA视频编解码器SDK解码器来解码所收到的帧。我们尝试使用4种不同的摄像机,其中两个相机能够获得一个流畅的视频。但是,在其余两个中,我们观察到,每25-30帧一次,解码器一次冲洗4帧,从而导致框架下降。

  • 为什么解码器会一次冲洗4帧?
  • 我们可以做些什么来防止这种情况?
  • 我们可以通过修改管道以某种方式维护恒定的FPS吗?

如有必要,我也可以共享解码器代码。提前致谢!

We are using the following gstreamer pipeline to parse rtsp stream:

gst-launch-1.0 rtspsrc port-range=5000-5100 location="rtsp://.." latency=300 is-live=true ! queue ! rtph264depay name=depayer! video/x-h264 , stream-format=byte-stream, alignment=au ! h264parse ! video/x-h264 , stream-format=byte-stream, alignment=au ! appsink name=mysink sync=true

Then we are decoding the recieved frames using Nvidia Video Codec SDK decoder. We tried using 4 different cameras, in two of them we were able to obtain a smooth video. However, in the remaining two we observed that once in every 25-30 frames, decoder flushes 4 frames at once, causing frame drops.

  • Why would the decoder flushes 4 frames at once?
  • Is there anything we can do to prevent that?
  • Can we somehow maintain a constant fps by modifying the pipeline?

I can also share the decoder code if necessary. Thanks in advance!

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

将军与妓 2025-02-15 06:26:26

框架应带有时间戳。您需要将播放与这些同步。解码器可能会立即具有多个图片,具体取决于它们的编码方式。在这方面阅读有关B框架的信息。解码器不负责流畅的播放,这是该应用程序。

Frames should come with timestamps. You need to sync playback to these. A decoder may have multiple pictures at once depending on how they have been coded. Read about b-frames in this regard. A decoder is not responsible for smooth playback, thats up to the application.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文