Gstreamer中一些gst-launch常用命令
用Linux系统中使用gstreamer架构做对媒体开发时,gst-inspect 和gst-launch是两个非常使用的小工具,gst-inspect 在开发时用于查询库各个插件element的详细信息,后者用于在终端快速构建一条pipeline用于播放多媒体。下面列出我在以前的学习和项目开发时常用的gst-launch播放各种多媒体文件的实例:
一、gstreamer实现视频显示
gst-launch videotestsrc ! xvimagesink
二、gstreamer实现摄像头采集:
1、可以现实图像,但图像卡住不动
gst-launch v4l2src ! xvimagesink
2、摄像头视频显示正常
gst-launch v4l2src !video/x-raw-yuv,format=\(fourcc\)YUY2,width=640,height=480,framerate=15/1 !videorate ! videoscale ! ffmpegcolorspace ! xvimagesink
gst-launch v4l2src ! video/x-raw-yuv,width=640,height=480,framerate=15/1 !queue2 ! videorate ! videoscale ! ffmpegcolorspace ! xvimagesink
三、摄像头视频现实及保存为avi格式文件
gst-launch -e v4l2src !video/x-raw-yuv,format=\(fourcc\)YUY2,width=640,height=480,framerate=30/1 ! teename=srctee \
srctee. ! queue2 name=squeue ! ffmpegcolorspace !