挖个坟
我换用 arch 以后,发现 decodebin 找不到WMV的解码器,安装了 gst-libav 以后,运行
gst-launch-1.0 -v filesrc
location=/home/lizhenbo/winp/player_demo/wa2_mv001.wmv ! decodebin !
videoconvert ! autovideosink 可以正常播放测试视频了
不过很诡异的是,在配置好 gstreamer 之前,我运行我的
player_demo[1],程序可以正常退出(提示播放失败)。但安装好后,wine却会有概率地崩溃。
[1]: https://bugs.winehq.org/show_bug.cgi?id=40674
在 2016年6月21日 上午9:29,Zhenbo Li <litimetal@xxxxxxxxx> 写道:
Hi
说一下背景,我的 Fedora 23 上的 wine,无论是自行编译还是安装官方的RPM,都无法播放WMV文件。在编译时制定
PKG_CONFIG_PATH=/usr/lib/pkgconfig
可以确保找到 gstreamer1 的头文件,但会有运行时的错误
fixme:gstreamer:unknown_type Could not find a filter for caps:
audio/x-wma, wmaversion=(int)2, bitrate=(int)128000, depth=(int)16,
rate=(int)48000, channels=(int)2, block_align=(int)5462,
codec_data=(buffer)008800000f0000000000
fixme:gstreamer:event_src 0x7ba04320 (61441) stub
fixme:gstreamer:unknown_type Could not find a filter for caps:
video/x-wmv, wmvversion=(int)3, format=(string)WMV3, width=(int)704,
height=(int)480, codec_data=(buffer)4ff1080100,
framerate=(fraction)10000000/333667
fixme:gstreamer:watch_bus decodebin0: 您的 GStreamer 安装缺少插件。
fixme:gstreamer:GST_Connect GStreamer could not find any streams
fixme:gstreamer:watch_bus asfdemux0: 内部数据流错误。
gstreamer1 本身是自由软件,在 fedora 的官方源里。在需要播放有版权限制的文件时,会通过 decodebin 找到对应的插件[1]。
在我的电脑上运行 gst-launch-1.0 -v filesrc location=/dev/shm/wa2_mv001.wmv !
decodebin ! videoconvert ! autovideosink ,能够正常播放。说明,我已经安装了正确的 64
位插件,但缺失对应的32位插件,导致 wine 无法播放 wmv 。
这里,我用了很笨拙的方法: rpm -qa 列出已安装的软件包,按后缀名为 .i686 与 .x86_64
分成两部分,写了一个python脚本进行比对。安装这些(与gstreamer1相关)软件包后,问题解决
[1]:
https://gstreamer.freedesktop.org/data/doc/gstreamer/head/gst-plugins-base-plugins/html/gst-plugins-base-plugins-decodebin.html
--
Have a nice day!
Zhenbo Li