【已解决】 GStreamer找不到编码器

问题:GStreamer 在加载某些插件时失败

bash 复制代码
xxx@ubuntu:/usr/lib/aarch64-linux-gnu/gstreamer-1.0$ gst-inspect-1.0 | grep h264  

(gst-plugin-scanner:936609): GStreamer-WARNING **: : Failed to load plugin '/usr/lib/aarch64-linux-gnu/gstreamer-1.0/libgstnvarguscamerasrc.so': libnvargus_socketclient.so: cannot open shared object file: No such file or directory

(gst-plugin-scanner:936609): GStreamer-WARNING **: : Failed to load plugin '/usr/lib/aarch64-linux-gnu/gstreamer-1.0/libgstnvvidconv.so': libnvbufsurftransform.so.1.0.0: cannot open shared object file: No such file or directory

(gst-plugin-scanner:936609): GStreamer-WARNING **: : Failed to load plugin '/usr/lib/aarch64-linux-gnu/gstreamer-1.0/libgstnvcompositor.so': libnvbufsurftransform.so.1.0.0: cannot open shared object file: No such file or directory

(gst-plugin-scanner:936609): GStreamer-WARNING **: : Failed to load plugin '/usr/lib/aarch64-linux-gnu/gstreamer-1.0/libgstnvjpeg.so': libnvjpeg.so: cannot open shared object file: No such file or directory

(gst-plugin-scanner:936609): GStreamer-WARNING **: : Failed to load plugin '/usr/lib/aarch64-linux-gnu/gstreamer-1.0/libgstnvivafilter.so': libnvbufsurftransform.so.1.0.0: cannot open shared object file: No such file or directory

(gst-plugin-scanner:936609): GStreamer-WARNING **: : Failed to load plugin '/usr/lib/aarch64-linux-gnu/gstreamer-1.0/libgstnvvideo4linux2.so': libnvbufsurftransform.so.1.0.0: cannot open shared object file: No such file or directory

解决:

这个错误信息表明 GStreamer 在加载某些插件时失败,具体是因为在静态线程局部存储(TLS)块中无法分配内存。以下是一些可能的解决方案:

检查系统资源:确保你的系统有足够的内存和资源。如果系统资源紧张,可以尝试释放一些内存或重启计算机。

1.更新软件包:

确保你的操作系统及所有相关的软件包都是最新版本。你可以通过以下命令更新 Debian/Ubuntu 系统中的软件包:

bash 复制代码
sudo apt update
sudo apt upgrade

2.重新安装 GStreamer 和相关插件:

可能某些库文件损坏或者不兼容,你可以尝试重新安装 GStreamer 和它的插件。

bash 复制代码
sudo apt remove --purge gstreamer*
sudo apt install gstreamer1.0-plugins-base gstreamer1.0-plugins-good gstreamer1.0-plugins-bad gstreamer1.0-plugins-ugly

3.设置环境变量:尝试增加 LD_PRELOAD 环境变量来使用特定的库,例如:

bash 复制代码
export LD_PRELOAD=/usr/lib/aarch64-linux-gnu/libgomp.so.1

然后再运行 GStreamer 应用。

4.检查 TLS 配置:在某些情况下,如果使用的是特定编译选项或链接到不同的 C 库,可能会导致 TLS 问题。请确保编译时没有与线程相关的不兼容选项。

相关推荐
穷人小水滴3 小时前
在 windows 运行 flatpak 应用 (WSL)
linux·windows·ubuntu
mit6.8244 小时前
ubuntu远程桌面很卡怎么解决?
linux·ubuntu·php
morliz子轩16 小时前
基于WSL搭建Ubuntu 22.04.x LTS开发环境
linux·运维·ubuntu
路多辛19 小时前
Debian新一代的APT软件源配置文件格式DEB822详解
linux·运维·ubuntu·debian
Direction_Wind1 天前
Flinksql bug: Heartbeat of TaskManager with id container_XXX timed out.
大数据·flink·bug
Web极客码1 天前
在Ubuntu 22.04上安装远程桌面服务
linux·运维·ubuntu
Danileaf_Guo2 天前
Ubuntu 18.04快速配置WireGuard互联
linux·运维·服务器·ubuntu
柳鲲鹏2 天前
Ubuntu下载、安装、编译指定版本python
运维·服务器·ubuntu
Tearstornbyrain2 天前
在Ubuntu24.04中使用ssh连接本地git仓库到github远程仓库
linux·git·ubuntu·ssh·github
skywalk81633 天前
Ubuntu24.04桌面版安装wps
linux·ubuntu·wps