Gstreamer/tools: gst-launch gst-inspect 用法示例
2015-06-19 11:20
344 查看
1. 查看 gst 中的 plugins 及其详细信息:
$ gst-inspect
列出 gstreamer 中所有的 plugins
$ gst-inspect alsasink
打印出 alsasink 的详细信息
$ gst-inspect --gst-debug all
打印出 GST_DEBUG 环境变量所有可用的值
2. 利用 gst 中的 playbin 来播放音视频
$ gst-launch playbin uri=file:///<audio or video file>
3. 使用 gst 中提供的 elements 自己创建 pipeline 来播放多媒体资源
1) 播放 audio 文件
$ gst-launch filesrc location=1.m4a ! qtdemux ! queue !
ffdec_aac ! audioflingersink
$ gst-launch filesrc location=2.mp3 ! mp3parse ! mad ! audioconvert ! audioflingersink
$ gst-launch filesrc location=48khz.wav ! wavparse ! audioconvert ! audioresample
quality=0 ! audio/x-raw,rate=4000 ! alsasink
$ gst-launch filesrc location=my.mpeg ! decodebin ! pulsesink // Automatically detect the right audio codec in a pipeline
2) 播放 video 文件
$ gst-launch filesrc location=1.3gp ! qtdemux ! queue !
ffdec_h263 ! ffmpegcolorspace ! urfaceflingersink
$ gst-launch filesrc location=my.mpeg ! decodebin ! videoconvert ! xvimagesink // Automatically detect the right video
codec in a pipeline
3) 播放 audio + video 文件
$ gst-launch filesrc location=1.mp4 !qtdemux
name=demux
demux. ! queue
! ffdec_aac ! audioflingersink
demux. ! queue ! ffdec_aac ! audioflingersink
$ gst-launch filesrc location=my-random-media-file.mpeg ! decodebin name=decoder
decoder. ! videoconvert ! xvimagesink
decoder. ! audioconvert ! pulsesink
4. 使用 gst 中提供的 elements 自己创建 pipeline 来录制多媒体资源
1) default audio source is Microphone
$ gst-launch autoaudiosrc ! audioconvert ! faac ! mp4mux ! filesink location=aac_audio.mp4
2) Having multiple audio sources and mic is not default audio source, then you have to specify device identifier of the mic input.
$ gst-launch alsa-src device=<device identifier for mic input> ! audioconvert ! faac ! mp4mux
! filesink location=aac_audio.mp4
$ gst-launch oss-src device=<device identifier for mic input> ! audioconvert ! faac ! mp4mux !
5. 使用 gst dump 出 wav 格式音频
1) Using uridecodebin
$ gst-launch-1.0 uridecodebin uri=file:///aac_5.1.m4a ! wavenc !
filesink location=/aac_5.1.m4a.wav
6. 使用 gst dump 出 pipeline 构成图
首先创建用于存放数据的目录: ./dot
$ GST_DEBUG_DUMP_DOT_DIR=./dot gst-launch-1.0 playbin uri=file:///mnt/share/audio_test_file/ape/stereo/APE_48khz_16bit_stereo_extrahigh.ape
$ cd ./dot
$ dot -Tpng 0.00.00.170426473-gst-launch.PAUSED_PLAYING.dot > pipeline.png
持续更新中...
$ gst-inspect
列出 gstreamer 中所有的 plugins
$ gst-inspect alsasink
打印出 alsasink 的详细信息
$ gst-inspect --gst-debug all
打印出 GST_DEBUG 环境变量所有可用的值
2. 利用 gst 中的 playbin 来播放音视频
$ gst-launch playbin uri=file:///<audio or video file>
3. 使用 gst 中提供的 elements 自己创建 pipeline 来播放多媒体资源
1) 播放 audio 文件
$ gst-launch filesrc location=1.m4a ! qtdemux ! queue !
ffdec_aac ! audioflingersink
$ gst-launch filesrc location=2.mp3 ! mp3parse ! mad ! audioconvert ! audioflingersink
$ gst-launch filesrc location=48khz.wav ! wavparse ! audioconvert ! audioresample
quality=0 ! audio/x-raw,rate=4000 ! alsasink
$ gst-launch filesrc location=my.mpeg ! decodebin ! pulsesink // Automatically detect the right audio codec in a pipeline
2) 播放 video 文件
$ gst-launch filesrc location=1.3gp ! qtdemux ! queue !
ffdec_h263 ! ffmpegcolorspace ! urfaceflingersink
$ gst-launch filesrc location=my.mpeg ! decodebin ! videoconvert ! xvimagesink // Automatically detect the right video
codec in a pipeline
3) 播放 audio + video 文件
$ gst-launch filesrc location=1.mp4 !qtdemux
name=demux
demux. ! queue
! ffdec_aac ! audioflingersink
demux. ! queue ! ffdec_aac ! audioflingersink
$ gst-launch filesrc location=my-random-media-file.mpeg ! decodebin name=decoder
decoder. ! videoconvert ! xvimagesink
decoder. ! audioconvert ! pulsesink
4. 使用 gst 中提供的 elements 自己创建 pipeline 来录制多媒体资源
1) default audio source is Microphone
$ gst-launch autoaudiosrc ! audioconvert ! faac ! mp4mux ! filesink location=aac_audio.mp4
2) Having multiple audio sources and mic is not default audio source, then you have to specify device identifier of the mic input.
$ gst-launch alsa-src device=<device identifier for mic input> ! audioconvert ! faac ! mp4mux
! filesink location=aac_audio.mp4
$ gst-launch oss-src device=<device identifier for mic input> ! audioconvert ! faac ! mp4mux !
5. 使用 gst dump 出 wav 格式音频
1) Using uridecodebin
$ gst-launch-1.0 uridecodebin uri=file:///aac_5.1.m4a ! wavenc !
filesink location=/aac_5.1.m4a.wav
6. 使用 gst dump 出 pipeline 构成图
首先创建用于存放数据的目录: ./dot
$ GST_DEBUG_DUMP_DOT_DIR=./dot gst-launch-1.0 playbin uri=file:///mnt/share/audio_test_file/ape/stereo/APE_48khz_16bit_stereo_extrahigh.ape
$ cd ./dot
$ dot -Tpng 0.00.00.170426473-gst-launch.PAUSED_PLAYING.dot > pipeline.png
持续更新中...
相关文章推荐
- Count Primes
- windows7剪切文件夹到另一个文件夹出现未响应怎么办?
- android app notification的用法
- int和NSInteger和long区别
- LeetCode_42---Trapping Rain Water
- Java数据类型和MySql数据类型对应表
- 显示隐藏的断开连接的邮箱
- Andorid--Volley(三)--自定义Request
- 【华为oj】等差数列
- Android获取的时间转为12小时制
- windows2003
- GPIO pull High 原理
- Codeforces Round #308 (Div. 2) C. Vanya and Scales dfs
- 赋予管理员操作系统文件的权限
- JAVA中Action层, Service层 ,modle层 和 Dao层的功能区分
- 测试IE浏览器对JavaScript的AngularJS的兼容性
- Regex of HTML
- sencha touch 使用Ajax请求ashx后台
- IOS开发学习第四章---使用更多的UI控件
- 第二阶段绩效考核