gst-launch issue with both audio and video

John Hanks jhanks at vsicorp.com
Sat Feb 17 04:20:09 UTC 2018


I'm trying to decode a .ts file with the line:

gst-launch-1.0 -v filesrc location=/data/file1.ts typefind=true ! 
tsdemux name=src  src. ! queue ! avdec_aac ! audioconvert ! 
autoaudiosink src. ! queue ! h264parse ! "video/x-h264, alignment=au" ! 
avdec_h264 ! queue ! "video/x-raw" ! videoconvert ! autovideosink

If I run the audio and video parts separately:

gst-launch-1.0 -v filesrc location=/data/file1.ts typefind=true ! 
tsdemux name=src  src. ! queue ! avdec_aac ! audioconvert ! autoaudiosink

and

  gst-launch-1.0 -v filesrc location=/data/file1.ts typefind=true ! 
tsdemux name=src  src. ! queue ! h264parse ! "video/x-h264, 
alignment=au" ! avdec_h264 ! queue ! "video/x-raw" ! videoconvert ! 
autovideosink

each runs successfully.  When I use the combined line, it looks like the 
audio links all the way to autoaudiosink but the video stops after 
setting up the sink to avdec_h264.

What am I missing?

The debug output from each of the three runs is below.

John

----------------------

si at boots:~/test/stream$ gst-launch-1.0 -v filesrc 
location=/data/file1.ts typefind=true ! tsdemux name=src  src. ! queue ! 
avdec_aac ! audioconvert ! autoaudiosink src. ! queue ! h264parse ! 
"video/x-h26
4, alignment=au" ! avdec_h264 ! queue ! "video/x-raw" ! videoconvert ! 
autovideosink
Setting pipeline to PAUSED ...
Pipeline is PREROLLING ...
/GstPipeline:pipeline0/GstQueue:queue0.GstPad:sink: caps = audio/mpeg, 
mpegversion=(int)2, stream-format=(string)adts
/GstPipeline:pipeline0/GstQueue:queue0.GstPad:src: caps = audio/mpeg, 
mpegversion=(int)2, stream-format=(string)adts
/GstPipeline:pipeline0/GstQueue:queue1.GstPad:sink: caps = video/x-h264, 
stream-format=(string)byte-stream, alignment=(string)nal
/GstPipeline:pipeline0/GstQueue:queue1.GstPad:src: caps = video/x-h264, 
stream-format=(string)byte-stream, alignment=(string)nal
/GstPipeline:pipeline0/GstH264Parse:h264parse0.GstPad:sink: caps = 
video/x-h264, stream-format=(string)byte-stream, alignment=(string)nal
/GstPipeline:pipeline0/GstH264Parse:h264parse0.GstPad:sink: caps = 
video/x-h264, stream-format=(string)byte-stream, alignment=(string)nal
/GstPipeline:pipeline0/avdec_aac:avdec_aac0.GstPad:src: caps = 
audio/x-raw, format=(string)F32LE, layout=(string)interleaved, 
rate=(int)48000, channels=(int)2, channel-mask=(bitmask)0x0000000000000003
/GstPipeline:pipeline0/GstAudioConvert:audioconvert0.GstPad:src: caps = 
audio/x-raw, format=(string)F32LE, layout=(string)interleaved, 
rate=(int)48000, channels=(int)2, channel-mask=(bitmask)0x00000000000
00003
/GstPipeline:pipeline0/GstH264Parse:h264parse0.GstPad:src: caps = 
video/x-h264, stream-format=(string)avc, alignment=(string)au, 
pixel-aspect-ratio=(fraction)3/4, width=(int)1920, height=(int)1080, framer
ate=(fraction)30/1, interlace-mode=(string)progressive, 
parsed=(boolean)true, profile=(string)high-4:2:2, level=(string)4, 
codec_data=(buffer)017a0028ffe10023677a0028bcd940780227e27ff000300046a02020280000
03000800000301e478c18cb001000468efbcb0
/GstPipeline:pipeline0/GstCapsFilter:capsfilter0.GstPad:src: caps = 
video/x-h264, stream-format=(string)avc, alignment=(string)au, 
pixel-aspect-ratio=(fraction)3/4, width=(int)1920, height=(int)1080, fram
erate=(fraction)30/1, interlace-mode=(string)progressive, 
parsed=(boolean)true, profile=(string)high-4:2:2, level=(string)4, 
codec_data=(buffer)017a0028ffe10023677a0028bcd940780227e27ff000300046a020202800
0003000800000301e478c18cb001000468efbcb0
/GstPipeline:pipeline0/GstAutoAudioSink:autoaudiosink0.GstGhostPad:sink.GstProxyPad:proxypad0: 
caps = audio/x-raw, format=(string)F32LE, layout=(string)interleaved, 
rate=(int)48000, channels=(int)2, chann
el-mask=(bitmask)0x0000000000000003
Redistribute latency...
/GstPipeline:pipeline0/avdec_h264:avdec_h264-0.GstPad:sink: caps = 
video/x-h264, stream-format=(string)avc, alignment=(string)au, 
pixel-aspect-ratio=(fraction)3/4, width=(int)1920, height=(int)1080, frame
rate=(fraction)30/1, interlace-mode=(string)progressive, 
parsed=(boolean)true, profile=(string)high-4:2:2, level=(string)4, 
codec_data=(buffer)017a0028ffe10023677a0028bcd940780227e27ff000300046a0202028000
003000800000301e478c18cb001000468efbcb0
/GstPipeline:pipeline0/GstCapsFilter:capsfilter0.GstPad:sink: caps = 
video/x-h264, stream-format=(string)avc, alignment=(string)au, 
pixel-aspect-ratio=(fraction)3/4, width=(int)1920, height=(int)1080, fra
merate=(fraction)30/1, interlace-mode=(string)progressive, 
parsed=(boolean)true, profile=(string)high-4:2:2, level=(string)4, 
codec_data=(buffer)017a0028ffe10023677a0028bcd940780227e27ff000300046a02020280
00003000800000301e478c18cb001000468efbcb0
Redistribute latency...
/GstPipeline:pipeline0/GstAutoAudioSink:autoaudiosink0/GstPulseSink:autoaudiosink0-actual-sink-pulse.GstPad:sink: 
caps = audio/x-raw, format=(string)F32LE, layout=(string)interleaved, 
rate=(int)48000, cha
nnels=(int)2, channel-mask=(bitmask)0x0000000000000003
/GstPipeline:pipeline0/GstAutoAudioSink:autoaudiosink0.GstGhostPad:sink: 
caps = audio/x-raw, format=(string)F32LE, layout=(string)interleaved, 
rate=(int)48000, channels=(int)2, channel-mask=(bitmask)0x000
0000000000003
/GstPipeline:pipeline0/GstAudioConvert:audioconvert0.GstPad:sink: caps = 
audio/x-raw, format=(string)F32LE, layout=(string)interleaved, 
rate=(int)48000, channels=(int)2, channel-mask=(bitmask)0x0000000000
000003
^Chandling interrupt.       <<<<<< TERMINATED STOPPED PROCESS
Interrupt: Stopping pipeline ...
ERROR: pipeline doesn't want to preroll.
Setting pipeline to NULL ...
Freeing pipeline ...
si at boots:~/test/stream$
si at boots:~/test/stream$
si at boots:~/test/stream$
si at boots:~/test/stream$ gst-launch-1.0 -v filesrc 
location=/data/file1.ts typefind=true ! tsdemux name=src  src. ! queue ! 
avdec_aac ! audioconvert ! autoaudiosink
Setting pipeline to PAUSED ...
Pipeline is PREROLLING ...
/GstPipeline:pipeline0/GstQueue:queue0.GstPad:sink: caps = audio/mpeg, 
mpegversion=(int)2, stream-format=(string)adts
/GstPipeline:pipeline0/GstQueue:queue0.GstPad:sink: caps = audio/mpeg, 
mpegversion=(int)2, stream-format=(string)adts
/GstPipeline:pipeline0/avdec_aac:avdec_aac0.GstPad:sink: caps = 
audio/mpeg, mpegversion=(int)2, stream-format=(string)adts
/GstPipeline:pipeline0/avdec_aac:avdec_aac0.GstPad:src: caps = 
audio/x-raw, format=(string)F32LE, layout=(string)interleaved, 
rate=(int)48000, channels=(int)2, channel-mask=(bitmask)0x0000000000000003
/GstPipeline:pipeline0/GstAudioConvert:audioconvert0.GstPad:src: caps = 
audio/x-raw, format=(string)F32LE, layout=(string)interleaved, 
rate=(int)48000, channels=(int)2, channel-mask=(bitmask)0x00000000000
00003
/GstPipeline:pipeline0/GstAutoAudioSink:autoaudiosink0.GstGhostPad:sink.GstProxyPad:proxypad0: 
caps = audio/x-raw, format=(string)F32LE, layout=(string)interleaved, 
rate=(int)48000, channels=(int)2, chann
el-mask=(bitmask)0x0000000000000003
Redistribute latency...
/GstPipeline:pipeline0/GstAutoAudioSink:autoaudiosink0/GstPulseSink:autoaudiosink0-actual-sink-pulse.GstPad:sink: 
caps = audio/x-raw, format=(string)F32LE, layout=(string)interleaved, 
rate=(int)48000, cha
nnels=(int)2, channel-mask=(bitmask)0x0000000000000003
/GstPipeline:pipeline0/GstAutoAudioSink:autoaudiosink0.GstGhostPad:sink: 
caps = audio/x-raw, format=(string)F32LE, layout=(string)interleaved, 
rate=(int)48000, channels=(int)2, channel-mask=(bitmask)0x000
0000000000003
/GstPipeline:pipeline0/GstAudioConvert:audioconvert0.GstPad:sink: caps = 
audio/x-raw, format=(string)F32LE, layout=(string)interleaved, 
rate=(int)48000, channels=(int)2, channel-mask=(bitmask)0x0000000000
000003
Pipeline is PREROLLED ...
Setting pipeline to PLAYING ...
New clock: GstPulseSinkClock
/GstPipeline:pipeline0/GstAutoAudioSink:autoaudiosink0/GstPulseSink:autoaudiosink0-actual-sink-pulse: 
volume = 1
/GstPipeline:pipeline0/GstAutoAudioSink:autoaudiosink0/GstPulseSink:autoaudiosink0-actual-sink-pulse: 
mute = false
/GstPipeline:pipeline0/GstAutoAudioSink:autoaudiosink0/GstPulseSink:autoaudiosink0-actual-sink-pulse: 
current-device = alsa_output.pci-0000_00_1b.0.analog-stereo
/GstPipeline:pipeline0/GstAutoAudioSink:autoaudiosink0/GstPulseSink:autoaudiosink0-actual-sink-pulse: 
volume = 1
/GstPipeline:pipeline0/GstAutoAudioSink:autoaudiosink0/GstPulseSink:autoaudiosink0-actual-sink-pulse: 
mute = false
/GstPipeline:pipeline0/GstAutoAudioSink:autoaudiosink0/GstPulseSink:autoaudiosink0-actual-sink-pulse: 
current-device = alsa_output.pci-0000_00_1b.0.analog-stereo
Got EOS from element "pipeline0".
Execution ended after 0:00:18.409769929
Setting pipeline to PAUSED ...
Setting pipeline to READY ...
Setting pipeline to NULL ...
Freeing pipeline ...
si at boots:~/test/stream$
si at boots:~/test/stream$
si at boots:~/test/stream$
si at boots:~/test/stream$ gst-launch-1.0 -v filesrc 
location=/data/file1.ts typefind=true ! tsdemux name=src  src. ! queue ! 
h264parse ! "video/x-h264, alignment=au" ! avdec_h264 ! queue ! 
"video/x-raw" ! videoconvert ! autovideosink
Setting pipeline to PAUSED ...
Pipeline is PREROLLING ...
/GstPipeline:pipeline0/GstQueue:queue0.GstPad:sink: caps = video/x-h264, 
stream-format=(string)byte-stream, alignment=(string)nal
/GstPipeline:pipeline0/GstQueue:queue0.GstPad:sink: caps = video/x-h264, 
stream-format=(string)byte-stream, alignment=(string)nal
/GstPipeline:pipeline0/GstH264Parse:h264parse0.GstPad:sink: caps = 
video/x-h264, stream-format=(string)byte-stream, alignment=(string)nal
/GstPipeline:pipeline0/GstH264Parse:h264parse0.GstPad:src: caps = 
video/x-h264, stream-format=(string)avc, alignment=(string)au, 
pixel-aspect-ratio=(fraction)3/4, width=(int)1920, height=(int)1080, framer
ate=(fraction)30/1, interlace-mode=(string)progressive, 
parsed=(boolean)true, profile=(string)high-4:2:2, level=(string)4, 
codec_data=(buffer)017a0028ffe10023677a0028bcd940780227e27ff000300046a02020280000
03000800000301e478c18cb001000468efbcb0
/GstPipeline:pipeline0/GstCapsFilter:capsfilter0.GstPad:src: caps = 
video/x-h264, stream-format=(string)avc, alignment=(string)au, 
pixel-aspect-ratio=(fraction)3/4, width=(int)1920, height=(int)1080, fram
erate=(fraction)30/1, interlace-mode=(string)progressive, 
parsed=(boolean)true, profile=(string)high-4:2:2, level=(string)4, 
codec_data=(buffer)017a0028ffe10023677a0028bcd940780227e27ff000300046a020202800
0003000800000301e478c18cb001000468efbcb0
Redistribute latency...
/GstPipeline:pipeline0/avdec_h264:avdec_h264-0.GstPad:sink: caps = 
video/x-h264, stream-format=(string)avc, alignment=(string)au, 
pixel-aspect-ratio=(fraction)3/4, width=(int)1920, height=(int)1080, frame
rate=(fraction)30/1, interlace-mode=(string)progressive, 
parsed=(boolean)true, profile=(string)high-4:2:2, level=(string)4, 
codec_data=(buffer)017a0028ffe10023677a0028bcd940780227e27ff000300046a0202028000
003000800000301e478c18cb001000468efbcb0
/GstPipeline:pipeline0/GstCapsFilter:capsfilter0.GstPad:sink: caps = 
video/x-h264, stream-format=(string)avc, alignment=(string)au, 
pixel-aspect-ratio=(fraction)3/4, width=(int)1920, height=(int)1080, fra
merate=(fraction)30/1, interlace-mode=(string)progressive, 
parsed=(boolean)true, profile=(string)high-4:2:2, level=(string)4, 
codec_data=(buffer)017a0028ffe10023677a0028bcd940780227e27ff000300046a02020280
00003000800000301e478c18cb001000468efbcb0
/GstPipeline:pipeline0/avdec_h264:avdec_h264-0.GstPad:src: caps = 
video/x-raw, format=(string)Y42B, width=(int)1920, height=(int)1080, 
interlace-mode=(string)progressive, multiview-mode=(string)mono, mult
iview-flags=(GstVideoMultiviewFlagsSet)0:ffffffff:/right-view-first/left-flipped/left-flopped/right-flipped/right-flopped/half-aspect/mixed-mono, 
pixel-aspect-ratio=(fraction)3/4, chroma-site=(string)mpeg
2, colorimetry=(string)bt709, framerate=(fraction)30/1
/GstPipeline:pipeline0/GstQueue:queue1.GstPad:src: caps = video/x-raw, 
format=(string)Y42B, width=(int)1920, height=(int)1080, 
interlace-mode=(string)progressive, multiview-mode=(string)mono, 
multiview-fl
ags=(GstVideoMultiviewFlagsSet)0:ffffffff:/right-view-first/left-flipped/left-flopped/right-flipped/right-flopped/half-aspect/mixed-mono, 
pixel-aspect-ratio=(fraction)3/4, chroma-site=(string)mpeg2, color
imetry=(string)bt709, framerate=(fraction)30/1
/GstPipeline:pipeline0/GstCapsFilter:capsfilter1.GstPad:src: caps = 
video/x-raw, format=(string)Y42B, width=(int)1920, height=(int)1080, 
interlace-mode=(string)progressive, multiview-mode=(string)mono, mu
ltiview-flags=(GstVideoMultiviewFlagsSet)0:ffffffff:/right-view-first/left-flipped/left-flopped/right-flipped/right-flopped/half-aspect/mixed-mono, 
pixel-aspect-ratio=(fraction)3/4, chroma-site=(string)mp
eg2, colorimetry=(string)bt709, framerate=(fraction)30/1
/GstPipeline:pipeline0/GstVideoConvert:videoconvert0.GstPad:src: caps = 
video/x-raw, width=(int)1920, height=(int)1080, 
interlace-mode=(string)progressive, multiview-mode=(string)mono, 
multiview-flags=(Gs
tVideoMultiviewFlagsSet)0:ffffffff:/right-view-first/left-flipped/left-flopped/right-flipped/right-flopped/half-aspect/mixed-mono, 
pixel-aspect-ratio=(fraction)3/4, framerate=(fraction)30/1, format=(strin
g)YUY2
/GstPipeline:pipeline0/GstAutoVideoSink:autovideosink0.GstGhostPad:sink.GstProxyPad:proxypad0: 
caps = video/x-raw, width=(int)1920, height=(int)1080, 
interlace-mode=(string)progressive, multiview-mode=(st
ring)mono, 
multiview-flags=(GstVideoMultiviewFlagsSet)0:ffffffff:/right-view-first/left-flipped/left-flopped/right-flipped/right-flopped/half-aspect/mixed-mono, 
pixel-aspect-ratio=(fraction)3/4, framerate
=(fraction)30/1, format=(string)YUY2
/GstPipeline:pipeline0/GstQueue:queue1.GstPad:sink: caps = video/x-raw, 
format=(string)Y42B, width=(int)1920, height=(int)1080, 
interlace-mode=(string)progressive, multiview-mode=(string)mono, multiview-f
lags=(GstVideoMultiviewFlagsSet)0:ffffffff:/right-view-first/left-flipped/left-flopped/right-flipped/right-flopped/half-aspect/mixed-mono, 
pixel-aspect-ratio=(fraction)3/4, chroma-site=(string)mpeg2, colo
rimetry=(string)bt709, framerate=(fraction)30/1
/GstPipeline:pipeline0/GstAutoVideoSink:autovideosink0/GstXvImageSink:autovideosink0-actual-sink-xvimage.GstPad:sink: 
caps = video/x-raw, width=(int)1920, height=(int)1080, 
interlace-mode=(string)progress
ive, multiview-mode=(string)mono, 
multiview-flags=(GstVideoMultiviewFlagsSet)0:ffffffff:/right-view-first/left-flipped/left-flopped/right-flipped/right-flopped/half-aspect/mixed-mono, 
pixel-aspect-ratio=(
fraction)3/4, framerate=(fraction)30/1, format=(string)YUY2
/GstPipeline:pipeline0/GstAutoVideoSink:autovideosink0.GstGhostPad:sink: 
caps = video/x-raw, width=(int)1920, height=(int)1080, 
interlace-mode=(string)progressive, multiview-mode=(string)mono, multiview-f
lags=(GstVideoMultiviewFlagsSet)0:ffffffff:/right-view-first/left-flipped/left-flopped/right-flipped/right-flopped/half-aspect/mixed-mono, 
pixel-aspect-ratio=(fraction)3/4, framerate=(fraction)30/1, forma
t=(string)YUY2
/GstPipeline:pipeline0/GstVideoConvert:videoconvert0.GstPad:sink: caps = 
video/x-raw, format=(string)Y42B, width=(int)1920, height=(int)1080, 
interlace-mode=(string)progressive, multiview-mode=(string)mon
o, 
multiview-flags=(GstVideoMultiviewFlagsSet)0:ffffffff:/right-view-first/left-flipped/left-flopped/right-flipped/right-flopped/half-aspect/mixed-mono, 
pixel-aspect-ratio=(fraction)3/4, chroma-site=(stri
ng)mpeg2, colorimetry=(string)bt709, framerate=(fraction)30/1
/GstPipeline:pipeline0/GstCapsFilter:capsfilter1.GstPad:sink: caps = 
video/x-raw, format=(string)Y42B, width=(int)1920, height=(int)1080, 
interlace-mode=(string)progressive, multiview-mode=(string)mono, m
ultiview-flags=(GstVideoMultiviewFlagsSet)0:ffffffff:/right-view-first/left-flipped/left-flopped/right-flipped/right-flopped/half-aspect/mixed-mono, 
pixel-aspect-ratio=(fraction)3/4, chroma-site=(string)m
peg2, colorimetry=(string)bt709, framerate=(fraction)30/1
Redistribute latency...
Pipeline is PREROLLED ...
Setting pipeline to PLAYING ...
New clock: GstSystemClock
Got EOS from element "pipeline0".
Execution ended after 0:00:18.555465437
Setting pipeline to PAUSED ...
Setting pipeline to READY ...
Setting pipeline to NULL ...
Freeing pipeline ...
si at boots:~/test/stream$



More information about the gstreamer-devel mailing list