我有 ubuntu 16.04,我想用 gstreamer 检查视频文件。我安装了以下 gstreamer 包:
gir1.2-gstreamer-1.0/xenial-updates,now 1.8.3-1~ubuntu0.1 amd64 [installed]
gstreamer1.0-alsa/xenial-updates,xenial-security,now 1.8.3-1ubuntu0.2 amd64 [installed]
gstreamer1.0-clutter-3.0/xenial,now 3.0.18-1 amd64 [installed]
gstreamer1.0-doc/xenial-updates,xenial-updates,now 1.8.3-1~ubuntu0.1 all [installed]
gstreamer1.0-fluendo-mp3/xenial,now 0.10.32.debian-1 amd64 [installed]
gstreamer1.0-libav/xenial-updates,now 1.8.3-1ubuntu0.2 amd64 [installed]
gstreamer1.0-libav-dbg/xenial-updates,now 1.8.3-1ubuntu0.2 amd64 [installed]
gstreamer1.0-plugins-bad/xenial-updates,now 1.8.3-1ubuntu0.2 amd64 [installed]
gstreamer1.0-plugins-bad-dbg/xenial-updates,now 1.8.3-1ubuntu0.2 amd64 [installed]
gstreamer1.0-plugins-bad-doc/xenial-updates,xenial-updates,now 1.8.3-1ubuntu0.2 all [installed]
gstreamer1.0-plugins-bad-faad/xenial-updates,now 1.8.3-1ubuntu0.2 amd64 [installed]
gstreamer1.0-plugins-bad-videoparsers/xenial-updates,now 1.8.3-1ubuntu0.2 amd64 [installed]
gstreamer1.0-plugins-base/xenial-updates,xenial-security,now 1.8.3-1ubuntu0.2 amd64 [installed]
gstreamer1.0-plugins-base-apps/xenial-updates,xenial-security,now 1.8.3-1ubuntu0.2 amd64 [installed]
gstreamer1.0-plugins-base-dbg/xenial-updates,xenial-security,now 1.8.3-1ubuntu0.2 amd64 [installed]
gstreamer1.0-plugins-base-doc/xenial-updates,xenial-updates,xenial-security,xenial-security,now 1.8.3-1ubuntu0.2 all [installed]
gstreamer1.0-plugins-good/xenial-updates,xenial-security,now 1.8.3-1ubuntu0.4 amd64 [installed]
gstreamer1.0-plugins-good-dbg/xenial-updates,xenial-security,now 1.8.3-1ubuntu0.4 amd64 [installed]
gstreamer1.0-plugins-good-doc/xenial-updates,xenial-updates,xenial-security,xenial-security,now 1.8.3-1ubuntu0.4 all [installed]
gstreamer1.0-plugins-ugly/xenial-updates,now 1.8.3-1ubuntu0.1 amd64 [installed]
gstreamer1.0-plugins-ugly-amr/xenial-updates,now 1.8.3-1ubuntu0.1 amd64 [installed]
gstreamer1.0-plugins-ugly-dbg/xenial-updates,now 1.8.3-1ubuntu0.1 amd64 [installed]
gstreamer1.0-plugins-ugly-doc/xenial-updates,xenial-updates,now 1.8.3-1ubuntu0.1 all [installed]
gstreamer1.0-pulseaudio/xenial-updates,xenial-security,now 1.8.3-1ubuntu0.4 amd64 [installed]
gstreamer1.0-tools/xenial-updates,now 1.8.3-1~ubuntu0.1 amd64 [installed]
gstreamer1.0-x/xenial-updates,xenial-security,now 1.8.3-1ubuntu0.2 amd64 [installed]
libgstreamer-plugins-bad1.0-0/xenial-updates,now 1.8.3-1ubuntu0.2 amd64 [installed,automatic]
libgstreamer-plugins-base1.0-0/xenial-updates,xenial-security,now 1.8.3-1ubuntu0.2 amd64 [installed]
libgstreamer-plugins-base1.0-dev/xenial-updates,xenial-security,now 1.8.3-1ubuntu0.2 amd64 [installed,automatic]
libgstreamer-plugins-good1.0-0/xenial-updates,xenial-security,now 1.8.3-1ubuntu0.4 amd64 [installed]
libgstreamer1.0-0/xenial-updates,now 1.8.3-1~ubuntu0.1 amd64 [installed]
libgstreamer1.0-dev/xenial-updates,now 1.8.3-1~ubuntu0.1 amd64 [installed,automatic]
我想检查 H264 格式的 .ts 视频文件。
我下达命令:
gst-launch-1.0 -v uridecodebin uri=file:///myvideofile.ts ! videoconvert ! identity silent=false ! fakesink
我收到错误信息:
Setting pipeline to PAUSED ...
Pipeline is PREROLLING ...
/GstPipeline:pipeline0/GstURIDecodeBin:uridecodebin0: source = "\(GstFileSrc\)\ source"
/GstPipeline:pipeline0/GstURIDecodeBin:uridecodebin0/GstDecodeBin:decodebin0/GstTypeFindElement:typefind.GstPad:src: caps = video/mpegts, systemstream=(boolean)true, packetsize=(int)188
Missing element: MPEG-2 Transport Stream demuxer
WARNING: from element /GstPipeline:pipeline0/GstURIDecodeBin:uridecodebin0: No decoder available for type 'video/mpegts, systemstream=(boolean)true, packetsize=(int)188'.
Additional debug info:
gsturidecodebin.c(931): unknown_type_cb (): /GstPipeline:pipeline0/GstURIDecodeBin:uridecodebin0
ERROR: from element /GstPipeline:pipeline0/GstURIDecodeBin:uridecodebin0: Your GStreamer installation is missing a plug-in.
Additional debug info:
gsturidecodebin.c(998): no_more_pads_full (): /GstPipeline:pipeline0/GstURIDecodeBin:uridecodebin0:
no suitable plugins found:
gstdecodebin2.c(4600): gst_decode_bin_expose (): /GstPipeline:pipeline0/GstURIDecodeBin:uridecodebin0/GstDecodeBin:decodebin0:
no suitable plugins found:
Missing decoder: MPEG-2 Transport Stream (video/mpegts, systemstream=(boolean)true, packetsize=(int)188)
ERROR: pipeline doesn't want to preroll.
Setting pipeline to NULL ...
Freeing pipeline ...
我该如何安装这个缺失的 MPEG-2 解码器?
答案1
我在尝试导入 .ts 视频时收到大致相同的错误消息高波尔我所做的是进入 synaptic 包管理器,搜索所有带有关键字“gstreamer”的包,然后安装:
- gstreamer1.0-插件-坏-视频解析器
- gstreamer1.0-插件-坏
- 和 gstreamer1.0-plugins-bad-faad
对我有用