some question about use flvdemux
I have some questions when I try to use flvdemux. I have a rtmp stream, I need to use flvdemux to get the video. This is my cmd: gst-launch-1.0 -v rtmpsrc location={rtmpsrc} ! flvdemux name=demux demux.video ! queue ! identity name=v_delay signal-handoffs=TRUE ! h264parse ! video/x-h264,stream-format=byte-stream ! fakesink demux.audio ! queue ! fakesink but it doesn’t work each time, sometimes It can work, sometimes it can’t.
this is success gst-launch-1.0 -v rtmpsrc location={rtmpsrc} ! flvdemux name=demux demux.video ! queue ! identity name=v_delay signal-handoffs=TRUE ! h264parse ! video/x-h264,stream-format=byte-stream ! fakesink demux.audio ! queue ! fakesink Setting pipeline to PAUSED ... Pipeline is PREROLLING ... /GstPipeline:pipeline0/GstQueue:queue1.GstPad:sink: caps = audio/mpeg, mpegversion=(int)4, framed=(boolean)true, stream-format=(string)raw, rate=(int)44100, channels=(int)2, codec_data=(buffer)1210 /GstPipeline:pipeline0/GstQueue:queue1.GstPad:src: caps = audio/mpeg, mpegversion=(int)4, framed=(boolean)true, stream-format=(string)raw, rate=(int)44100, channels=(int)2, codec_data=(buffer)1210 /GstPipeline:pipeline0/GstFakeSink:fakesink1.GstPad:sink: caps = audio/mpeg, mpegversion=(int)4, framed=(boolean)true, stream-format=(string)raw, rate=(int)44100, channels=(int)2, codec_data=(buffer)1210 /GstPipeline:pipeline0/GstQueue:queue0.GstPad:sink: caps = video/x-h264, stream-format=(string)avc, pixel-aspect-ratio=(fraction)1/1, codec_data=(buffer)01640028ffe1001c27640028ac2d301e0089f97011000003000100000300329da1c3138001000428ee3cb0 /GstPipeline:pipeline0/GstQueue:queue0.GstPad:src: caps = video/x-h264, stream-format=(string)avc, pixel-aspect-ratio=(fraction)1/1, codec_data=(buffer)01640028ffe1001c27640028ac2d301e0089f97011000003000100000300329da1c3138001000428ee3cb0 /GstPipeline:pipeline0/GstIdentity:v_delay.GstPad:src: caps = video/x-h264, stream-format=(string)avc, pixel-aspect-ratio=(fraction)1/1, codec_data=(buffer)01640028ffe1001c27640028ac2d301e0089f97011000003000100000300329da1c3138001000428ee3cb0 /GstPipeline:pipeline0/GstH264Parse:h264parse0.GstPad:sink: caps = video/x-h264, stream-format=(string)avc, pixel-aspect-ratio=(fraction)1/1, codec_data=(buffer)01640028ffe1001c27640028ac2d301e0089f97011000003000100000300329da1c3138001000428ee3cb0 /GstPipeline:pipeline0/GstIdentity:v_delay.GstPad:sink: caps = video/x-h264, stream-format=(string)avc, pixel-aspect-ratio=(fraction)1/1, codec_data=(buffer)01640028ffe1001c27640028ac2d301e0089f97011000003000100000300329da1c3138001000428ee3cb0 /GstPipeline:pipeline0/GstH264Parse:h264parse0.GstPad:src: caps = video/x-h264, stream-format=(string)byte-stream, pixel-aspect-ratio=(fraction)1/1, width=(int)1920, height=(int)1080, framerate=(fraction)25/1, parsed=(boolean)true, alignment=(string)au, profile=(string)high, level=(string)4 /GstPipeline:pipeline0/GstCapsFilter:capsfilter0.GstPad:src: caps = video/x-h264, stream-format=(string)byte-stream, pixel-aspect-ratio=(fraction)1/1, width=(int)1920, height=(int)1080, framerate=(fraction)25/1, parsed=(boolean)true, alignment=(string)au, profile=(string)high, level=(string)4 /GstPipeline:pipeline0/GstFakeSink:fakesink0.GstPad:sink: caps = video/x-h264, stream-format=(string)byte-stream, pixel-aspect-ratio=(fraction)1/1, width=(int)1920, height=(int)1080, framerate=(fraction)25/1, parsed=(boolean)true, alignment=(string)au, profile=(string)high, level=(string)4 /GstPipeline:pipeline0/GstCapsFilter:capsfilter0.GstPad:sink: caps = video/x-h264, stream-format=(string)byte-stream, pixel-aspect-ratio=(fraction)1/1, width=(int)1920, height=(int)1080, framerate=(fraction)25/1, parsed=(boolean)true, alignment=(string)au, profile=(string)high, level=(string)4 Pipeline is PREROLLED ... Setting pipeline to PLAYING ... New clock: GstSystemClock
this is not work gst-launch-1.0 -v rtmpsrc location={rtmpsrc} ! flvdemux name=demux demux.video ! queue ! identity name=v_delay signal-handoffs=TRUE ! h264parse ! video/x-h264,stream-format=byte-stream ! fakesink demux.audio ! queue ! fakesink Setting pipeline to PAUSED ... Pipeline is PREROLLING ... /GstPipeline:pipeline0/GstQueue:queue1.GstPad:sink: caps = audio/mpeg, mpegversion=(int)4, framed=(boolean)true, stream-format=(string)raw, rate=(int)44100, channels=(int)2, codec_data=(buffer)1210 /GstPipeline:pipeline0/GstQueue:queue1.GstPad:src: caps = audio/mpeg, mpegversion=(int)4, framed=(boolean)true, stream-format=(string)raw, rate=(int)44100, channels=(int)2, codec_data=(buffer)1210 /GstPipeline:pipeline0/GstFakeSink:fakesink1.GstPad:sink: caps = audio/mpeg, mpegversion=(int)4, framed=(boolean)true, stream-format=(string)raw, rate=(int)44100, channels=(int)2, codec_data=(buffer)1210