简体   繁体   English

Anaconda Gstreamer Gst 包装缺少“jpegenc”

[英]Anaconda Gstreamer Gst packge lacking “jpegenc”

I have recently been working with gstreamer in python.我最近一直在 python 中使用 gstreamer。 I am working under an anaconda virtual environment.我在 anaconda 虚拟环境下工作。

I have run into an issue where it appears jpegenc is an inaccessible element.我遇到了一个问题,jpegenc 似乎是一个不可访问的元素。
gst_parse_error: no element "jpegenc" (1)

By request, the whole error.根据要求,整个错误。

File "---/gstreamer_test.py", line 15, in <module>
pipeline = Gst.parse_launch("v4l2src ! video/x-raw, framerate=30/1 , width=640,height=480 ! jpegenc ! appsink name=sink")
gi.repository.GLib.Error: gst_parse_error: no element "jpegenc" (1)

Gst inspect confirms that within the anaconda environment jpegenc is not listed. Gst 检查确认在 anaconda 环境中 jpegenc 未列出。 This said if I deactivate the anaconda environment the normal command line gst inspect can find the jepgenc.这表示如果我停用 anaconda 环境,正常命令行 gst 检查可以找到 jepgenc。

Does anyone know a quick fix for jepgenc within anaconda?有谁知道 anaconda 中 jepgenc 的快速修复? Would rather not build from source.宁愿不从源代码构建。

Python Version Python版本

Python 3.8.6 | packaged by conda-forge

Anaconda Version Anaconda版本

conda 4.9.2

Package Versions Package 版本

gst-plugins-base          1.14.5               h0935bb2_2    conda-forge
gst-plugins-good          1.14.5               h08bb679_2    conda-forge
gstreamer                 1.18.3               h3560a44_0    conda-forge

I have found a working solution for the moment.我暂时找到了一个可行的解决方案。 However, it does not extend to all the use cases I wish to cover.但是,它并没有扩展到我希望涵盖的所有用例。 My webcam can natively generate mjpeg which is already encoded as jpeg.我的网络摄像头可以本地生成已经编码为 jpeg 的 mjpeg。 Therefore all you need to do is specify the output type to use from the source as shown below.因此,您需要做的就是从源代码中指定要使用的 output 类型,如下所示。

pipeline = Gst.parse_launch("v4l2src ! image/jpeg,framerate=30/1 , width=640,height=480 ! appsink name=sink")

This said this still does not solve the problem for cameras without native jpeg encoding or for cases where I want to transcode an incoming non jpeg stream.这表示这仍然不能解决没有原生 jpeg 编码的相机的问题,或者我想对传入的非 jpeg stream 进行转码的情况。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 python的gst.LinkError问题的Gstreamer - Gstreamer of python's gst.LinkError problem 带有Python 2.7的GStreamer无法导入GST - GStreamer with Python 2.7 cannot import gst 如何摆脱 Anaconda Spyder 编辑器中缺少的类型? - How do I get rid of type lacking in the Anaconda Spyder editor? 加载自定义gstreamer插件会引发gst.ElementNotFoundError - loading custom gstreamer plugin raises gst.ElementNotFoundError GStreamer-CRITICAL **:gst_element_make_from_uri:断言“ gst_uri_is_valid(uri)”失败 - GStreamer-CRITICAL **: gst_element_make_from_uri: assertion 'gst_uri_is_valid (uri)' failed Gst.init在anaconda下失败,但可用于本机python - Gst.init fails under anaconda, but works with native python 链接元素时,GStreamer错误“声明&#39;GST_IS_ELEMENT(src)&#39;失败” - GStreamer error “assertion 'GST_IS_ELEMENT (src)' failed” when linking elements 如何在Mac OSX上轻松安装gst-python(gstreamer python bind)? - How to install gst-python (gstreamer python bind) on Mac OSX the easy way? 为什么&#39;gst.Element.get_request_pad(self.filter,&#39;filter&#39;)&#39;返回&#39;None&#39;(gstreamer | python) - why 'gst.Element.get_request_pad(self.filter, 'filter')' returns 'None' (gstreamer | python) 如何通过将 gstreamer 与 python 子进程模块或 gst-launch-1.0 命令一起使用来接收字节流? - How to receive byte-stream by using gstreamer with python subprocess module or gst-launch-1.0 command?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM