I am trying to decode a TS received over an udpsrc. When using decodebin,
I'm able to do so, but i wish to create the entire pipeline, declaring the
decoders myself. I am pretty sure I am missing something, but I can't figure
out what element I'm missing.
*The following pipeline does decode and play the TS correctly:*
$ gst-launch-1.0 udpsrc port=7000 do-timestamp=true ! decodebin name=d !
queue ! videoconvert ! videorate ! video/x-raw,framerate=30/1 ! glimagesink
d. ! queue ! audioconvert ! pulsesink
*On the other hand, the pipeline below does not work at all:*
$ gst-launch-1.0 udpsrc port=7000 do-timestamp=true ! tsdemux name=d !
h264parse ! avdec_h264 ! videoconvert ! videorate !
video/x-raw,framerate=30/1 ! autovideosink d. ! aacparse ! avdec_aac !
audioconvert ! autoaudiosink
*As a result of the latter pipeline, I get a frozen image, no audio and the
Setting pipeline to PAUSED ...
Pipeline is live and does not need PREROLL ...
Setting pipeline to PLAYING ...
New clock: GstSystemClock
WARNING: from element /GstPipeline:pipeline0/GstTSDemux:d: Delayed linking
Additional debug info:
./grammar.y(506): gst_parse_no_more_pads ():
failed delayed linking some pad of GstTSDemux named d to some pad of
GstAacParse named aacparse0
And it stays that way until I cancel the execution.
*I am supposedly working with the correct parsers, as we can see with
$ gst-discoverer-1.0 udp://192.168.1.109:7000
Done discovering udp://192.168.1.109:7000
As you've suggested, I have tried with rtp depay. It does not open any
window to display the image and the audio doesn't work as well, but it does
not give me any errors. When I run gst-launch with the verbose option, it
does give me some messages, but I don't really know what they mean.
When I was trying to replace decodebin with the equivalent sub-components to
transcode a .ts file, I had to get very specific by placing caps between
queue and h264parse, and also between h264parse and avdec_h264.
Your source, of course, will be different from mine, but these are the caps
I added :
! queue \
! h264parse \
! video/x-h264,format=byte-stream,alignment=au,width=1920,framerate=30/1 \
! avdec_h264 \
! nvvidconv \