如何在gstreamer中播放没有playbin2的.flv(h.264 aac)文件?

时间:2012-10-22 10:32:40

标签: flv h.264 gstreamer gst-launch

我有一个FLV文件,gstreamer playbin2可以正常工作,但如果我尝试手动构建管道,结果是否定的。

有人能告诉我管道有什么问题吗?或者,如何构建管线以正确播放FLV文件而不使用playbin2?

目标FLV文件也会上传到Dropbox,网址为:

https://dl.dropbox.com/u/5391695/1.flv

我尝试查看playbin2方法生成的点文件,请在

查看

https://dl.dropbox.com/u/5391695/playbin2.png

以下命令1,2都可以工作,但命令3,4根本不起作用。

1。来自gst-discover的媒体信息

gst-discoverer-0.10 1.flv 
Analyzing file:///home/gst/debug/1.flv
Done discovering file:///home/gst/debug/1.flv

Topology:
  container: Flash
    audio: MPEG-4 AAC
    video: H.264

Properties:
  Duration: 0:11:31.762000000
  Seekable: yes
  Tags: 
      duration: 691762000000
      encoder: PFree FLV Lib
      video codec: H.264
      audio codec: MPEG-4 AAC

2。 playbin2

gst-launch-0.10 -v playbin2 uri=file:///home/gst/debug/1.flv
Setting pipeline to PAUSED ...
/GstPlayBin2:playbin20/GstURIDecodeBin:uridecodebin0: ring-buffer-max-size = 0
/GstPlayBin2:playbin20/GstURIDecodeBin:uridecodebin0: buffer-size = -1
/GstPlayBin2:playbin20/GstURIDecodeBin:uridecodebin0: buffer-duration = -1
/GstPlayBin2:playbin20/GstURIDecodeBin:uridecodebin0: use-buffering = FALSE
/GstPlayBin2:playbin20/GstURIDecodeBin:uridecodebin0: download = FALSE
/GstPlayBin2:playbin20/GstURIDecodeBin:uridecodebin0: uri = "file:///home/gst/debug/1.flv"
/GstPlayBin2:playbin20/GstURIDecodeBin:uridecodebin0: connection-speed = 0
/GstPlayBin2:playbin20/GstURIDecodeBin:uridecodebin0: source = (GstFileSrc) source
/GstPlayBin2:playbin20/GstURIDecodeBin:uridecodebin0/GstDecodeBin2:decodebin20/GstTypeFindElement:typefind.GstPad:src: caps = video/x-flv
Pipeline is PREROLLING ...
/GstPlayBin2:playbin20/GstURIDecodeBin:uridecodebin0/GstDecodeBin2:decodebin20/GstFlvDemux:flvdemux0.GstPad:sink: caps = video/x-flv
/GstPlayBin2:playbin20/GstURIDecodeBin:uridecodebin0/GstDecodeBin2:decodebin20/GstFlvDemux:flvdemux0.GstPad:video: caps = video/x-h264, stream-format=(string)avc, pixel-aspect-ratio=(fraction)1/1, width=(int)33, height=(int)10, framerate=(fraction)15/1, codec_data=(buffer)014d401fffe10019674d401f9661404012d80880000003008000000f478c18c54001000468eebc80
/GstPlayBin2:playbin20/GstURIDecodeBin:uridecodebin0/GstDecodeBin2:decodebin20/GstMultiQueue:multiqueue0: max-size-buffers = 5
/GstPlayBin2:playbin20/GstURIDecodeBin:uridecodebin0/GstDecodeBin2:decodebin20/GstMultiQueue:multiqueue0: max-size-time = 0
/GstPlayBin2:playbin20/GstURIDecodeBin:uridecodebin0/GstDecodeBin2:decodebin20/GstMultiQueue:multiqueue0: max-size-bytes = 2097152
/GstPlayBin2:playbin20/GstURIDecodeBin:uridecodebin0/GstDecodeBin2:decodebin20/GstFlvDemux:flvdemux0.GstPad:audio: caps = audio/mpeg, mpegversion=(int)4, framed=(boolean)true, stream-format=(string)raw, rate=(int)22050, channels=(int)2, codec_data=(buffer)139056e5a54800
/GstPlayBin2:playbin20/GstURIDecodeBin:uridecodebin0/GstDecodeBin2:decodebin20/GstMultiQueue:multiqueue0.GstPad:sink0: caps = video/x-h264, stream-format=(string)avc, pixel-aspect-ratio=(fraction)1/1, width=(int)33, height=(int)10, framerate=(fraction)15/1, codec_data=(buffer)014d401fffe10019674d401f9661404012d80880000003008000000f478c18c54001000468eebc80
/GstPlayBin2:playbin20/GstURIDecodeBin:uridecodebin0/GstDecodeBin2:decodebin20/GstMultiQueue:multiqueue0.GstPad:sink1: caps = audio/mpeg, mpegversion=(int)4, framed=(boolean)true, stream-format=(string)raw, rate=(int)22050, channels=(int)2, codec_data=(buffer)139056e5a54800
/GstPlayBin2:playbin20/GstURIDecodeBin:uridecodebin0/GstDecodeBin2:decodebin20/GstMultiQueue:multiqueue0.GstPad:sink1: caps = audio/mpeg, mpegversion=(int)4, framed=(boolean)true, stream-format=(string)raw, rate=(int)22050, channels=(int)2, codec_data=(buffer)139056e5a54800
/GstPlayBin2:playbin20/GstURIDecodeBin:uridecodebin0/GstDecodeBin2:decodebin20/GstMultiQueue:multiqueue0.GstPad:src1: caps = audio/mpeg, mpegversion=(int)4, framed=(boolean)true, stream-format=(string)raw, rate=(int)22050, channels=(int)2, codec_data=(buffer)139056e5a54800
/GstPlayBin2:playbin20/GstURIDecodeBin:uridecodebin0/GstDecodeBin2:decodebin20/GstH264Parse:h264parse0.GstPad:src: caps = video/x-h264, stream-format=(string)avc, pixel-aspect-ratio=(fraction)1/1, width=(int)512, height=(int)288, framerate=(fraction)15/1, codec_data=(buffer)014d401fffe10019674d401f9661404012d80880000003008000000f478c18c54001000468eebc80, parsed=(boolean)true, alignment=(string)au
/GstPlayBin2:playbin20/GstURIDecodeBin:uridecodebin0/GstDecodeBin2:decodebin20/GstH264Parse:h264parse0.GstPad:sink: caps = video/x-h264, stream-format=(string)avc, pixel-aspect-ratio=(fraction)1/1, width=(int)33, height=(int)10, framerate=(fraction)15/1, codec_data=(buffer)014d401fffe10019674d401f9661404012d80880000003008000000f478c18c54001000468eebc80
/GstPlayBin2:playbin20/GstURIDecodeBin:uridecodebin0/GstDecodeBin2:decodebin20/GstAacParse:aacparse0.GstPad:src: caps = audio/mpeg, mpegversion=(int)4, framed=(boolean)true, stream-format=(string)raw, rate=(int)22050, channels=(int)2, codec_data=(buffer)139056e5a54800
/GstPlayBin2:playbin20/GstURIDecodeBin:uridecodebin0/GstDecodeBin2:decodebin20/GstAacParse:aacparse0.GstPad:sink: caps = audio/mpeg, mpegversion=(int)4, framed=(boolean)true, stream-format=(string)raw, rate=(int)22050, channels=(int)2, codec_data=(buffer)139056e5a54800
/GstPlayBin2:playbin20/GstURIDecodeBin:uridecodebin0/GstDecodeBin2:decodebin20/GstFaad:faad0.GstPad:sink: caps = audio/mpeg, mpegversion=(int)4, framed=(boolean)true, stream-format=(string)raw, rate=(int)22050, channels=(int)2, codec_data=(buffer)139056e5a54800
/GstPlayBin2:playbin20/GstURIDecodeBin:uridecodebin0/GstDecodeBin2:decodebin20/GstFaad:faad0.GstPad:src: caps = audio/x-raw-int, endianness=(int)1234, signed=(boolean)true, width=(int)16, depth=(int)16, rate=(int)44100, channels=(int)2
/GstPlayBin2:playbin20/GstURIDecodeBin:uridecodebin0/GstDecodeBin2:decodebin20/GstCapsFilter:capsfilter0.GstPad:src: caps = video/x-h264, stream-format=(string)avc, pixel-aspect-ratio=(fraction)1/1, width=(int)512, height=(int)288, framerate=(fraction)15/1, codec_data=(buffer)014d401fffe10019674d401f9661404012d80880000003008000000f478c18c54001000468eebc80, parsed=(boolean)true, alignment=(string)au
/GstPlayBin2:playbin20/GstURIDecodeBin:uridecodebin0/GstDecodeBin2:decodebin20/GstCapsFilter:capsfilter0.GstPad:sink: caps = video/x-h264, stream-format=(string)avc, pixel-aspect-ratio=(fraction)1/1, width=(int)512, height=(int)288, framerate=(fraction)15/1, codec_data=(buffer)014d401fffe10019674d401f9661404012d80880000003008000000f478c18c54001000468eebc80, parsed=(boolean)true, alignment=(string)au
/GstPlayBin2:playbin20/GstURIDecodeBin:uridecodebin0/GstDecodeBin2:decodebin20/GstMultiQueue:multiqueue0: max-size-buffers = 5
/GstPlayBin2:playbin20/GstURIDecodeBin:uridecodebin0/GstDecodeBin2:decodebin20/GstMultiQueue:multiqueue0: max-size-time = 0
/GstPlayBin2:playbin20/GstURIDecodeBin:uridecodebin0/GstDecodeBin2:decodebin20/GstMultiQueue:multiqueue0: max-size-bytes = 2097152
/GstPlayBin2:playbin20/GstInputSelector:inputselector0.GstSelectorPad:sink0: always-ok = FALSE
/GstPlayBin2:playbin20/GstInputSelector:inputselector1.GstSelectorPad:sink0: always-ok = FALSE
/GstPlayBin2:playbin20/GstInputSelector:inputselector1: active-pad = (GstSelectorPad) sink0
/GstPlayBin2:playbin20/GstInputSelector:inputselector0: active-pad = (GstSelectorPad) sink0
/GstPlayBin2:playbin20/GstInputSelector:inputselector0.GstSelectorPad:sink0: tags = ((GstTagList*) 0xb5828cb0)
/GstPlayBin2:playbin20/GstPlaySink:playsink/GstBin:abin/GstAutoAudioSink:audiosink/GstPulseSink:audiosink-actual-sink-pulse: ts-offset = 0
/GstPlayBin2:playbin20/GstPlaySink:playsink/GstBin:vbin/GstAutoVideoSink:videosink/GstXImageSink:videosink-actual-sink-ximage: ts-offset = 0
/GstPlayBin2:playbin20/GstURIDecodeBin:uridecodebin0/GstDecodeBin2:decodebin20/ffdec_h264:ffdec_h2640.GstPad:sink: caps = video/x-h264, stream-format=(string)avc, pixel-aspect-ratio=(fraction)1/1, width=(int)512, height=(int)288, framerate=(fraction)15/1, codec_data=(buffer)014d401fffe10019674d401f9661404012d80880000003008000000f478c18c54001000468eebc80, parsed=(boolean)true, alignment=(string)au
/GstPlayBin2:playbin20/GstPlaySink:playsink/GstTee:audiotee: alloc-pad = (GstPad) src0
/GstPlayBin2:playbin20/GstInputSelector:inputselector1.GstSelectorPad:sink0: tags = ((GstTagList*) 0xb4e30e90)
/GstPlayBin2:playbin20/GstURIDecodeBin:uridecodebin0/GstDecodeBin2:decodebin20.GstDecodePad:src1: caps = audio/x-raw-int, endianness=(int)1234, signed=(boolean)true, width=(int)16, depth=(int)16, rate=(int)44100, channels=(int)2
/GstPlayBin2:playbin20/GstURIDecodeBin:uridecodebin0/GstDecodeBin2:decodebin20.GstDecodePad:src1.GstProxyPad:proxypad8: caps = audio/x-raw-int, endianness=(int)1234, signed=(boolean)true, width=(int)16, depth=(int)16, rate=(int)44100, channels=(int)2
/GstPlayBin2:playbin20/GstURIDecodeBin:uridecodebin0.GstGhostPad:src1: caps = audio/x-raw-int, endianness=(int)1234, signed=(boolean)true, width=(int)16, depth=(int)16, rate=(int)44100, channels=(int)2
/GstPlayBin2:playbin20/GstURIDecodeBin:uridecodebin0.GstGhostPad:src1.GstProxyPad:proxypad11: caps = audio/x-raw-int, endianness=(int)1234, signed=(boolean)true, width=(int)16, depth=(int)16, rate=(int)44100, channels=(int)2
/GstPlayBin2:playbin20/GstInputSelector:inputselector1.GstSelectorPad:sink0: caps = audio/x-raw-int, endianness=(int)1234, signed=(boolean)true, width=(int)16, depth=(int)16, rate=(int)44100, channels=(int)2
/GstPlayBin2:playbin20/GstInputSelector:inputselector1.GstPad:src: caps = audio/x-raw-int, endianness=(int)1234, signed=(boolean)true, width=(int)16, depth=(int)16, rate=(int)44100, channels=(int)2
/GstPlayBin2:playbin20/GstPlaySink:playsink.GstGhostPad:audio_sink: caps = audio/x-raw-int, endianness=(int)1234, signed=(boolean)true, width=(int)16, depth=(int)16, rate=(int)44100, channels=(int)2
/GstPlayBin2:playbin20/GstPlaySink:playsink.GstGhostPad:audio_sink.GstProxyPad:proxypad12: caps = audio/x-raw-int, endianness=(int)1234, signed=(boolean)true, width=(int)16, depth=(int)16, rate=(int)44100, channels=(int)2
/GstPlayBin2:playbin20/GstPlaySink:playsink.GstGhostPad:audio_sink: caps = audio/x-raw-int, endianness=(int)1234, signed=(boolean)true, width=(int)16, depth=(int)16, rate=(int)44100, channels=(int)2
/GstPlayBin2:playbin20/GstPlaySink:playsink/GstTee:audiotee.GstPad:sink: caps = audio/x-raw-int, endianness=(int)1234, signed=(boolean)true, width=(int)16, depth=(int)16, rate=(int)44100, channels=(int)2
/GstPlayBin2:playbin20/GstPlaySink:playsink/GstTee:audiotee.GstPad:src0: caps = audio/x-raw-int, endianness=(int)1234, signed=(boolean)true, width=(int)16, depth=(int)16, rate=(int)44100, channels=(int)2
/GstPlayBin2:playbin20/GstPlaySink:playsink/GstTee:audiotee.GstPad:sink: caps = audio/x-raw-int, endianness=(int)1234, signed=(boolean)true, width=(int)16, depth=(int)16, rate=(int)44100, channels=(int)2
/GstPlayBin2:playbin20/GstPlaySink:playsink/GstStreamSynchronizer:streamsynchronizer0.GstPad:sink_1: caps = audio/x-raw-int, endianness=(int)1234, signed=(boolean)true, width=(int)16, depth=(int)16, rate=(int)44100, channels=(int)2
/GstPlayBin2:playbin20/GstPlaySink:playsink/GstStreamSynchronizer:streamsynchronizer0.GstPad:src_1: caps = audio/x-raw-int, endianness=(int)1234, signed=(boolean)true, width=(int)16, depth=(int)16, rate=(int)44100, channels=(int)2
/GstPlayBin2:playbin20/GstPlaySink:playsink/GstBin:abin.GstGhostPad:sink: caps = audio/x-raw-int, endianness=(int)1234, signed=(boolean)true, width=(int)16, depth=(int)16, rate=(int)44100, channels=(int)2
/GstPlayBin2:playbin20/GstPlaySink:playsink/GstBin:abin.GstGhostPad:sink.GstProxyPad:proxypad21: caps = audio/x-raw-int, endianness=(int)1234, signed=(boolean)true, width=(int)16, depth=(int)16, rate=(int)44100, channels=(int)2
/GstPlayBin2:playbin20/GstPlaySink:playsink/GstBin:abin.GstGhostPad:sink: caps = audio/x-raw-int, endianness=(int)1234, signed=(boolean)true, width=(int)16, depth=(int)16, rate=(int)44100, channels=(int)2
/GstPlayBin2:playbin20/GstPlaySink:playsink/GstBin:abin/GstQueue:aqueue.GstPad:sink: caps = audio/x-raw-int, endianness=(int)1234, signed=(boolean)true, width=(int)16, depth=(int)16, rate=(int)44100, channels=(int)2
/GstPlayBin2:playbin20/GstPlaySink:playsink/GstBin:abin/GstQueue:aqueue.GstPad:src: caps = audio/x-raw-int, endianness=(int)1234, signed=(boolean)true, width=(int)16, depth=(int)16, rate=(int)44100, channels=(int)2
/GstPlayBin2:playbin20/GstPlaySink:playsink/GstBin:abin/GstPlaySinkAudioConvert:aconv.GstGhostPad:sink: caps = audio/x-raw-int, endianness=(int)1234, signed=(boolean)true, width=(int)16, depth=(int)16, rate=(int)44100, channels=(int)2
/GstPlayBin2:playbin20/GstPlaySink:playsink/GstBin:abin/GstPlaySinkAudioConvert:aconv.GstGhostPad:sink.GstProxyPad:proxypad19: caps = audio/x-raw-int, endianness=(int)1234, signed=(boolean)true, width=(int)16, depth=(int)16, rate=(int)44100, channels=(int)2
/GstPlayBin2:playbin20/GstPlaySink:playsink/GstBin:abin/GstPlaySinkAudioConvert:aconv.GstGhostPad:sink: caps = audio/x-raw-int, endianness=(int)1234, signed=(boolean)true, width=(int)16, depth=(int)16, rate=(int)44100, channels=(int)2
/GstPlayBin2:playbin20/GstPlaySink:playsink/GstBin:abin/GstPlaySinkAudioConvert:aconv/GstAudioConvert:conv.GstPad:src: caps = audio/x-raw-int, endianness=(int)1234, signed=(boolean)true, width=(int)16, depth=(int)16, rate=(int)44100, channels=(int)2
/GstPlayBin2:playbin20/GstPlaySink:playsink/GstBin:abin/GstPlaySinkAudioConvert:aconv/GstAudioConvert:conv.GstPad:sink: caps = audio/x-raw-int, endianness=(int)1234, signed=(boolean)true, width=(int)16, depth=(int)16, rate=(int)44100, channels=(int)2
/GstPlayBin2:playbin20/GstPlaySink:playsink/GstBin:abin/GstPlaySinkAudioConvert:aconv/GstAudioResample:resample.GstPad:src: caps = audio/x-raw-int, endianness=(int)1234, signed=(boolean)true, width=(int)16, depth=(int)16, rate=(int)44100, channels=(int)2
/GstPlayBin2:playbin20/GstPlaySink:playsink/GstBin:abin/GstPlaySinkAudioConvert:aconv/GstAudioResample:resample.GstPad:sink: caps = audio/x-raw-int, endianness=(int)1234, signed=(boolean)true, width=(int)16, depth=(int)16, rate=(int)44100, channels=(int)2
/GstPlayBin2:playbin20/GstPlaySink:playsink/GstBin:abin/GstPlaySinkAudioConvert:aconv.GstGhostPad:src: caps = audio/x-raw-int, endianness=(int)1234, signed=(boolean)true, width=(int)16, depth=(int)16, rate=(int)44100, channels=(int)2
/GstPlayBin2:playbin20/GstPlaySink:playsink/GstBin:abin/GstPlaySinkAudioConvert:aconv.GstGhostPad:src.GstProxyPad:proxypad20: caps = audio/x-raw-int, endianness=(int)1234, signed=(boolean)true, width=(int)16, depth=(int)16, rate=(int)44100, channels=(int)2
/GstPlayBin2:playbin20/GstPlaySink:playsink/GstBin:abin/GstAutoAudioSink:audiosink.GstGhostPad:sink: caps = audio/x-raw-int, endianness=(int)1234, signed=(boolean)true, width=(int)16, depth=(int)16, rate=(int)44100, channels=(int)2
/GstPlayBin2:playbin20/GstPlaySink:playsink/GstBin:abin/GstAutoAudioSink:audiosink.GstGhostPad:sink.GstProxyPad:proxypad18: caps = audio/x-raw-int, endianness=(int)1234, signed=(boolean)true, width=(int)16, depth=(int)16, rate=(int)44100, channels=(int)2
/GstPlayBin2:playbin20/GstPlaySink:playsink/GstBin:abin/GstAutoAudioSink:audiosink.GstGhostPad:sink: caps = audio/x-raw-int, endianness=(int)1234, signed=(boolean)true, width=(int)16, depth=(int)16, rate=(int)44100, channels=(int)2
/GstPlayBin2:playbin20/GstPlaySink:playsink/GstBin:abin/GstAutoAudioSink:audiosink/GstPulseSink:audiosink-actual-sink-pulse.GstPad:sink: caps = audio/x-raw-int, endianness=(int)1234, signed=(boolean)true, width=(int)16, depth=(int)16, rate=(int)44100, channels=(int)2
/GstPlayBin2:playbin20/GstURIDecodeBin:uridecodebin0/GstDecodeBin2:decodebin20/ffdec_h264:ffdec_h2640.GstPad:src: caps = video/x-raw-yuv, width=(int)512, height=(int)288, framerate=(fraction)15/1, format=(fourcc)I420, interlaced=(boolean)false, pixel-aspect-ratio=(fraction)1/1
/GstPlayBin2:playbin20/GstURIDecodeBin:uridecodebin0/GstDecodeBin2:decodebin20.GstDecodePad:src0: caps = video/x-raw-yuv, width=(int)512, height=(int)288, framerate=(fraction)15/1, format=(fourcc)I420, interlaced=(boolean)false, pixel-aspect-ratio=(fraction)1/1
/GstPlayBin2:playbin20/GstURIDecodeBin:uridecodebin0/GstDecodeBin2:decodebin20.GstDecodePad:src0.GstProxyPad:proxypad9: caps = video/x-raw-yuv, width=(int)512, height=(int)288, framerate=(fraction)15/1, format=(fourcc)I420, interlaced=(boolean)false, pixel-aspect-ratio=(fraction)1/1
/GstPlayBin2:playbin20/GstURIDecodeBin:uridecodebin0.GstGhostPad:src0: caps = video/x-raw-yuv, width=(int)512, height=(int)288, framerate=(fraction)15/1, format=(fourcc)I420, interlaced=(boolean)false, pixel-aspect-ratio=(fraction)1/1
/GstPlayBin2:playbin20/GstURIDecodeBin:uridecodebin0.GstGhostPad:src0.GstProxyPad:proxypad10: caps = video/x-raw-yuv, width=(int)512, height=(int)288, framerate=(fraction)15/1, format=(fourcc)I420, interlaced=(boolean)false, pixel-aspect-ratio=(fraction)1/1
/GstPlayBin2:playbin20/GstInputSelector:inputselector0.GstSelectorPad:sink0: caps = video/x-raw-yuv, width=(int)512, height=(int)288, framerate=(fraction)15/1, format=(fourcc)I420, interlaced=(boolean)false, pixel-aspect-ratio=(fraction)1/1
/GstPlayBin2:playbin20/GstInputSelector:inputselector0.GstPad:src: caps = video/x-raw-yuv, width=(int)512, height=(int)288, framerate=(fraction)15/1, format=(fourcc)I420, interlaced=(boolean)false, pixel-aspect-ratio=(fraction)1/1
/GstPlayBin2:playbin20/GstPlaySink:playsink.GstGhostPad:video_sink: caps = video/x-raw-yuv, width=(int)512, height=(int)288, framerate=(fraction)15/1, format=(fourcc)I420, interlaced=(boolean)false, pixel-aspect-ratio=(fraction)1/1
/GstPlayBin2:playbin20/GstPlaySink:playsink.GstGhostPad:video_sink.GstProxyPad:proxypad13: caps = video/x-raw-yuv, width=(int)512, height=(int)288, framerate=(fraction)15/1, format=(fourcc)I420, interlaced=(boolean)false, pixel-aspect-ratio=(fraction)1/1
/GstPlayBin2:playbin20/GstPlaySink:playsink.GstGhostPad:video_sink: caps = video/x-raw-yuv, width=(int)512, height=(int)288, framerate=(fraction)15/1, format=(fourcc)I420, interlaced=(boolean)false, pixel-aspect-ratio=(fraction)1/1
/GstPlayBin2:playbin20/GstPlaySink:playsink/GstStreamSynchronizer:streamsynchronizer0.GstPad:sink_0: caps = video/x-raw-yuv, width=(int)512, height=(int)288, framerate=(fraction)15/1, format=(fourcc)I420, interlaced=(boolean)false, pixel-aspect-ratio=(fraction)1/1
/GstPlayBin2:playbin20/GstPlaySink:playsink/GstStreamSynchronizer:streamsynchronizer0.GstPad:src_0: caps = video/x-raw-yuv, width=(int)512, height=(int)288, framerate=(fraction)15/1, format=(fourcc)I420, interlaced=(boolean)false, pixel-aspect-ratio=(fraction)1/1
/GstPlayBin2:playbin20/GstPlaySink:playsink/GstBin:vbin.GstGhostPad:sink: caps = video/x-raw-yuv, width=(int)512, height=(int)288, framerate=(fraction)15/1, format=(fourcc)I420, interlaced=(boolean)false, pixel-aspect-ratio=(fraction)1/1
/GstPlayBin2:playbin20/GstPlaySink:playsink/GstBin:vbin.GstGhostPad:sink.GstProxyPad:proxypad17: caps = video/x-raw-yuv, width=(int)512, height=(int)288, framerate=(fraction)15/1, format=(fourcc)I420, interlaced=(boolean)false, pixel-aspect-ratio=(fraction)1/1
/GstPlayBin2:playbin20/GstPlaySink:playsink/GstBin:vbin.GstGhostPad:sink: caps = video/x-raw-yuv, width=(int)512, height=(int)288, framerate=(fraction)15/1, format=(fourcc)I420, interlaced=(boolean)false, pixel-aspect-ratio=(fraction)1/1
/GstPlayBin2:playbin20/GstPlaySink:playsink/GstBin:vbin/GstQueue:vqueue.GstPad:sink: caps = video/x-raw-yuv, width=(int)512, height=(int)288, framerate=(fraction)15/1, format=(fourcc)I420, interlaced=(boolean)false, pixel-aspect-ratio=(fraction)1/1
/GstPlayBin2:playbin20/GstPlaySink:playsink/GstBin:vbin/GstQueue:vqueue.GstPad:src: caps = video/x-raw-yuv, width=(int)512, height=(int)288, framerate=(fraction)15/1, format=(fourcc)I420, interlaced=(boolean)false, pixel-aspect-ratio=(fraction)1/1
Redistribute latency...
/GstPlayBin2:playbin20/GstPlaySink:playsink/GstBin:vbin/GstPlaySinkVideoConvert:vconv.GstGhostPad:sink: caps = video/x-raw-yuv, width=(int)512, height=(int)288, framerate=(fraction)15/1, format=(fourcc)I420, interlaced=(boolean)false, pixel-aspect-ratio=(fraction)1/1
/GstPlayBin2:playbin20/GstPlaySink:playsink/GstBin:vbin/GstPlaySinkVideoConvert:vconv.GstGhostPad:sink.GstProxyPad:proxypad15: caps = video/x-raw-yuv, width=(int)512, height=(int)288, framerate=(fraction)15/1, format=(fourcc)I420, interlaced=(boolean)false, pixel-aspect-ratio=(fraction)1/1
/GstPlayBin2:playbin20/GstPlaySink:playsink/GstBin:vbin/GstPlaySinkVideoConvert:vconv.GstGhostPad:sink: caps = video/x-raw-yuv, width=(int)512, height=(int)288, framerate=(fraction)15/1, format=(fourcc)I420, interlaced=(boolean)false, pixel-aspect-ratio=(fraction)1/1
/GstPlayBin2:playbin20/GstPlaySink:playsink/GstBin:vbin/GstPlaySinkVideoConvert:vconv/GstFFMpegCsp:conv.GstPad:src: caps = video/x-raw-yuv, width=(int)512, height=(int)288, framerate=(fraction)15/1, format=(fourcc)I420, interlaced=(boolean)false, pixel-aspect-ratio=(fraction)1/1
/GstPlayBin2:playbin20/GstPlaySink:playsink/GstBin:vbin/GstPlaySinkVideoConvert:vconv/GstFFMpegCsp:conv.GstPad:sink: caps = video/x-raw-yuv, width=(int)512, height=(int)288, framerate=(fraction)15/1, format=(fourcc)I420, interlaced=(boolean)false, pixel-aspect-ratio=(fraction)1/1
/GstPlayBin2:playbin20/GstPlaySink:playsink/GstBin:vbin/GstPlaySinkVideoConvert:vconv/GstVideoScale:scale.GstPad:src: caps = video/x-raw-yuv, width=(int)512, height=(int)288, framerate=(fraction)15/1, format=(fourcc)I420, interlaced=(boolean)false, pixel-aspect-ratio=(fraction)1/1
/GstPlayBin2:playbin20/GstPlaySink:playsink/GstBin:vbin/GstPlaySinkVideoConvert:vconv/GstVideoScale:scale.GstPad:sink: caps = video/x-raw-yuv, width=(int)512, height=(int)288, framerate=(fraction)15/1, format=(fourcc)I420, interlaced=(boolean)false, pixel-aspect-ratio=(fraction)1/1
/GstPlayBin2:playbin20/GstPlaySink:playsink/GstBin:vbin/GstPlaySinkVideoConvert:vconv/GstVideoBalance:videobalance.GstPad:src: caps = video/x-raw-yuv, width=(int)512, height=(int)288, framerate=(fraction)15/1, format=(fourcc)I420, interlaced=(boolean)false, pixel-aspect-ratio=(fraction)1/1
/GstPlayBin2:playbin20/GstPlaySink:playsink/GstBin:vbin/GstPlaySinkVideoConvert:vconv/GstVideoBalance:videobalance.GstPad:sink: caps = video/x-raw-yuv, width=(int)512, height=(int)288, framerate=(fraction)15/1, format=(fourcc)I420, interlaced=(boolean)false, pixel-aspect-ratio=(fraction)1/1
/GstPlayBin2:playbin20/GstPlaySink:playsink/GstBin:vbin/GstPlaySinkVideoConvert:vconv/GstFFMpegCsp:conv2.GstPad:src: caps = video/x-raw-rgb, bpp=(int)32, depth=(int)24, endianness=(int)4321, red_mask=(int)65280, green_mask=(int)16711680, blue_mask=(int)-16777216, width=(int)512, height=(int)288, framerate=(fraction)15/1, pixel-aspect-ratio=(fraction)1/1, interlaced=(boolean)false
/GstPlayBin2:playbin20/GstPlaySink:playsink/GstBin:vbin/GstPlaySinkVideoConvert:vconv/GstFFMpegCsp:conv2.GstPad:sink: caps = video/x-raw-yuv, width=(int)512, height=(int)288, framerate=(fraction)15/1, format=(fourcc)I420, interlaced=(boolean)false, pixel-aspect-ratio=(fraction)1/1
/GstPlayBin2:playbin20/GstPlaySink:playsink/GstBin:vbin/GstPlaySinkVideoConvert:vconv.GstGhostPad:src: caps = video/x-raw-rgb, bpp=(int)32, depth=(int)24, endianness=(int)4321, red_mask=(int)65280, green_mask=(int)16711680, blue_mask=(int)-16777216, width=(int)512, height=(int)288, framerate=(fraction)15/1, pixel-aspect-ratio=(fraction)1/1, interlaced=(boolean)false
/GstPlayBin2:playbin20/GstPlaySink:playsink/GstBin:vbin/GstPlaySinkVideoConvert:vconv.GstGhostPad:src.GstProxyPad:proxypad16: caps = video/x-raw-rgb, bpp=(int)32, depth=(int)24, endianness=(int)4321, red_mask=(int)65280, green_mask=(int)16711680, blue_mask=(int)-16777216, width=(int)512, height=(int)288, framerate=(fraction)15/1, pixel-aspect-ratio=(fraction)1/1, interlaced=(boolean)false
/GstPlayBin2:playbin20/GstPlaySink:playsink/GstBin:vbin/GstAutoVideoSink:videosink.GstGhostPad:sink: caps = video/x-raw-rgb, bpp=(int)32, depth=(int)24, endianness=(int)4321, red_mask=(int)65280, green_mask=(int)16711680, blue_mask=(int)-16777216, width=(int)512, height=(int)288, framerate=(fraction)15/1, pixel-aspect-ratio=(fraction)1/1, interlaced=(boolean)false
/GstPlayBin2:playbin20/GstPlaySink:playsink/GstBin:vbin/GstAutoVideoSink:videosink.GstGhostPad:sink.GstProxyPad:proxypad14: caps = video/x-raw-rgb, bpp=(int)32, depth=(int)24, endianness=(int)4321, red_mask=(int)65280, green_mask=(int)16711680, blue_mask=(int)-16777216, width=(int)512, height=(int)288, framerate=(fraction)15/1, pixel-aspect-ratio=(fraction)1/1, interlaced=(boolean)false
/GstPlayBin2:playbin20/GstPlaySink:playsink/GstBin:vbin/GstAutoVideoSink:videosink.GstGhostPad:sink: caps = video/x-raw-rgb, bpp=(int)32, depth=(int)24, endianness=(int)4321, red_mask=(int)65280, green_mask=(int)16711680, blue_mask=(int)-16777216, width=(int)512, height=(int)288, framerate=(fraction)15/1, pixel-aspect-ratio=(fraction)1/1, interlaced=(boolean)false
/GstPlayBin2:playbin20/GstPlaySink:playsink/GstBin:vbin/GstAutoVideoSink:videosink/GstXImageSink:videosink-actual-sink-ximage.GstPad:sink: caps = video/x-raw-rgb, bpp=(int)32, depth=(int)24, endianness=(int)4321, red_mask=(int)65280, green_mask=(int)16711680, blue_mask=(int)-16777216, width=(int)512, height=(int)288, framerate=(fraction)15/1, pixel-aspect-ratio=(fraction)1/1, interlaced=(boolean)false
Pipeline is PREROLLED ...
Setting pipeline to PLAYING ...
/GstPlayBin2:playbin20/GstPlaySink:playsink: volume = 1.000000
/GstPlayBin2:playbin20/GstPlaySink:playsink/GstBin:abin/GstAutoAudioSink:audiosink/GstPulseSink:audiosink-actual-sink-pulse: volume = 1.000000
/GstPlayBin2:playbin20/GstPlaySink:playsink: mute = FALSE
/GstPlayBin2:playbin20/GstPlaySink:playsink/GstBin:abin/GstAutoAudioSink:audiosink/GstPulseSink:audiosink-actual-sink-pulse: mute = FALSE
/GstPlayBin2:playbin20/GstPlaySink:playsink: volume = 1.000000
/GstPlayBin2:playbin20/GstPlaySink:playsink/GstBin:abin/GstAutoAudioSink:audiosink/GstPulseSink:audiosink-actual-sink-pulse: volume = 1.000000
/GstPlayBin2:playbin20/GstPlaySink:playsink: mute = FALSE
/GstPlayBin2:playbin20/GstPlaySink:playsink/GstBin:abin/GstAutoAudioSink:audiosink/GstPulseSink:audiosink-actual-sink-pulse: mute = FALSE
New clock: GstPulseSinkClock

