项目需要在docker容器中使用GStreamer去播放wav格式的文件,但是在此遇到无法播放的问题。
实际上在本地环境中是可以正常播放的,由此猜测应该是docker容器内的环境不完善。
解决方法:在docker容器内安装以下文件(ubuntu)
```
sudo apt-get install libgstreamer1.0-0 gstreamer1.0-plugins-base gstreamer1.0-plugins-good gstreamer1.0-plugins-bad gstreamer1.0-plugins-ugly gstreamer1.0-libav gstreamer1.0-doc gstreamer1.0-tools gstreamer1.0-x gstreamer1.0-alsa gstreamer1.0-gl gstreamer1.0-gtk3 gstreamer1.0-qt5 gstreamer1.0-pulseaudio
```
其他操作系统请参考https://gstreamer.freedesktop.org/documentation/installing/index.html?gi-language=c
网友评论