[英]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.