记录:继续探索moblin 2上的GSTREAMER:播放MP3及AVI文件
2009-12-17 15:38
435 查看
在Moblin 2 上使用Gstreamer播放MP3和AVI文件
1、机器环境,某个牌子NetBook
uname -a
Linux localhost
2.6.29.1-18.1.moblin2-netbook #1 SMP PREEMPT Fri Apr 17 17:25:17 UTC 2009 i686
i686 i386 GNU/Linux
2.播放MP3
2.1运行gst -launch filesrc location="bb.mp3" ! mad ! alsasink 报错
2.2.下载、编译、安装
gst-plugins-ugly-0.10.11及libmad-0.15.1b,需要解决一些编译问题。前者包含了系列的ugly的plugins,包括GStreamer的mad,mad依赖于libmad-0.15.1b。
2.3、运行成功。能够正确听到MP3中的音乐。
[root@localhost shallon]# gst-launch -v filesrc
location="bb.mp3" ! mad ! alsasink
Setting pipeline to PAUSED
...
/GstPipeline:pipeline0/GstMad:mad0.GstPad:src: caps = audio/x-raw-int,
endianness=(int)1234, signed=(boolean)true, width=(int)32, depth=(int)32,
rate=(int)44100, channels=(int)2
Pipeline is PREROLLING
...
/GstPipeline:pipeline0/GstAlsaSink:alsasink0.GstPad:sink: caps =
audio/x-raw-int, endianness=(int)1234, signed=(boolean)true, width=(int)32,
depth=(int)32, rate=(int)44100, channels=(int)2
Pipeline is PREROLLED
...
Setting pipeline to PLAYING ...
New clock:
GstAudioSinkClock
^CCaught interrupt -- handling interrupt.
Interrupt:
Stopping pipeline ...
Execution ended after 6135758110 ns.
Setting
pipeline to PAUSED ...
Setting pipeline to READY
...
/GstPipeline:pipeline0/GstAlsaSink:alsasink0.GstPad:sink: caps =
NULL
/GstPipeline:pipeline0/GstMad:mad0.GstPad:src: caps = NULL
Setting
pipeline to NULL ...
FREEING pipeline ...
3、播放视频文件
3.1播放视频文件出错。 gst-launch -v filesrc location="cc.avi" ! decodebin !
xvimagesink
[root@localhost VERBATIM]# gst-launch -v filesrc location="cc.avi" !
decodebin ! xvimagesink
Setting pipeline to PAUSED
...
/GstPipeline:pipeline0/GstDecodeBin:decodebin0/GstTypeFindElement:typefind.GstPad:src:
caps =
video/x-msvideo
/GstPipeline:pipeline0/GstDecodeBin:decodebin0/GstAviDemux:avidemux0.GstPad:sink:
caps = video/x-msvideo
Pipeline is PREROLLING
...
/GstPipeline:pipeline0/GstDecodeBin:decodebin0/GstQueue:queue0.GstPad:sink:
caps = audio/mpeg, mpegversion=(int)1, layer=(int)3, rate=(int)48000,
channels=(int)2,
codec_data=(buffer)010002000000800401007105
/GstPipeline:pipeline0/GstDecodeBin:decodebin0/GstQueue:queue0.GstPad:src:
caps = audio/mpeg, mpegversion=(int)1, layer=(int)3, rate=(int)48000,
channels=(int)2,
codec_data=(buffer)010002000000800401007105
/GstPipeline:pipeline0/GstDecodeBin:decodebin0/GstMPEGAudioParse:mpegaudioparse0.GstPad:sink:
caps = audio/mpeg, mpegversion=(int)1, layer=(int)3, rate=(int)48000,
channels=(int)2,
codec_data=(buffer)010002000000800401007105
/GstPipeline:pipeline0/GstDecodeBin:decodebin0/GstMPEGAudioParse:mpegaudioparse0.GstPad:src:
caps = audio/mpeg, mpegversion=(int)1, mpegaudioversion=(int)1, layer=(int)3,
rate=(int)48000, channels=(int)2,
parsed=(boolean)true
/GstPipeline:pipeline0/GstDecodeBin:decodebin0/GstMad:mad0.GstPad:sink:
caps = audio/mpeg, mpegversion=(int)1, mpegaudioversion=(int)1, layer=(int)3,
rate=(int)48000, channels=(int)2,
parsed=(boolean)true
/GstPipeline:pipeline0/GstDecodeBin:decodebin0.GstGhostPad:src0:
caps = audio/x-raw-int, endianness=(int)1234, signed=(boolean)true,
width=(int)32, depth=(int)32, rate=(int)48000,
channels=(int)2
/GstPipeline:pipeline0/GstDecodeBin:decodebin0/GstMad:mad0.GstPad:src:
caps = audio/x-raw-int, endianness=(int)1234, signed=(boolean)true,
width=(int)32, depth=(int)32, rate=(int)48000, channels=(int)2
ERROR: from
element /GstPipeline:pipeline0/GstDecodeBin:decodebin0/GstAviDemux:avidemux0:
Internal data stream error.
Additional debug info:
gstavidemux.c(4163):
gst_avi_demux_loop ():
/GstPipeline:pipeline0/GstDecodeBin:decodebin0/GstAviDemux:avidemux0:
streaming
stopped, reason not-linked
ERROR: pipeline doesn't want to
preroll.
Setting pipeline to NULL
...
/GstPipeline:pipeline0/GstDecodeBin:decodebin0.GstGhostPad:src0: caps =
NULL
/GstPipeline:pipeline0/GstDecodeBin:decodebin0.GstGhostPad:src0: caps =
NULL
/GstPipeline:pipeline0/GstDecodeBin:decodebin0/GstMad:mad0.GstPad:src:
caps =
NULL
/GstPipeline:pipeline0/GstDecodeBin:decodebin0/GstMad:mad0.GstPad:sink:
caps =
NULL
/GstPipeline:pipeline0/GstDecodeBin:decodebin0/GstMPEGAudioParse:mpegaudioparse0.GstPad:src:
caps =
NULL
/GstPipeline:pipeline0/GstDecodeBin:decodebin0/GstMPEGAudioParse:mpegaudioparse0.GstPad:sink:
caps =
NULL
/GstPipeline:pipeline0/GstDecodeBin:decodebin0/GstQueue:queue0.GstPad:src:
caps =
NULL
/GstPipeline:pipeline0/GstDecodeBin:decodebin0/GstQueue:queue0.GstPad:sink:
caps =
NULL
/GstPipeline:pipeline0/GstDecodeBin:decodebin0/GstAviDemux:avidemux0.GstPad:audio_00:
caps =
NULL
/GstPipeline:pipeline0/GstDecodeBin:decodebin0/GstAviDemux:avidemux0.GstPad:video_00:
caps =
NULL
/GstPipeline:pipeline0/GstDecodeBin:decodebin0/GstAviDemux:avidemux0.GstPad:sink:
caps =
NULL
/GstPipeline:pipeline0/GstDecodeBin:decodebin0/GstTypeFindElement:typefind.GstPad:src:
caps = NULL
FREEING pipeline ...
[root@localhost VERBATIM]#
3.2安装gst-ffmpeg-0.10.7
3.3运行gst-launch -v filesrc location="cc.avi" ! decodebin ! xvimagesink
成功看到连续的图像播放,但是无法听到声音
[root@localhost VERBATIM]# gst-launch -v filesrc location="cc.avi" !
decodebin ! xvimagesink Setting pipeline to PAUSED
...
/GstPipeline:pipeline0/GstDecodeBin:decodebin0/GstTypeFindElement:typefind.GstPad:src:
caps = video/x-msvideo
Pipeline is PREROLLING
...
/GstPipeline:pipeline0/GstDecodeBin:decodebin0/GstAviDemux:avidemux0.GstPad:sink:
caps =
video/x-msvideo
/GstPipeline:pipeline0/GstDecodeBin:decodebin0/GstQueue:queue0.GstPad:sink:
caps = video/x-divx, divxversion=(int)5, framerate=(fraction)30000/1001,
width=(int)720,
height=(int)480
/GstPipeline:pipeline0/GstDecodeBin:decodebin0/GstQueue:queue0.GstPad:src:
caps = video/x-divx, divxversion=(int)5, framerate=(fraction)30000/1001,
width=(int)720,
height=(int)480
/GstPipeline:pipeline0/GstDecodeBin:decodebin0/GstQueue:queue1.GstPad:sink:
caps = audio/mpeg, mpegversion=(int)1, layer=(int)3, rate=(int)48000,
channels=(int)2,
codec_data=(buffer)010002000000800401007105
/GstPipeline:pipeline0/GstDecodeBin:decodebin0/GstQueue:queue1.GstPad:src:
caps = audio/mpeg, mpegversion=(int)1, layer=(int)3, rate=(int)48000,
channels=(int)2,
codec_data=(buffer)010002000000800401007105
/GstPipeline:pipeline0/GstDecodeBin:decodebin0/GstMPEGAudioParse:mpegaudioparse0.GstPad:sink:
caps = audio/mpeg, mpegversion=(int)1, layer=(int)3, rate=(int)48000,
channels=(int)2,
codec_data=(buffer)010002000000800401007105
/GstPipeline:pipeline0/GstDecodeBin:decodebin0/ffdec_mpeg4:ffdec_mpeg40.GstPad:sink:
caps = video/x-divx, divxversion=(int)5, framerate=(fraction)30000/1001,
width=(int)720,
height=(int)480
/GstPipeline:pipeline0/GstDecodeBin:decodebin0.GstGhostPad:src0:
caps = video/x-raw-yuv, width=(int)720, height=(int)480,
framerate=(fraction)30000/1001, format=(fourcc)I420,
pixel-aspect-ratio=(fraction)1/1
/GstPipeline:pipeline0/GstDecodeBin:decodebin0/ffdec_mpeg4:ffdec_mpeg40.GstPad:src:
caps = video/x-raw-yuv, width=(int)720, height=(int)480,
framerate=(fraction)30000/1001, format=(fourcc)I420,
pixel-aspect-ratio=(fraction)1/1
/GstPipeline:pipeline0/GstDecodeBin:decodebin0/GstMPEGAudioParse:mpegaudioparse0.GstPad:src:
caps = audio/mpeg, mpegversion=(int)1, mpegaudioversion=(int)1, layer=(int)3,
rate=(int)48000, channels=(int)2,
parsed=(boolean)true
/GstPipeline:pipeline0/GstDecodeBin:decodebin0/GstMad:mad0.GstPad:sink:
caps = audio/mpeg, mpegversion=(int)1, mpegaudioversion=(int)1, layer=(int)3,
rate=(int)48000, channels=(int)2,
parsed=(boolean)true
/GstPipeline:pipeline0/GstDecodeBin:decodebin0.GstGhostPad:src1:
caps = audio/x-raw-int, endianness=(int)1234, signed=(boolean)true,
width=(int)32, depth=(int)32, rate=(int)48000,
channels=(int)2
/GstPipeline:pipeline0/GstDecodeBin:decodebin0/GstMad:mad0.GstPad:src:
caps = audio/x-raw-int, endianness=(int)1234, signed=(boolean)true,
width=(int)32, depth=(int)32, rate=(int)48000,
channels=(int)2
/GstPipeline:pipeline0/GstXvImageSink:xvimagesink0.GstPad:sink:
caps = video/x-raw-yuv, width=(int)720, height=(int)480,
framerate=(fraction)30000/1001, format=(fourcc)I420,
pixel-aspect-ratio=(fraction)1/1
/GstPipeline:pipeline0/GstDecodeBin:decodebin0.GstGhostPad:src0:
caps = video/x-raw-yuv, width=(int)720, height=(int)480,
framerate=(fraction)30000/1001, format=(fourcc)I420,
pixel-aspect-ratio=(fraction)1/1
/GstPipeline:pipeline0/GstDecodeBin:decodebin0.GstGhostPad:src0.GstProxyPad:proxypad1:
caps = video/x-raw-yuv, width=(int)720, height=(int)480,
framerate=(fraction)30000/1001, format=(fourcc)I420,
pixel-aspect-ratio=(fraction)1/1
Pipeline is PREROLLED ...
Setting
pipeline to PLAYING ...
New clock: GstSystemClock
ERROR: from element
/GstPipeline:pipeline0/GstXvImageSink:xvimagesink0: Output window was
closed
Additional debug info:
xvimagesink.c(1235):
gst_xvimagesink_handle_xevents ():
/GstPipeline:pipeline0/GstXvImageSink:xvimagesink0
Execution ended after
24260868050 ns.
Setting pipeline to PAUSED ...
Setting pipeline to READY
...
/GstPipeline:pipeline0/GstXvImageSink:xvimagesink0.GstPad:sink: caps =
NULL
/GstPipeline:pipeline0/GstDecodeBin:decodebin0.GstGhostPad:src1: caps =
NULL
/GstPipeline:pipeline0/GstDecodeBin:decodebin0.GstGhostPad:src0: caps =
NULL
/GstPipeline:pipeline0/GstDecodeBin:decodebin0.GstGhostPad:src1: caps =
NULL
/GstPipeline:pipeline0/GstDecodeBin:decodebin0/GstMad:mad0.GstPad:src:
caps =
NULL
/GstPipeline:pipeline0/GstDecodeBin:decodebin0/GstMad:mad0.GstPad:sink:
caps =
NULL
/GstPipeline:pipeline0/GstDecodeBin:decodebin0/GstMPEGAudioParse:mpegaudioparse0.GstPad:src:
caps =
NULL
/GstPipeline:pipeline0/GstDecodeBin:decodebin0/GstMPEGAudioParse:mpegaudioparse0.GstPad:sink:
caps =
NULL
/GstPipeline:pipeline0/GstDecodeBin:decodebin0/GstQueue:queue1.GstPad:src:
caps =
NULL
/GstPipeline:pipeline0/GstDecodeBin:decodebin0/GstQueue:queue1.GstPad:sink:
caps = NULL
/GstPipeline:pipeline0/GstDecodeBin:decodebin0.GstGhostPad:src0:
caps =
NULL
/GstPipeline:pipeline0/GstDecodeBin:decodebin0/ffdec_mpeg4:ffdec_mpeg40.GstPad:src:
caps =
NULL
/GstPipeline:pipeline0/GstDecodeBin:decodebin0/ffdec_mpeg4:ffdec_mpeg40.GstPad:sink:
caps =
NULL
/GstPipeline:pipeline0/GstDecodeBin:decodebin0/GstQueue:queue0.GstPad:src:
caps =
NULL
/GstPipeline:pipeline0/GstDecodeBin:decodebin0/GstQueue:queue0.GstPad:sink:
caps =
NULL
/GstPipeline:pipeline0/GstDecodeBin:decodebin0/GstAviDemux:avidemux0.GstPad:audio_00:
caps =
NULL
/GstPipeline:pipeline0/GstDecodeBin:decodebin0/GstAviDemux:avidemux0.GstPad:video_00:
caps =
NULL
/GstPipeline:pipeline0/GstDecodeBin:decodebin0/GstAviDemux:avidemux0.GstPad:sink:
caps =
NULL
/GstPipeline:pipeline0/GstDecodeBin:decodebin0/GstTypeFindElement:typefind.GstPad:src:
caps = NULL
Setting pipeline to NULL ...
FREEING pipeline
...
[root@localhost VERBATIM]#
3.4 使用avidemux同时播放语音和图像
[root@localhost VERBATIM]# gst-launch -v filesrc location=cc.avi ! avidemux
name=demux demux.audio_00 ! mad ! alsasink demux.video_00 ! queue ! decodebin !
ffmpegcolorspace ! videoscale ! xvimagesink
Setting pipeline to PAUSED ...
Pipeline is PREROLLING
...
/GstPipeline:pipeline0/GstQueue:queue0.GstPad:sink: caps = video/x-divx,
divxversion=(int)5, framerate=(fraction)30000/1001, width=(int)720,
height=(int)480
/GstPipeline:pipeline0/GstQueue:queue0.GstPad:src: caps =
video/x-divx, divxversion=(int)5, framerate=(fraction)30000/1001,
width=(int)720,
height=(int)480
/GstPipeline:pipeline0/GstDecodeBin:decodebin0/GstTypeFindElement:typefind.GstPad:src:
caps = video/x-divx, divxversion=(int)5, framerate=(fraction)30000/1001,
width=(int)720,
height=(int)480
/GstPipeline:pipeline0/GstMad:mad0.GstPad:sink: caps =
audio/mpeg, mpegversion=(int)1, layer=(int)3, rate=(int)48000, channels=(int)2,
codec_data=(buffer)010002000000800401007105
/GstPipeline:pipeline0/GstMad:mad0.GstPad:src:
caps = audio/x-raw-int, endianness=(int)1234, signed=(boolean)true,
width=(int)32, depth=(int)32, rate=(int)48000,
channels=(int)2
/GstPipeline:pipeline0/GstAlsaSink:alsasink0.GstPad:sink:
caps = audio/x-raw-int, endianness=(int)1234, signed=(boolean)true,
width=(int)32, depth=(int)32, rate=(int)48000,
channels=(int)2
/GstPipeline:pipeline0/GstDecodeBin:decodebin0/GstTypeFindElement:typefind.GstPad:sink:
caps = video/x-divx, divxversion=(int)5, framerate=(fraction)30000/1001,
width=(int)720,
height=(int)480
/GstPipeline:pipeline0/GstDecodeBin:decodebin0.GstGhostPad:sink:
caps = video/x-divx, divxversion=(int)5, framerate=(fraction)30000/1001,
width=(int)720,
height=(int)480
/GstPipeline:pipeline0/GstDecodeBin:decodebin0.GstGhostPad:sink:
caps = video/x-divx, divxversion=(int)5, framerate=(fraction)30000/1001,
width=(int)720,
height=(int)480
/GstPipeline:pipeline0/GstDecodeBin:decodebin0.GstGhostPad:sink.GstProxyPad:proxypad0:
caps = video/x-divx, divxversion=(int)5, framerate=(fraction)30000/1001,
width=(int)720,
height=(int)480
/GstPipeline:pipeline0/GstDecodeBin:decodebin0/ffdec_mpeg4:ffdec_mpeg40.GstPad:sink:
caps = video/x-divx, divxversion=(int)5, framerate=(fraction)30000/1001,
width=(int)720,
height=(int)480
/GstPipeline:pipeline0/GstDecodeBin:decodebin0.GstGhostPad:src0:
caps = video/x-raw-yuv, width=(int)720, height=(int)480,
framerate=(fraction)30000/1001, format=(fourcc)I420,
pixel-aspect-ratio=(fraction)1/1
/GstPipeline:pipeline0/GstDecodeBin:decodebin0/ffdec_mpeg4:ffdec_mpeg40.GstPad:src:
caps = video/x-raw-yuv, width=(int)720, height=(int)480,
framerate=(fraction)30000/1001, format=(fourcc)I420,
pixel-aspect-ratio=(fraction)1/1
/GstPipeline:pipeline0/GstFFMpegCsp:ffmpegcsp0.GstPad:src:
caps = video/x-raw-yuv, width=(int)720, height=(int)480,
framerate=(fraction)30000/1001, format=(fourcc)I420,
pixel-aspect-ratio=(fraction)1/1
/GstPipeline:pipeline0/GstFFMpegCsp:ffmpegcsp0.GstPad:sink:
caps = video/x-raw-yuv, width=(int)720, height=(int)480,
framerate=(fraction)30000/1001, format=(fourcc)I420,
pixel-aspect-ratio=(fraction)1/1
/GstPipeline:pipeline0/GstDecodeBin:decodebin0.GstGhostPad:src0:
caps = video/x-raw-yuv, width=(int)720, height=(int)480,
framerate=(fraction)30000/1001, format=(fourcc)I420,
pixel-aspect-ratio=(fraction)1/1
/GstPipeline:pipeline0/GstDecodeBin:decodebin0.GstGhostPad:src0.GstProxyPad:proxypad1:
caps = video/x-raw-yuv, width=(int)720, height=(int)480,
framerate=(fraction)30000/1001, format=(fourcc)I420,
pixel-aspect-ratio=(fraction)1/1
/GstPipeline:pipeline0/GstVideoScale:videoscale0.GstPad:src:
caps = video/x-raw-yuv, width=(int)720, height=(int)480,
framerate=(fraction)30000/1001, format=(fourcc)I420,
pixel-aspect-ratio=(fraction)1/1
/GstPipeline:pipeline0/GstVideoScale:videoscale0.GstPad:sink:
caps = video/x-raw-yuv, width=(int)720, height=(int)480,
framerate=(fraction)30000/1001, format=(fourcc)I420,
pixel-aspect-ratio=(fraction)1/1
/GstPipeline:pipeline0/GstXvImageSink:xvimagesink0.GstPad:sink:
caps = video/x-raw-yuv, width=(int)720, height=(int)480,
framerate=(fraction)30000/1001, format=(fourcc)I420,
pixel-aspect-ratio=(fraction)1/1
Pipeline is PREROLLED ...
Setting
pipeline to PLAYING ...
New clock: GstAudioSinkClock
ERROR: from element
/GstPipeline:pipeline0/GstXvImageSink:xvimagesink0: Output window was
closed
Additional debug info:
xvimagesink.c(1235):
gst_xvimagesink_handle_xevents ():
/GstPipeline:pipeline0/GstXvImageSink:xvimagesink0
Execution ended after
40043404401 ns.
Setting pipeline to PAUSED ...
Setting pipeline to READY
...
/GstPipeline:pipeline0/GstXvImageSink:xvimagesink0.GstPad:sink: caps =
NULL
/GstPipeline:pipeline0/GstAlsaSink:alsasink0.GstPad:sink: caps =
NULL
/GstPipeline:pipeline0/GstVideoScale:videoscale0.GstPad:src: caps =
NULL
/GstPipeline:pipeline0/GstVideoScale:videoscale0.GstPad:sink: caps =
NULL
/GstPipeline:pipeline0/GstMad:mad0.GstPad:src: caps =
NULL
/GstPipeline:pipeline0/GstMad:mad0.GstPad:sink: caps =
NULL
/GstPipeline:pipeline0/GstFFMpegCsp:ffmpegcsp0.GstPad:src: caps =
NULL
/GstPipeline:pipeline0/GstFFMpegCsp:ffmpegcsp0.GstPad:sink: caps =
NULL
/GstPipeline:pipeline0/GstDecodeBin:decodebin0.GstGhostPad:src0: caps =
NULL
/GstPipeline:pipeline0/GstDecodeBin:decodebin0.GstGhostPad:src0: caps =
NULL
/GstPipeline:pipeline0/GstDecodeBin:decodebin0/ffdec_mpeg4:ffdec_mpeg40.GstPad:src:
caps =
NULL
/GstPipeline:pipeline0/GstDecodeBin:decodebin0/ffdec_mpeg4:ffdec_mpeg40.GstPad:sink:
caps =
NULL
/GstPipeline:pipeline0/GstDecodeBin:decodebin0/GstTypeFindElement:typefind.GstPad:src:
caps =
NULL
/GstPipeline:pipeline0/GstDecodeBin:decodebin0/GstTypeFindElement:typefind.GstPad:sink:
caps = NULL
/GstPipeline:pipeline0/GstDecodeBin:decodebin0.GstGhostPad:sink:
caps = NULL
/GstPipeline:pipeline0/GstQueue:queue0.GstPad:src: caps =
NULL
/GstPipeline:pipeline0/GstQueue:queue0.GstPad:sink: caps =
NULL
/GstPipeline:pipeline0/GstAviDemux:demux.GstPad:audio_00: caps =
NULL
/GstPipeline:pipeline0/GstAviDemux:demux.GstPad:video_00: caps =
NULL
Setting pipeline to NULL ...
FREEING pipeline ...
[root@localhost
VERBATIM]#
3.5 使用avidemux同时播放语音和图像,所谓的gst-launch 的{} 能够使{}中间部分运行在单独的线程中。
[root@localhost VERBATIM]# gst-launch -v filesrc location=cc.avi ! avidemux
name=demux demux.audio_00 ! mad ! alsasink {demux.video_00 ! queue ! decodebin !
ffmpegcolorspace ! videoscale ! xvimagesink}
Setting pipeline to PAUSED ...
Pipeline is PREROLLING
...
/GstPipeline:pipeline0/GstQueue:queue0.GstPad:sink: caps = video/x-divx,
divxversion=(int)5, framerate=(fraction)30000/1001, width=(int)720,
height=(int)480
/GstPipeline:pipeline0/GstQueue:queue0.GstPad:src: caps =
video/x-divx, divxversion=(int)5, framerate=(fraction)30000/1001,
width=(int)720,
height=(int)480
/GstPipeline:pipeline0/GstDecodeBin:decodebin0/GstTypeFindElement:typefind.GstPad:src:
caps = video/x-divx, divxversion=(int)5, framerate=(fraction)30000/1001,
width=(int)720,
height=(int)480
/GstPipeline:pipeline0/GstMad:mad0.GstPad:sink: caps =
audio/mpeg, mpegversion=(int)1, layer=(int)3, rate=(int)48000, channels=(int)2,
codec_data=(buffer)010002000000800401007105
/GstPipeline:pipeline0/GstMad:mad0.GstPad:src:
caps = audio/x-raw-int, endianness=(int)1234, signed=(boolean)true,
width=(int)32, depth=(int)32, rate=(int)48000,
channels=(int)2
/GstPipeline:pipeline0/GstAlsaSink:alsasink0.GstPad:sink:
caps = audio/x-raw-int, endianness=(int)1234, signed=(boolean)true,
width=(int)32, depth=(int)32, rate=(int)48000,
channels=(int)2
/GstPipeline:pipeline0/GstDecodeBin:decodebin0/GstTypeFindElement:typefind.GstPad:sink:
caps = video/x-divx, divxversion=(int)5, framerate=(fraction)30000/1001,
width=(int)720,
height=(int)480
/GstPipeline:pipeline0/GstDecodeBin:decodebin0.GstGhostPad:sink:
caps = video/x-divx, divxversion=(int)5, framerate=(fraction)30000/1001,
width=(int)720,
height=(int)480
/GstPipeline:pipeline0/GstDecodeBin:decodebin0.GstGhostPad:sink:
caps = video/x-divx, divxversion=(int)5, framerate=(fraction)30000/1001,
width=(int)720,
height=(int)480
/GstPipeline:pipeline0/GstDecodeBin:decodebin0.GstGhostPad:sink.GstProxyPad:proxypad0:
caps = video/x-divx, divxversion=(int)5, framerate=(fraction)30000/1001,
width=(int)720,
height=(int)480
/GstPipeline:pipeline0/GstDecodeBin:decodebin0/ffdec_mpeg4:ffdec_mpeg40.GstPad:sink:
caps = video/x-divx, divxversion=(int)5, framerate=(fraction)30000/1001,
width=(int)720,
height=(int)480
/GstPipeline:pipeline0/GstDecodeBin:decodebin0.GstGhostPad:src0:
caps = video/x-raw-yuv, width=(int)720, height=(int)480,
framerate=(fraction)30000/1001, format=(fourcc)I420,
pixel-aspect-ratio=(fraction)1/1
/GstPipeline:pipeline0/GstDecodeBin:decodebin0/ffdec_mpeg4:ffdec_mpeg40.GstPad:src:
caps = video/x-raw-yuv, width=(int)720, height=(int)480,
framerate=(fraction)30000/1001, format=(fourcc)I420,
pixel-aspect-ratio=(fraction)1/1
/GstPipeline:pipeline0/GstFFMpegCsp:ffmpegcsp0.GstPad:src:
caps = video/x-raw-yuv, width=(int)720, height=(int)480,
framerate=(fraction)30000/1001, format=(fourcc)I420,
pixel-aspect-ratio=(fraction)1/1
/GstPipeline:pipeline0/GstFFMpegCsp:ffmpegcsp0.GstPad:sink:
caps = video/x-raw-yuv, width=(int)720, height=(int)480,
framerate=(fraction)30000/1001, format=(fourcc)I420,
pixel-aspect-ratio=(fraction)1/1
/GstPipeline:pipeline0/GstDecodeBin:decodebin0.GstGhostPad:src0:
caps = video/x-raw-yuv, width=(int)720, height=(int)480,
framerate=(fraction)30000/1001, format=(fourcc)I420,
pixel-aspect-ratio=(fraction)1/1
/GstPipeline:pipeline0/GstDecodeBin:decodebin0.GstGhostPad:src0.GstProxyPad:proxypad1:
caps = video/x-raw-yuv, width=(int)720, height=(int)480,
framerate=(fraction)30000/1001, format=(fourcc)I420,
pixel-aspect-ratio=(fraction)1/1
/GstPipeline:pipeline0/GstVideoScale:videoscale0.GstPad:src:
caps = video/x-raw-yuv, width=(int)720, height=(int)480,
framerate=(fraction)30000/1001, format=(fourcc)I420,
pixel-aspect-ratio=(fraction)1/1
/GstPipeline:pipeline0/GstVideoScale:videoscale0.GstPad:sink:
caps = video/x-raw-yuv, width=(int)720, height=(int)480,
framerate=(fraction)30000/1001, format=(fourcc)I420,
pixel-aspect-ratio=(fraction)1/1
/GstPipeline:pipeline0/GstXvImageSink:xvimagesink0.GstPad:sink:
caps = video/x-raw-yuv, width=(int)720, height=(int)480,
framerate=(fraction)30000/1001, format=(fourcc)I420,
pixel-aspect-ratio=(fraction)1/1
Pipeline is PREROLLED ...
Setting
pipeline to PLAYING ...
New clock: GstAudioSinkClock
ERROR: from element
/GstPipeline:pipeline0/GstXvImageSink:xvimagesink0: Output window was
closed
Additional debug info:
xvimagesink.c(1235):
gst_xvimagesink_handle_xevents ():
/GstPipeline:pipeline0/GstXvImageSink:xvimagesink0
Execution ended after
14081223436 ns.
Setting pipeline to PAUSED ...
Setting pipeline to READY
...
/GstPipeline:pipeline0/GstXvImageSink:xvimagesink0.GstPad:sink: caps =
NULL
/GstPipeline:pipeline0/GstAlsaSink:alsasink0.GstPad:sink: caps =
NULL
/GstPipeline:pipeline0/GstVideoScale:videoscale0.GstPad:src: caps =
NULL
/GstPipeline:pipeline0/GstVideoScale:videoscale0.GstPad:sink: caps =
NULL
/GstPipeline:pipeline0/GstMad:mad0.GstPad:src: caps =
NULL
/GstPipeline:pipeline0/GstMad:mad0.GstPad:sink: caps =
NULL
/GstPipeline:pipeline0/GstFFMpegCsp:ffmpegcsp0.GstPad:src: caps =
NULL
/GstPipeline:pipeline0/GstFFMpegCsp:ffmpegcsp0.GstPad:sink: caps =
NULL
/GstPipeline:pipeline0/GstDecodeBin:decodebin0.GstGhostPad:src0: caps =
NULL
/GstPipeline:pipeline0/GstDecodeBin:decodebin0.GstGhostPad:src0: caps =
NULL
/GstPipeline:pipeline0/GstDecodeBin:decodebin0/ffdec_mpeg4:ffdec_mpeg40.GstPad:src:
caps =
NULL
/GstPipeline:pipeline0/GstDecodeBin:decodebin0/ffdec_mpeg4:ffdec_mpeg40.GstPad:sink:
caps =
NULL
/GstPipeline:pipeline0/GstDecodeBin:decodebin0/GstTypeFindElement:typefind.GstPad:src:
caps =
NULL
/GstPipeline:pipeline0/GstDecodeBin:decodebin0/GstTypeFindElement:typefind.GstPad:sink:
caps = NULL
/GstPipeline:pipeline0/GstDecodeBin:decodebin0.GstGhostPad:sink:
caps = NULL
/GstPipeline:pipeline0/GstQueue:queue0.GstPad:src: caps =
NULL
/GstPipeline:pipeline0/GstQueue:queue0.GstPad:sink: caps =
NULL
/GstPipeline:pipeline0/GstAviDemux:demux.GstPad:audio_00: caps =
NULL
/GstPipeline:pipeline0/GstAviDemux:demux.GstPad:video_00: caps =
NULL
Setting pipeline to NULL ...
FREEING pipeline ...
[root@localhost
VERBATIM]#
原文链接:http://software.intel.com/zh-cn/blogs/2009/12/15/moblin-2gstreamermp3avi/
1、机器环境,某个牌子NetBook
uname -a
Linux localhost
2.6.29.1-18.1.moblin2-netbook #1 SMP PREEMPT Fri Apr 17 17:25:17 UTC 2009 i686
i686 i386 GNU/Linux
2.播放MP3
2.1运行gst -launch filesrc location="bb.mp3" ! mad ! alsasink 报错
2.2.下载、编译、安装
gst-plugins-ugly-0.10.11及libmad-0.15.1b,需要解决一些编译问题。前者包含了系列的ugly的plugins,包括GStreamer的mad,mad依赖于libmad-0.15.1b。
2.3、运行成功。能够正确听到MP3中的音乐。
[root@localhost shallon]# gst-launch -v filesrc
location="bb.mp3" ! mad ! alsasink
Setting pipeline to PAUSED
...
/GstPipeline:pipeline0/GstMad:mad0.GstPad:src: caps = audio/x-raw-int,
endianness=(int)1234, signed=(boolean)true, width=(int)32, depth=(int)32,
rate=(int)44100, channels=(int)2
Pipeline is PREROLLING
...
/GstPipeline:pipeline0/GstAlsaSink:alsasink0.GstPad:sink: caps =
audio/x-raw-int, endianness=(int)1234, signed=(boolean)true, width=(int)32,
depth=(int)32, rate=(int)44100, channels=(int)2
Pipeline is PREROLLED
...
Setting pipeline to PLAYING ...
New clock:
GstAudioSinkClock
^CCaught interrupt -- handling interrupt.
Interrupt:
Stopping pipeline ...
Execution ended after 6135758110 ns.
Setting
pipeline to PAUSED ...
Setting pipeline to READY
...
/GstPipeline:pipeline0/GstAlsaSink:alsasink0.GstPad:sink: caps =
NULL
/GstPipeline:pipeline0/GstMad:mad0.GstPad:src: caps = NULL
Setting
pipeline to NULL ...
FREEING pipeline ...
3、播放视频文件
3.1播放视频文件出错。 gst-launch -v filesrc location="cc.avi" ! decodebin !
xvimagesink
[root@localhost VERBATIM]# gst-launch -v filesrc location="cc.avi" !
decodebin ! xvimagesink
Setting pipeline to PAUSED
...
/GstPipeline:pipeline0/GstDecodeBin:decodebin0/GstTypeFindElement:typefind.GstPad:src:
caps =
video/x-msvideo
/GstPipeline:pipeline0/GstDecodeBin:decodebin0/GstAviDemux:avidemux0.GstPad:sink:
caps = video/x-msvideo
Pipeline is PREROLLING
...
/GstPipeline:pipeline0/GstDecodeBin:decodebin0/GstQueue:queue0.GstPad:sink:
caps = audio/mpeg, mpegversion=(int)1, layer=(int)3, rate=(int)48000,
channels=(int)2,
codec_data=(buffer)010002000000800401007105
/GstPipeline:pipeline0/GstDecodeBin:decodebin0/GstQueue:queue0.GstPad:src:
caps = audio/mpeg, mpegversion=(int)1, layer=(int)3, rate=(int)48000,
channels=(int)2,
codec_data=(buffer)010002000000800401007105
/GstPipeline:pipeline0/GstDecodeBin:decodebin0/GstMPEGAudioParse:mpegaudioparse0.GstPad:sink:
caps = audio/mpeg, mpegversion=(int)1, layer=(int)3, rate=(int)48000,
channels=(int)2,
codec_data=(buffer)010002000000800401007105
/GstPipeline:pipeline0/GstDecodeBin:decodebin0/GstMPEGAudioParse:mpegaudioparse0.GstPad:src:
caps = audio/mpeg, mpegversion=(int)1, mpegaudioversion=(int)1, layer=(int)3,
rate=(int)48000, channels=(int)2,
parsed=(boolean)true
/GstPipeline:pipeline0/GstDecodeBin:decodebin0/GstMad:mad0.GstPad:sink:
caps = audio/mpeg, mpegversion=(int)1, mpegaudioversion=(int)1, layer=(int)3,
rate=(int)48000, channels=(int)2,
parsed=(boolean)true
/GstPipeline:pipeline0/GstDecodeBin:decodebin0.GstGhostPad:src0:
caps = audio/x-raw-int, endianness=(int)1234, signed=(boolean)true,
width=(int)32, depth=(int)32, rate=(int)48000,
channels=(int)2
/GstPipeline:pipeline0/GstDecodeBin:decodebin0/GstMad:mad0.GstPad:src:
caps = audio/x-raw-int, endianness=(int)1234, signed=(boolean)true,
width=(int)32, depth=(int)32, rate=(int)48000, channels=(int)2
ERROR: from
element /GstPipeline:pipeline0/GstDecodeBin:decodebin0/GstAviDemux:avidemux0:
Internal data stream error.
Additional debug info:
gstavidemux.c(4163):
gst_avi_demux_loop ():
/GstPipeline:pipeline0/GstDecodeBin:decodebin0/GstAviDemux:avidemux0:
streaming
stopped, reason not-linked
ERROR: pipeline doesn't want to
preroll.
Setting pipeline to NULL
...
/GstPipeline:pipeline0/GstDecodeBin:decodebin0.GstGhostPad:src0: caps =
NULL
/GstPipeline:pipeline0/GstDecodeBin:decodebin0.GstGhostPad:src0: caps =
NULL
/GstPipeline:pipeline0/GstDecodeBin:decodebin0/GstMad:mad0.GstPad:src:
caps =
NULL
/GstPipeline:pipeline0/GstDecodeBin:decodebin0/GstMad:mad0.GstPad:sink:
caps =
NULL
/GstPipeline:pipeline0/GstDecodeBin:decodebin0/GstMPEGAudioParse:mpegaudioparse0.GstPad:src:
caps =
NULL
/GstPipeline:pipeline0/GstDecodeBin:decodebin0/GstMPEGAudioParse:mpegaudioparse0.GstPad:sink:
caps =
NULL
/GstPipeline:pipeline0/GstDecodeBin:decodebin0/GstQueue:queue0.GstPad:src:
caps =
NULL
/GstPipeline:pipeline0/GstDecodeBin:decodebin0/GstQueue:queue0.GstPad:sink:
caps =
NULL
/GstPipeline:pipeline0/GstDecodeBin:decodebin0/GstAviDemux:avidemux0.GstPad:audio_00:
caps =
NULL
/GstPipeline:pipeline0/GstDecodeBin:decodebin0/GstAviDemux:avidemux0.GstPad:video_00:
caps =
NULL
/GstPipeline:pipeline0/GstDecodeBin:decodebin0/GstAviDemux:avidemux0.GstPad:sink:
caps =
NULL
/GstPipeline:pipeline0/GstDecodeBin:decodebin0/GstTypeFindElement:typefind.GstPad:src:
caps = NULL
FREEING pipeline ...
[root@localhost VERBATIM]#
3.2安装gst-ffmpeg-0.10.7
3.3运行gst-launch -v filesrc location="cc.avi" ! decodebin ! xvimagesink
成功看到连续的图像播放,但是无法听到声音
[root@localhost VERBATIM]# gst-launch -v filesrc location="cc.avi" !
decodebin ! xvimagesink Setting pipeline to PAUSED
...
/GstPipeline:pipeline0/GstDecodeBin:decodebin0/GstTypeFindElement:typefind.GstPad:src:
caps = video/x-msvideo
Pipeline is PREROLLING
...
/GstPipeline:pipeline0/GstDecodeBin:decodebin0/GstAviDemux:avidemux0.GstPad:sink:
caps =
video/x-msvideo
/GstPipeline:pipeline0/GstDecodeBin:decodebin0/GstQueue:queue0.GstPad:sink:
caps = video/x-divx, divxversion=(int)5, framerate=(fraction)30000/1001,
width=(int)720,
height=(int)480
/GstPipeline:pipeline0/GstDecodeBin:decodebin0/GstQueue:queue0.GstPad:src:
caps = video/x-divx, divxversion=(int)5, framerate=(fraction)30000/1001,
width=(int)720,
height=(int)480
/GstPipeline:pipeline0/GstDecodeBin:decodebin0/GstQueue:queue1.GstPad:sink:
caps = audio/mpeg, mpegversion=(int)1, layer=(int)3, rate=(int)48000,
channels=(int)2,
codec_data=(buffer)010002000000800401007105
/GstPipeline:pipeline0/GstDecodeBin:decodebin0/GstQueue:queue1.GstPad:src:
caps = audio/mpeg, mpegversion=(int)1, layer=(int)3, rate=(int)48000,
channels=(int)2,
codec_data=(buffer)010002000000800401007105
/GstPipeline:pipeline0/GstDecodeBin:decodebin0/GstMPEGAudioParse:mpegaudioparse0.GstPad:sink:
caps = audio/mpeg, mpegversion=(int)1, layer=(int)3, rate=(int)48000,
channels=(int)2,
codec_data=(buffer)010002000000800401007105
/GstPipeline:pipeline0/GstDecodeBin:decodebin0/ffdec_mpeg4:ffdec_mpeg40.GstPad:sink:
caps = video/x-divx, divxversion=(int)5, framerate=(fraction)30000/1001,
width=(int)720,
height=(int)480
/GstPipeline:pipeline0/GstDecodeBin:decodebin0.GstGhostPad:src0:
caps = video/x-raw-yuv, width=(int)720, height=(int)480,
framerate=(fraction)30000/1001, format=(fourcc)I420,
pixel-aspect-ratio=(fraction)1/1
/GstPipeline:pipeline0/GstDecodeBin:decodebin0/ffdec_mpeg4:ffdec_mpeg40.GstPad:src:
caps = video/x-raw-yuv, width=(int)720, height=(int)480,
framerate=(fraction)30000/1001, format=(fourcc)I420,
pixel-aspect-ratio=(fraction)1/1
/GstPipeline:pipeline0/GstDecodeBin:decodebin0/GstMPEGAudioParse:mpegaudioparse0.GstPad:src:
caps = audio/mpeg, mpegversion=(int)1, mpegaudioversion=(int)1, layer=(int)3,
rate=(int)48000, channels=(int)2,
parsed=(boolean)true
/GstPipeline:pipeline0/GstDecodeBin:decodebin0/GstMad:mad0.GstPad:sink:
caps = audio/mpeg, mpegversion=(int)1, mpegaudioversion=(int)1, layer=(int)3,
rate=(int)48000, channels=(int)2,
parsed=(boolean)true
/GstPipeline:pipeline0/GstDecodeBin:decodebin0.GstGhostPad:src1:
caps = audio/x-raw-int, endianness=(int)1234, signed=(boolean)true,
width=(int)32, depth=(int)32, rate=(int)48000,
channels=(int)2
/GstPipeline:pipeline0/GstDecodeBin:decodebin0/GstMad:mad0.GstPad:src:
caps = audio/x-raw-int, endianness=(int)1234, signed=(boolean)true,
width=(int)32, depth=(int)32, rate=(int)48000,
channels=(int)2
/GstPipeline:pipeline0/GstXvImageSink:xvimagesink0.GstPad:sink:
caps = video/x-raw-yuv, width=(int)720, height=(int)480,
framerate=(fraction)30000/1001, format=(fourcc)I420,
pixel-aspect-ratio=(fraction)1/1
/GstPipeline:pipeline0/GstDecodeBin:decodebin0.GstGhostPad:src0:
caps = video/x-raw-yuv, width=(int)720, height=(int)480,
framerate=(fraction)30000/1001, format=(fourcc)I420,
pixel-aspect-ratio=(fraction)1/1
/GstPipeline:pipeline0/GstDecodeBin:decodebin0.GstGhostPad:src0.GstProxyPad:proxypad1:
caps = video/x-raw-yuv, width=(int)720, height=(int)480,
framerate=(fraction)30000/1001, format=(fourcc)I420,
pixel-aspect-ratio=(fraction)1/1
Pipeline is PREROLLED ...
Setting
pipeline to PLAYING ...
New clock: GstSystemClock
ERROR: from element
/GstPipeline:pipeline0/GstXvImageSink:xvimagesink0: Output window was
closed
Additional debug info:
xvimagesink.c(1235):
gst_xvimagesink_handle_xevents ():
/GstPipeline:pipeline0/GstXvImageSink:xvimagesink0
Execution ended after
24260868050 ns.
Setting pipeline to PAUSED ...
Setting pipeline to READY
...
/GstPipeline:pipeline0/GstXvImageSink:xvimagesink0.GstPad:sink: caps =
NULL
/GstPipeline:pipeline0/GstDecodeBin:decodebin0.GstGhostPad:src1: caps =
NULL
/GstPipeline:pipeline0/GstDecodeBin:decodebin0.GstGhostPad:src0: caps =
NULL
/GstPipeline:pipeline0/GstDecodeBin:decodebin0.GstGhostPad:src1: caps =
NULL
/GstPipeline:pipeline0/GstDecodeBin:decodebin0/GstMad:mad0.GstPad:src:
caps =
NULL
/GstPipeline:pipeline0/GstDecodeBin:decodebin0/GstMad:mad0.GstPad:sink:
caps =
NULL
/GstPipeline:pipeline0/GstDecodeBin:decodebin0/GstMPEGAudioParse:mpegaudioparse0.GstPad:src:
caps =
NULL
/GstPipeline:pipeline0/GstDecodeBin:decodebin0/GstMPEGAudioParse:mpegaudioparse0.GstPad:sink:
caps =
NULL
/GstPipeline:pipeline0/GstDecodeBin:decodebin0/GstQueue:queue1.GstPad:src:
caps =
NULL
/GstPipeline:pipeline0/GstDecodeBin:decodebin0/GstQueue:queue1.GstPad:sink:
caps = NULL
/GstPipeline:pipeline0/GstDecodeBin:decodebin0.GstGhostPad:src0:
caps =
NULL
/GstPipeline:pipeline0/GstDecodeBin:decodebin0/ffdec_mpeg4:ffdec_mpeg40.GstPad:src:
caps =
NULL
/GstPipeline:pipeline0/GstDecodeBin:decodebin0/ffdec_mpeg4:ffdec_mpeg40.GstPad:sink:
caps =
NULL
/GstPipeline:pipeline0/GstDecodeBin:decodebin0/GstQueue:queue0.GstPad:src:
caps =
NULL
/GstPipeline:pipeline0/GstDecodeBin:decodebin0/GstQueue:queue0.GstPad:sink:
caps =
NULL
/GstPipeline:pipeline0/GstDecodeBin:decodebin0/GstAviDemux:avidemux0.GstPad:audio_00:
caps =
NULL
/GstPipeline:pipeline0/GstDecodeBin:decodebin0/GstAviDemux:avidemux0.GstPad:video_00:
caps =
NULL
/GstPipeline:pipeline0/GstDecodeBin:decodebin0/GstAviDemux:avidemux0.GstPad:sink:
caps =
NULL
/GstPipeline:pipeline0/GstDecodeBin:decodebin0/GstTypeFindElement:typefind.GstPad:src:
caps = NULL
Setting pipeline to NULL ...
FREEING pipeline
...
[root@localhost VERBATIM]#
3.4 使用avidemux同时播放语音和图像
[root@localhost VERBATIM]# gst-launch -v filesrc location=cc.avi ! avidemux
name=demux demux.audio_00 ! mad ! alsasink demux.video_00 ! queue ! decodebin !
ffmpegcolorspace ! videoscale ! xvimagesink
Setting pipeline to PAUSED ...
Pipeline is PREROLLING
...
/GstPipeline:pipeline0/GstQueue:queue0.GstPad:sink: caps = video/x-divx,
divxversion=(int)5, framerate=(fraction)30000/1001, width=(int)720,
height=(int)480
/GstPipeline:pipeline0/GstQueue:queue0.GstPad:src: caps =
video/x-divx, divxversion=(int)5, framerate=(fraction)30000/1001,
width=(int)720,
height=(int)480
/GstPipeline:pipeline0/GstDecodeBin:decodebin0/GstTypeFindElement:typefind.GstPad:src:
caps = video/x-divx, divxversion=(int)5, framerate=(fraction)30000/1001,
width=(int)720,
height=(int)480
/GstPipeline:pipeline0/GstMad:mad0.GstPad:sink: caps =
audio/mpeg, mpegversion=(int)1, layer=(int)3, rate=(int)48000, channels=(int)2,
codec_data=(buffer)010002000000800401007105
/GstPipeline:pipeline0/GstMad:mad0.GstPad:src:
caps = audio/x-raw-int, endianness=(int)1234, signed=(boolean)true,
width=(int)32, depth=(int)32, rate=(int)48000,
channels=(int)2
/GstPipeline:pipeline0/GstAlsaSink:alsasink0.GstPad:sink:
caps = audio/x-raw-int, endianness=(int)1234, signed=(boolean)true,
width=(int)32, depth=(int)32, rate=(int)48000,
channels=(int)2
/GstPipeline:pipeline0/GstDecodeBin:decodebin0/GstTypeFindElement:typefind.GstPad:sink:
caps = video/x-divx, divxversion=(int)5, framerate=(fraction)30000/1001,
width=(int)720,
height=(int)480
/GstPipeline:pipeline0/GstDecodeBin:decodebin0.GstGhostPad:sink:
caps = video/x-divx, divxversion=(int)5, framerate=(fraction)30000/1001,
width=(int)720,
height=(int)480
/GstPipeline:pipeline0/GstDecodeBin:decodebin0.GstGhostPad:sink:
caps = video/x-divx, divxversion=(int)5, framerate=(fraction)30000/1001,
width=(int)720,
height=(int)480
/GstPipeline:pipeline0/GstDecodeBin:decodebin0.GstGhostPad:sink.GstProxyPad:proxypad0:
caps = video/x-divx, divxversion=(int)5, framerate=(fraction)30000/1001,
width=(int)720,
height=(int)480
/GstPipeline:pipeline0/GstDecodeBin:decodebin0/ffdec_mpeg4:ffdec_mpeg40.GstPad:sink:
caps = video/x-divx, divxversion=(int)5, framerate=(fraction)30000/1001,
width=(int)720,
height=(int)480
/GstPipeline:pipeline0/GstDecodeBin:decodebin0.GstGhostPad:src0:
caps = video/x-raw-yuv, width=(int)720, height=(int)480,
framerate=(fraction)30000/1001, format=(fourcc)I420,
pixel-aspect-ratio=(fraction)1/1
/GstPipeline:pipeline0/GstDecodeBin:decodebin0/ffdec_mpeg4:ffdec_mpeg40.GstPad:src:
caps = video/x-raw-yuv, width=(int)720, height=(int)480,
framerate=(fraction)30000/1001, format=(fourcc)I420,
pixel-aspect-ratio=(fraction)1/1
/GstPipeline:pipeline0/GstFFMpegCsp:ffmpegcsp0.GstPad:src:
caps = video/x-raw-yuv, width=(int)720, height=(int)480,
framerate=(fraction)30000/1001, format=(fourcc)I420,
pixel-aspect-ratio=(fraction)1/1
/GstPipeline:pipeline0/GstFFMpegCsp:ffmpegcsp0.GstPad:sink:
caps = video/x-raw-yuv, width=(int)720, height=(int)480,
framerate=(fraction)30000/1001, format=(fourcc)I420,
pixel-aspect-ratio=(fraction)1/1
/GstPipeline:pipeline0/GstDecodeBin:decodebin0.GstGhostPad:src0:
caps = video/x-raw-yuv, width=(int)720, height=(int)480,
framerate=(fraction)30000/1001, format=(fourcc)I420,
pixel-aspect-ratio=(fraction)1/1
/GstPipeline:pipeline0/GstDecodeBin:decodebin0.GstGhostPad:src0.GstProxyPad:proxypad1:
caps = video/x-raw-yuv, width=(int)720, height=(int)480,
framerate=(fraction)30000/1001, format=(fourcc)I420,
pixel-aspect-ratio=(fraction)1/1
/GstPipeline:pipeline0/GstVideoScale:videoscale0.GstPad:src:
caps = video/x-raw-yuv, width=(int)720, height=(int)480,
framerate=(fraction)30000/1001, format=(fourcc)I420,
pixel-aspect-ratio=(fraction)1/1
/GstPipeline:pipeline0/GstVideoScale:videoscale0.GstPad:sink:
caps = video/x-raw-yuv, width=(int)720, height=(int)480,
framerate=(fraction)30000/1001, format=(fourcc)I420,
pixel-aspect-ratio=(fraction)1/1
/GstPipeline:pipeline0/GstXvImageSink:xvimagesink0.GstPad:sink:
caps = video/x-raw-yuv, width=(int)720, height=(int)480,
framerate=(fraction)30000/1001, format=(fourcc)I420,
pixel-aspect-ratio=(fraction)1/1
Pipeline is PREROLLED ...
Setting
pipeline to PLAYING ...
New clock: GstAudioSinkClock
ERROR: from element
/GstPipeline:pipeline0/GstXvImageSink:xvimagesink0: Output window was
closed
Additional debug info:
xvimagesink.c(1235):
gst_xvimagesink_handle_xevents ():
/GstPipeline:pipeline0/GstXvImageSink:xvimagesink0
Execution ended after
40043404401 ns.
Setting pipeline to PAUSED ...
Setting pipeline to READY
...
/GstPipeline:pipeline0/GstXvImageSink:xvimagesink0.GstPad:sink: caps =
NULL
/GstPipeline:pipeline0/GstAlsaSink:alsasink0.GstPad:sink: caps =
NULL
/GstPipeline:pipeline0/GstVideoScale:videoscale0.GstPad:src: caps =
NULL
/GstPipeline:pipeline0/GstVideoScale:videoscale0.GstPad:sink: caps =
NULL
/GstPipeline:pipeline0/GstMad:mad0.GstPad:src: caps =
NULL
/GstPipeline:pipeline0/GstMad:mad0.GstPad:sink: caps =
NULL
/GstPipeline:pipeline0/GstFFMpegCsp:ffmpegcsp0.GstPad:src: caps =
NULL
/GstPipeline:pipeline0/GstFFMpegCsp:ffmpegcsp0.GstPad:sink: caps =
NULL
/GstPipeline:pipeline0/GstDecodeBin:decodebin0.GstGhostPad:src0: caps =
NULL
/GstPipeline:pipeline0/GstDecodeBin:decodebin0.GstGhostPad:src0: caps =
NULL
/GstPipeline:pipeline0/GstDecodeBin:decodebin0/ffdec_mpeg4:ffdec_mpeg40.GstPad:src:
caps =
NULL
/GstPipeline:pipeline0/GstDecodeBin:decodebin0/ffdec_mpeg4:ffdec_mpeg40.GstPad:sink:
caps =
NULL
/GstPipeline:pipeline0/GstDecodeBin:decodebin0/GstTypeFindElement:typefind.GstPad:src:
caps =
NULL
/GstPipeline:pipeline0/GstDecodeBin:decodebin0/GstTypeFindElement:typefind.GstPad:sink:
caps = NULL
/GstPipeline:pipeline0/GstDecodeBin:decodebin0.GstGhostPad:sink:
caps = NULL
/GstPipeline:pipeline0/GstQueue:queue0.GstPad:src: caps =
NULL
/GstPipeline:pipeline0/GstQueue:queue0.GstPad:sink: caps =
NULL
/GstPipeline:pipeline0/GstAviDemux:demux.GstPad:audio_00: caps =
NULL
/GstPipeline:pipeline0/GstAviDemux:demux.GstPad:video_00: caps =
NULL
Setting pipeline to NULL ...
FREEING pipeline ...
[root@localhost
VERBATIM]#
3.5 使用avidemux同时播放语音和图像,所谓的gst-launch 的{} 能够使{}中间部分运行在单独的线程中。
[root@localhost VERBATIM]# gst-launch -v filesrc location=cc.avi ! avidemux
name=demux demux.audio_00 ! mad ! alsasink {demux.video_00 ! queue ! decodebin !
ffmpegcolorspace ! videoscale ! xvimagesink}
Setting pipeline to PAUSED ...
Pipeline is PREROLLING
...
/GstPipeline:pipeline0/GstQueue:queue0.GstPad:sink: caps = video/x-divx,
divxversion=(int)5, framerate=(fraction)30000/1001, width=(int)720,
height=(int)480
/GstPipeline:pipeline0/GstQueue:queue0.GstPad:src: caps =
video/x-divx, divxversion=(int)5, framerate=(fraction)30000/1001,
width=(int)720,
height=(int)480
/GstPipeline:pipeline0/GstDecodeBin:decodebin0/GstTypeFindElement:typefind.GstPad:src:
caps = video/x-divx, divxversion=(int)5, framerate=(fraction)30000/1001,
width=(int)720,
height=(int)480
/GstPipeline:pipeline0/GstMad:mad0.GstPad:sink: caps =
audio/mpeg, mpegversion=(int)1, layer=(int)3, rate=(int)48000, channels=(int)2,
codec_data=(buffer)010002000000800401007105
/GstPipeline:pipeline0/GstMad:mad0.GstPad:src:
caps = audio/x-raw-int, endianness=(int)1234, signed=(boolean)true,
width=(int)32, depth=(int)32, rate=(int)48000,
channels=(int)2
/GstPipeline:pipeline0/GstAlsaSink:alsasink0.GstPad:sink:
caps = audio/x-raw-int, endianness=(int)1234, signed=(boolean)true,
width=(int)32, depth=(int)32, rate=(int)48000,
channels=(int)2
/GstPipeline:pipeline0/GstDecodeBin:decodebin0/GstTypeFindElement:typefind.GstPad:sink:
caps = video/x-divx, divxversion=(int)5, framerate=(fraction)30000/1001,
width=(int)720,
height=(int)480
/GstPipeline:pipeline0/GstDecodeBin:decodebin0.GstGhostPad:sink:
caps = video/x-divx, divxversion=(int)5, framerate=(fraction)30000/1001,
width=(int)720,
height=(int)480
/GstPipeline:pipeline0/GstDecodeBin:decodebin0.GstGhostPad:sink:
caps = video/x-divx, divxversion=(int)5, framerate=(fraction)30000/1001,
width=(int)720,
height=(int)480
/GstPipeline:pipeline0/GstDecodeBin:decodebin0.GstGhostPad:sink.GstProxyPad:proxypad0:
caps = video/x-divx, divxversion=(int)5, framerate=(fraction)30000/1001,
width=(int)720,
height=(int)480
/GstPipeline:pipeline0/GstDecodeBin:decodebin0/ffdec_mpeg4:ffdec_mpeg40.GstPad:sink:
caps = video/x-divx, divxversion=(int)5, framerate=(fraction)30000/1001,
width=(int)720,
height=(int)480
/GstPipeline:pipeline0/GstDecodeBin:decodebin0.GstGhostPad:src0:
caps = video/x-raw-yuv, width=(int)720, height=(int)480,
framerate=(fraction)30000/1001, format=(fourcc)I420,
pixel-aspect-ratio=(fraction)1/1
/GstPipeline:pipeline0/GstDecodeBin:decodebin0/ffdec_mpeg4:ffdec_mpeg40.GstPad:src:
caps = video/x-raw-yuv, width=(int)720, height=(int)480,
framerate=(fraction)30000/1001, format=(fourcc)I420,
pixel-aspect-ratio=(fraction)1/1
/GstPipeline:pipeline0/GstFFMpegCsp:ffmpegcsp0.GstPad:src:
caps = video/x-raw-yuv, width=(int)720, height=(int)480,
framerate=(fraction)30000/1001, format=(fourcc)I420,
pixel-aspect-ratio=(fraction)1/1
/GstPipeline:pipeline0/GstFFMpegCsp:ffmpegcsp0.GstPad:sink:
caps = video/x-raw-yuv, width=(int)720, height=(int)480,
framerate=(fraction)30000/1001, format=(fourcc)I420,
pixel-aspect-ratio=(fraction)1/1
/GstPipeline:pipeline0/GstDecodeBin:decodebin0.GstGhostPad:src0:
caps = video/x-raw-yuv, width=(int)720, height=(int)480,
framerate=(fraction)30000/1001, format=(fourcc)I420,
pixel-aspect-ratio=(fraction)1/1
/GstPipeline:pipeline0/GstDecodeBin:decodebin0.GstGhostPad:src0.GstProxyPad:proxypad1:
caps = video/x-raw-yuv, width=(int)720, height=(int)480,
framerate=(fraction)30000/1001, format=(fourcc)I420,
pixel-aspect-ratio=(fraction)1/1
/GstPipeline:pipeline0/GstVideoScale:videoscale0.GstPad:src:
caps = video/x-raw-yuv, width=(int)720, height=(int)480,
framerate=(fraction)30000/1001, format=(fourcc)I420,
pixel-aspect-ratio=(fraction)1/1
/GstPipeline:pipeline0/GstVideoScale:videoscale0.GstPad:sink:
caps = video/x-raw-yuv, width=(int)720, height=(int)480,
framerate=(fraction)30000/1001, format=(fourcc)I420,
pixel-aspect-ratio=(fraction)1/1
/GstPipeline:pipeline0/GstXvImageSink:xvimagesink0.GstPad:sink:
caps = video/x-raw-yuv, width=(int)720, height=(int)480,
framerate=(fraction)30000/1001, format=(fourcc)I420,
pixel-aspect-ratio=(fraction)1/1
Pipeline is PREROLLED ...
Setting
pipeline to PLAYING ...
New clock: GstAudioSinkClock
ERROR: from element
/GstPipeline:pipeline0/GstXvImageSink:xvimagesink0: Output window was
closed
Additional debug info:
xvimagesink.c(1235):
gst_xvimagesink_handle_xevents ():
/GstPipeline:pipeline0/GstXvImageSink:xvimagesink0
Execution ended after
14081223436 ns.
Setting pipeline to PAUSED ...
Setting pipeline to READY
...
/GstPipeline:pipeline0/GstXvImageSink:xvimagesink0.GstPad:sink: caps =
NULL
/GstPipeline:pipeline0/GstAlsaSink:alsasink0.GstPad:sink: caps =
NULL
/GstPipeline:pipeline0/GstVideoScale:videoscale0.GstPad:src: caps =
NULL
/GstPipeline:pipeline0/GstVideoScale:videoscale0.GstPad:sink: caps =
NULL
/GstPipeline:pipeline0/GstMad:mad0.GstPad:src: caps =
NULL
/GstPipeline:pipeline0/GstMad:mad0.GstPad:sink: caps =
NULL
/GstPipeline:pipeline0/GstFFMpegCsp:ffmpegcsp0.GstPad:src: caps =
NULL
/GstPipeline:pipeline0/GstFFMpegCsp:ffmpegcsp0.GstPad:sink: caps =
NULL
/GstPipeline:pipeline0/GstDecodeBin:decodebin0.GstGhostPad:src0: caps =
NULL
/GstPipeline:pipeline0/GstDecodeBin:decodebin0.GstGhostPad:src0: caps =
NULL
/GstPipeline:pipeline0/GstDecodeBin:decodebin0/ffdec_mpeg4:ffdec_mpeg40.GstPad:src:
caps =
NULL
/GstPipeline:pipeline0/GstDecodeBin:decodebin0/ffdec_mpeg4:ffdec_mpeg40.GstPad:sink:
caps =
NULL
/GstPipeline:pipeline0/GstDecodeBin:decodebin0/GstTypeFindElement:typefind.GstPad:src:
caps =
NULL
/GstPipeline:pipeline0/GstDecodeBin:decodebin0/GstTypeFindElement:typefind.GstPad:sink:
caps = NULL
/GstPipeline:pipeline0/GstDecodeBin:decodebin0.GstGhostPad:sink:
caps = NULL
/GstPipeline:pipeline0/GstQueue:queue0.GstPad:src: caps =
NULL
/GstPipeline:pipeline0/GstQueue:queue0.GstPad:sink: caps =
NULL
/GstPipeline:pipeline0/GstAviDemux:demux.GstPad:audio_00: caps =
NULL
/GstPipeline:pipeline0/GstAviDemux:demux.GstPad:video_00: caps =
NULL
Setting pipeline to NULL ...
FREEING pipeline ...
[root@localhost
VERBATIM]#
原文链接:http://software.intel.com/zh-cn/blogs/2009/12/15/moblin-2gstreamermp3avi/
相关文章推荐
- 记录:继续探索moblin 2上的GSTREAMER:播放MP3及AVI文件
- Fedora 8 播放 mp3, 与 rmvb, rm,avi等格式文件的解决办法
- xubuntu播放mp3 avi flash等多媒体文件
- Gstreamer 测试udpsink udpsrc播放mp3文件
- Fedora 8 播放 mp3, 与 rmvb, rm,avi等格式文件的解决办法
- 一个问题的探索——pygame里能播放哪些MP3文件
- Fedora 8 播放 mp3, 与 rmvb, rm,avi等格式文件的解决办法
- 将MP3文件嵌入到exe中并播放
- python播放mp3文件
- 如何使用Quartz库播放MP3歌曲文件
- 关于Windows Media Player 不能播放 动态VBR编码的mp3文件
- 用mciSendString制作可播放MPEG,AVI,WAV,MP3等的播放器
- 用mciSendString制作可播放MPEG,AVI,WAV,MP3等的播放器
- 用VB播放Avi、Wave、midi文件
- xcode 中用AvAudioPlayer播放mp3文件
- 使用openal与mpg123播放MP3,附带工程文件(转)
- qt5播放mp3文件遇到问题及解决方法
- Java编程实现获取mp3时长及播放mp3文件的方法
- Dive Into Python 学习记录3-对获取某文件夹下MP3文件信息的代码构成分析
- 文件的下载与保存,以及mp3文件的播放