use*_*388 2 encoder decoder gstreamer h.264
我正在尝试创建一个简单的 gstreamer1-0 管道,它对 h264 网络摄像头提要进行编码和解码,希望尽可能使用最基本的元素。我已经(理论上)安装了所有标准的、好的、坏的和丑陋的 gstreamer 库。我使用“理论上”这个词是因为我没有 root 权限,我必须请求 IT 下载/安装我可能需要的每个库,这很痛苦。
我尝试了以下管道,但没有奏效:
gst-launch-1.0 v4l2src ! autovideoconvert ! x264enc bitrate=256 ! decodebin ! autovideosink
Run Code Online (Sandbox Code Playgroud)
我得到以下输出:
Setting pipeline to PAUSED ...
Pipeline is live and does not need PREROLL ...
Setting pipeline to PLAYING ...
New clock: GstSystemClock
Redistribute latency...
Missing element: H.264 decoder
ERROR: from element /GstPipeline:pipeline0/GstDecodeBin:decodebin0: Your GStreamer installation is missing a plug-in.
Additional debug info:
gstdecodebin2.c(3977): gst_decode_bin_expose (): /GstPipeline:pipeline0/GstDecodeBin:decodebin0:
no suitable plugins found
Execution ended after 0:00:01.795803500
Setting pipeline to PAUSED ...
Setting pipeline to READY ...
Setting pipeline to NULL ...
Freeing pipeline ...
Run Code Online (Sandbox Code Playgroud)
因此,根据这一点,我的插件缺少一个块来解码 h264,对吗?
现在我已经阅读了这个论坛,但我不知道如何安装解码器块。如果有人可以向我解释如何做到这一点,以使那个简单的管道运行?解释越详细越好,因为我后来不得不将这个解释转达给 IT 和法语,所以我坚持:这将是一个巨大的痛苦。
泰。
您可能缺少 h264 解码器插件。你可以检查它
gst-inspect-1.0 | grep 264
Run Code Online (Sandbox Code Playgroud)
一般使用的解码器是 avdec_h264
这将列出与 h264 相关的插件。如果您没有任何解码器,则需要安装 gst-libav 软件包。