第3。 filesrc-> flvdemux-> ffdec_h264

gst-launch-0.10 -v filesrc location=1.flv ! flvdemux ! ffdec_h264 ! ffmpegcolorspace ! autovideosink
Setting pipeline to PAUSED ...
Pipeline is PREROLLING ...
/GstPipeline:pipeline0/GstFlvDemux:flvdemux0.GstPad:video: caps = video/x-h264, stream-format=(string)avc, pixel-aspect-ratio=(fraction)1/1, width=(int)33, height=(int)10, framerate=(fraction)15/1, codec_data=(buffer)014d401fffe10019674d401f9661404012d80880000003008000000f478c18c54001000468eebc80
/GstPipeline:pipeline0/GstFlvDemux:flvdemux0.GstPad:audio: caps = audio/mpeg, mpegversion=(int)4, framed=(boolean)true, stream-format=(string)raw, rate=(int)22050, channels=(int)2, codec_data=(buffer)139056e5a54800
ERROR: from element /GstPipeline:pipeline0/GstFlvDemux:flvdemux0: Internal data stream error.
Additional debug info:
gstflvdemux.c(2442): gst_flv_demux_loop (): /GstPipeline:pipeline0/GstFlvDemux:flvdemux0:
stream stopped, reason not-linked
ERROR: pipeline doesn't want to preroll.
Setting pipeline to NULL ...
/GstPipeline:pipeline0/GstFlvDemux:flvdemux0.GstPad:audio: caps = NULL
/GstPipeline:pipeline0/GstFlvDemux:flvdemux0.GstPad:video: caps = NULL
Freeing pipeline ...

