GStreamer hlssink 管道终止

发布于 2025-01-12 10:08:31 字数 692 浏览 2 评论 0原文

使用以下管道播放本地文件时:

gst-launch-1.0 filesrc location=/tmp/test.mp4 ! qtdemux ! queue ! h264parse ! mpegtsmux ! hlssink

我得到以下输出:

streamer_1  | Setting pipeline to PAUSED ...
streamer_1  | Pipeline is PREROLLING ...
streamer_1  | Pipeline is PREROLLED ...
streamer_1  | Setting pipeline to PLAYING ...
streamer_1  | New clock: GstSystemClock
streamer_1  | Got EOS from element "pipeline0".
streamer_1  | Execution ended after 0:00:22.647824881
streamer_1  | Setting pipeline to NULL ...
streamer_1  | Freeing pipeline .

该管道的工作原理是我可以在浏览器中看到内容的输出,但它会在 22 秒后终止。我的 test.mp4 文件是一个 15 分钟的流。

有人可以帮助我理解为什么它会终止以及我将如何播放完整的 15 分钟文件吗?

When playing back a local file using the following pipline:

gst-launch-1.0 filesrc location=/tmp/test.mp4 ! qtdemux ! queue ! h264parse ! mpegtsmux ! hlssink

I get the following output:

streamer_1  | Setting pipeline to PAUSED ...
streamer_1  | Pipeline is PREROLLING ...
streamer_1  | Pipeline is PREROLLED ...
streamer_1  | Setting pipeline to PLAYING ...
streamer_1  | New clock: GstSystemClock
streamer_1  | Got EOS from element "pipeline0".
streamer_1  | Execution ended after 0:00:22.647824881
streamer_1  | Setting pipeline to NULL ...
streamer_1  | Freeing pipeline .

This pipeline works in the sense that I can see the output of the content in a browser but it terminates after 22 seconds. My test.mp4 file is a 15 minute stream.

Can someone help me to understand why it terminates when it does and how I would play the full 15 minute file?

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

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

发布评论

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

评论(1

无风消散 2025-01-19 10:08:31

我终于明白了这一点。如果您引入clocksync步骤,那么它将以预期的速率发出帧:

gst-launch-1.0 filesrc location=/tmp/test.mp4 ! qtdemux ! queue ! h264parse ! mpegtsmux ! clocksync ! hlssink

I finally figured this out. If you introduce a clocksync step then it will emit frames at the expected rate:

gst-launch-1.0 filesrc location=/tmp/test.mp4 ! qtdemux ! queue ! h264parse ! mpegtsmux ! clocksync ! hlssink
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文