MeeGo 1.0 Netbook中的gstreamer

原文转自:http://software.intel.com/zh-cn/blogs/2010/09/29/meego-10-netbookgstreamer/

 

在最新的MeeGo 1.0 Netbook系统中, 在terminal中运行rpm -qa | grep gstreamer可以看到系统缺省安装有gstreamer - http://www.gstreamer.net/. GStreamer是一个开源的多媒体框架库. 在MeeGo 1.0 Netbook系统中支持有许多plugin, 通过rpm -qa | grep gst-plugins可以看到系统支持有gst-plugins-base, gst-plugins-bad-free, gst-plugins-good等,比如大家可以在http://gstreamer.freedesktop.org/releases/gst-plugins-good/0.10.25.html等看到gst-plugins-good支持的功能.

gstreamer包缺省会在/usr/bin/目录下面安装许多工具,比如

1. gst-launch,大家可以尝试在MeeGo 1.0 Netbook系统中用playbin或者decodebin等来播放视频或者音频文件

gst-launch playbin uri="file:///home/xxx/Videos/kittens.ogv" 视频
gst-launch playbin uri=file:///home/xxx/Music/DovEporTar/ -/ Test/ night/ n.1/03/ -/ Il/ treno.ogg 音频

gst-launch filesrc location=/home/xxx/Videos/kittens.ogv ! decodebin ! xvimagesink 视频
gst-launch filesrc location=/home/xxx/Music/DovEporTar/ -/ Test/ night/ n.1/03/ -/ Il/ treno.ogg ! decodebin ! audioconvert ! audioresample ! alsasink 音频

2. gst-inspect
gst-launch playbin或者decodebin会自动根据文件的编码格式等来寻找codec plugin等,当前系统中支持有哪些codec plugin呢?可以尝试在terminal中运行gst-inspect.
比如想搜索有关ogg的plugin, 运行gst-inspect | grep ogg
可以看到
ogg: oggaviparse: Ogg AVI parser
ogg: oggparse: Ogg parser
ogg: ogmtextparse: OGM text stream parser
ogg: ogmvideoparse: OGM video stream parser
ogg: ogmaudioparse: OGM audio stream parser
ogg: oggmux: Ogg muxer
ogg: oggdemux: Ogg demuxer
...
这些都是有关ogg的plugin, 用户也可以在gst-launch中根据自己的需求手动选择配置plugin来播放媒体文件

3. gst-typefind
有什么办法来检测文件种类呢?可以用gst-typefind命令
比如
gst-typefind /home/xxx/Pictures/Party/marbles.jpg会显示结果image/jpeg
gst-typefind /home/xxx/Music/DovEporTar/ -/ Test/ night/ n.1/03/ -/ Il/ treno.ogg会显示结果application/ogg
即使在不知道文件后缀的情况下面也会正确显示文件种类
比如
mv /home/xxx/Music/DovEporTar/ -/ Test/ night/ n.1/03/ -/ Il/ treno.ogg /home/xxx/test
gst-typefind /home/xxx/test会显示结果application/ogg

大家如果有兴趣可以多多尝试更多有关gstreamer的命令

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值