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@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@boots:~/test/stream$ si@boots:~/test/stream$ si@boots:~/test/stream$ si@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@boots:~/test/stream$ si@boots:~/test/stream$ si@boots:~/test/stream$ si@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@boots:~/test/stream$ _______________________________________________ gstreamer-devel mailing list [hidden email] https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel |
On Fri, 2018-02-16 at 23:20 -0500, John Hanks wrote:
Hi John, It could be that the keyframe distance in the MPEG-TS file is fairly large, larger than the ~1 second of buffering that the queue in the other branch provides. Or the bitrate is very high and the video branch queue default limits are too small for that (max 1 sec, 200 buffers, 1 MB). Some things to try: 1) Unset non-time limits on both queues: .. ! queue max-size-buffers=0 max-size-bytes=0 ! .. 2) Increase time limit on both queues, in addition to (1): .. ! queue max-size-time=3000000000 max... ! .. 3) Try decodebin or decodebin3 instead, or even playbin. Cheers -Tim -- Tim Müller, Centricular Ltd - http://www.centricular.com _______________________________________________ gstreamer-devel mailing list [hidden email] https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel |
Thank you. That solved the problem with the pipeline from the command line.
I'm actually trying to run it from a program so that I can also access the KLV data in the .ts file. When I add the queue parameters to my program, the program provides the following warning: 0:00:00.144022575 11856 0x186f720 WARN mpegtspacketizer mpegtspacketizer.c:2329:mpegts_packetizer_pts_to_ts: No groups, can't calculate timestamp Looking up that message, I found someone that said you needed to add 'tsparse set-timestamps=true' before the tsdemux because " by default the timestamps are not preserved when working with mpeg ts". I've added that to the command line pipeline, which still works, but I still get the error when I run the program with that added. (Of course if the timestamp issue was true,. why do I not get this error when running from gst-launch?) Is there something else I'm missing? John On 02/17/2018 05:05 AM, Tim Müller wrote: > On Fri, 2018-02-16 at 23:20 -0500, John Hanks wrote: > > Hi John, > > It could be that the keyframe distance in the MPEG-TS file is fairly > large, larger than the ~1 second of buffering that the queue in the > other branch provides. > > Or the bitrate is very high and the video branch queue default limits > are too small for that (max 1 sec, 200 buffers, 1 MB). > > Some things to try: > > 1) Unset non-time limits on both queues: > .. ! queue max-size-buffers=0 max-size-bytes=0 ! .. > > 2) Increase time limit on both queues, in addition to (1): > .. ! queue max-size-time=3000000000 max... ! .. > > 3) Try decodebin or decodebin3 instead, or even playbin. > > Cheers > -Tim _______________________________________________ gstreamer-devel mailing list [hidden email] https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel |
Free forum by Nabble | Edit this page |