Gstreamer常用指令

1、测试 fbdevsink 命令

gst-launch-1.0 videotestsrc ! fbdevsink

2、使用playbin元件自动寻找元件播放音视频

gst-launch-1.0 playbin uri=file:///tmp/bad_apple.mp4

3、使用decodebin元件自动寻找解码器,指定fb元件播放视频

gst-launch-1.0 filesrc location=bad_apple.mp4 ! qtdemux ! decodebin ! sunxifbsink

4、指定硬件解码器和fb元件的播放视频命令

gst-launch-1.0 filesrc location=bad_apple.mp4 ! qtdemux ! h264parse ! omxh264dec ! videoconvert ! sunxifbsink

5、同时播放音视频的命令

gst-launch-1.0 filesrc location=bad_apple.mp4 ! qtdemux name=demux demux.audio_0 ! queue ! decodebin ! audioconvert ! audioresample ! alsasink demux.video_0 ! queue ! h264parse ! omxh264dec ! videoconvert ! videoscale ! sunxifbsink

6、播放本地mp3文件

gst-launch-1.0 filesrc location=/11.mp3 ! decodebin !audioconvert !autoaudiosink

7、播放http链接

gst-launch-1.0 souphttpsrc location=http://192.168.1.102/http_and_https/buzaiyouyu.mp3 ! decodebin ! audioconvert ! autoaudiosink

8、播放时,修改alsa声卡

gst-launch-1.0 filesrc location=/11.mp3 ! decodebin !audioconvert !alsasink device=plug:dmix