4。 filesrc-> flvdemux-> h264parse-> ffdec_h264

gst-launch-0.10 -v filesrc location=1.flv ! flvdemux ! queue ! h264parse ! ffdec_h264 ! ffmpegcolorspace ! autovideosink
Setting pipeline to PAUSED ...
Pipeline is PREROLLING ...
/GstPipeline:pipeline0/GstFlvDemux:flvdemux0.GstPad:video: caps = video/x-h264, stream-format=(string)avc, pixel-aspect-ratio=(fraction)1/1, width=(int)33, height=(int)10, framerate=(fraction)15/1, codec_data=(buffer)014d401fffe10019674d401f9661404012d80880000003008000000f478c18c54001000468eebc80
/GstPipeline:pipeline0/GstFlvDemux:flvdemux0.GstPad:audio: caps = audio/mpeg, mpegversion=(int)4, framed=(boolean)true, stream-format=(string)raw, rate=(int)22050, channels=(int)2, codec_data=(buffer)139056e5a54800
ERROR: from element /GstPipeline:pipeline0/GstFlvDemux:flvdemux0: Internal data stream error.
Additional debug info:
gstflvdemux.c(2442): gst_flv_demux_loop (): /GstPipeline:pipeline0/GstFlvDemux:flvdemux0:
stream stopped, reason not-linked
ERROR: pipeline doesn't want to preroll.
Setting pipeline to NULL ...
/GstPipeline:pipeline0/GstFlvDemux:flvdemux0.GstPad:audio: caps = NULL
/GstPipeline:pipeline0/GstFlvDemux:flvdemux0.GstPad:video: caps = NULL
Freeing pipeline ...

2 个答案:

答案 0 :(得分:1)

现在你应该使用gstreamer-1,你可以使用这个管道:

gst-launch-1.0 filesrc location=1.flv ! \
flvdemux ! \
h264parse ! avdec_h264 ! videoconvert ! autovideosink

仍然没有这样的声音。要获得视频和声音,您需要这样的管道:

gst-launch-1.0 filesrc location=1.flv ! \
decodebin name=decode ! videoconvert ! autovideosink \
decode. ! audioconvert ! autoaudiosink

好的,这很懒:我使用了decodebin。如果你知道使用的编解码器,你可以手工构建完整的管道,当然:

gst-launch-1.0 filesrc location=1.flv ! \
flvdemux name=demux ! queue ! h264parse ! avdec_h264 ! videoconvert ! autovideosink \
demux. ! queue ! aacparse ! avdec_aac ! autoaudiosink

答案 1 :(得分:0)

尝试在解复用器之后添加大写video/x-h264