How to multiplex audio and video into mpegtsmux
jmz
jmzheng at gmail.com
Fri Oct 6 10:04:16 UTC 2017
Hi,
I can use gst-launch tool to save RTSP A/V stream to MPEG TS file, but fail
in GStreamer application.
In my application, I add rtspsrc, mpegtsmux, and filesink to a pipeline, and
then set the pipeline to PLAYING. On the "pad-added" signal of rtspsrc, I
create the corresponding elements for the audio and video (for example,
depayloader and parser), add elements to the pipeline, link elements
together, and sync state with pipeline.
If I handle only audio or video, the application works well. If both audio
and video are added to the pipeline in the pad-added callback, error occurs:
ERROR: from element /GstPipeline:pipeline/MpegTsMux:mpegtsmux0: Could not
multiplex stream.
Stream on pad <mpegtsmux0:sink_66> is not associated with any program
Additional debug info:
mpegtsmux.c(1192): mpegtsmux_collected_buffer ():
/GstPipeline:pipeline/MpegTsMux:mpegtsmux0
I am sure that all elements are linked correctly within the pipeline. The
error looks like mpegtsmux (as well as the pipeline) has been PLAYING after
one stream source is linked with it in the pad-added callback, and other
stream cannot be added to the playing mpegtsmux.
How to correctly multiplex audio and video into mpegtsmux in application?
Thanks for help.
--
Sent from: http://gstreamer-devel.966125.n4.nabble.com/
More information about the gstreamer-devel
mailing list