GStreamer:播放 mpeg2

发布于 2024-12-11 15:17:59 字数 949 浏览 0 评论 0原文

我正在尝试使用 gstreamer 播放本地 mpeg2 TS 文件:

gst-launch  filesrc location=open_season.mpg ! mpeg2dec ! xvimagesink

第一帧显示为大色块,然后停止。关于我在这里做错了什么有什么想法吗? -TS 文件是否需要以与此不同的方式处理?

这是日志:

$ gst-launch  filesrc location=open_season.mpg ! mpeg2dec ! xvimagesink
Setting pipeline to PAUSED ...
Pipeline is PREROLLING ....
WARNING: from element /GstPipeline:pipeline0/GstXvImageSink:xvimagesink0: Internal data flow problem..
Additional debug info:.
gstbasesink.c(3492): gst_base_sink_chain_unlocked (): /GstPipeline:pipeline0/GstXvImageSink:xvimagesink0:
Received buffer without a new-segment. Assuming timestamps start from 0.
Pipeline is PREROLLED ...
Setting pipeline to PLAYING ...
New clock: GstSystemClock
Got EOS from element "pipeline0".
Execution ended after 6866757291 ns.
Setting pipeline to PAUSED ...
Setting pipeline to READY ...
Setting pipeline to NULL ...
Freeing pipeline ..

I'm trying to play a local mpeg2 TS file with gstreamer with this:

gst-launch  filesrc location=open_season.mpg ! mpeg2dec ! xvimagesink

The first frame appears as big blocks of color and then stops. Any thoughts about what I'm doing wrong here? Does a -TS file need to be handled differently than this?

Here's the log:

$ gst-launch  filesrc location=open_season.mpg ! mpeg2dec ! xvimagesink
Setting pipeline to PAUSED ...
Pipeline is PREROLLING ....
WARNING: from element /GstPipeline:pipeline0/GstXvImageSink:xvimagesink0: Internal data flow problem..
Additional debug info:.
gstbasesink.c(3492): gst_base_sink_chain_unlocked (): /GstPipeline:pipeline0/GstXvImageSink:xvimagesink0:
Received buffer without a new-segment. Assuming timestamps start from 0.
Pipeline is PREROLLED ...
Setting pipeline to PLAYING ...
New clock: GstSystemClock
Got EOS from element "pipeline0".
Execution ended after 6866757291 ns.
Setting pipeline to PAUSED ...
Setting pipeline to READY ...
Setting pipeline to NULL ...
Freeing pipeline ..

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

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

发布评论

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

评论(1

淡水深流 2024-12-18 15:17:59

我认为首先您应该首先尝试在 playbin2 的帮助下播放该文件。如果您能够播放它,那么您应该使用decodebin2,调试其输出并相应地构建您的管道。

playbin2 的语法如下:

gst-launch playbin2 uri = file:///home/user1031040/Desktop/file.mpg

-decodebin2 的语法如下:-

gst-launch filesrc location = file.mpg ! decodebin2 ! autovideosink

I think first you should first try to play the file with the help of playbin2. If you are able to play it then u should use decodebin2 ,debug its output and construct your pipeline accordingly.

The syntax for playbin2 is as follows :-

gst-launch playbin2 uri = file:///home/user1031040/Desktop/file.mpg

The syntax for decodebin2 is as follows:-

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