如何修复`WARNING:error pipeline:no element“mad”`

2024-10-02 04:25:15 发布

您现在位置:Python中文网/ 问答频道 /正文

我正在运行gstreamer命令,用以下命令从终端播放mp3:

gst-launch-1.0-v filesrc location=/home/user/songs/歌曲.mp3! 疯了!音频转换!音频重采样!自动音频接收器

我收到下面的错误,mp3没有播放

警告:错误的管道:没有元素“mad”

我已经用下面的命令安装了gstreamer插件:

sudo apt get install gstreamer1.0-plugins-good-gstreamer1.0-plugins-bad gstreamer1.0-plugins-ducky gstreamer1.0-libav

它们已成功安装,但错误仍然存在。在

我还检查了mad插件是否已经被黑名单使用 gst-inspect-1.0及其未列入黑名单。在

我已清除~/.cache/gstreamer-1.0/registry.*.bin.

下面的命令在ubuntu18.04中失败

gst-launch-1.0-v filesrc location=/home/user/songs/歌曲.mp3! 疯了!音频转换!音频重采样!自动音频接收器

下面的命令有效,但我想使用“mad:而不是”decodebin“:

gst-launch-1.0-v filesrc location=/home/user/songs/歌曲.mp3! 解码箱!音频转换!音频重采样!自动音频接收器


Tags: 命令home错误location音频launch歌曲mp3
1条回答
网友
1楼 · 发布于 2024-10-02 04:25:15

从GStreamer的1.12 Changelog中删除插件:

The mad mp1/mp2/mp3 decoder plugin was removed from gst-plugins-ugly, as libmad is GPL licensed, has been unmaintained for a very long time, and there are better alternatives available. Use the mpg123audiodec element from the mpg123 plugin in gst-plugins-ugly instead, or avdec_mp3 from the gst-libav module which wraps the ffmpeg library. We expect that we will be able to move mp3 decoding to gst-plugins-good in the next cycle seeing that most patents around mp3 have expired recently or are about to expire.

相关问题 更多 >

    热门问题