Gstreamer-1.0 Mp4 video RTSP streaming - appsrc

Shaf shaf.nttf at gmail.com
Mon Mar 4 01:48:06 UTC 2019


Hi Stephen,

I have already tried test-mp4.c and it works perfectly. But now I am trying
to make a mp4 streaming server that can continuously play a video/a
different video when the pipeline encounters EOS.

So my aim is to :
1. Play .mp4 file using appsink, using a bus callback I will detect the EOS
and change the source file [This way I can run video continuously or change
the file src location]
2. Use appsrc to dynamically connect with appsink to pull the buffer and
stream the output via rtsp.
[This will be useful for RTSP file streaming]

I could do the above using a playbin for appsink and then detect EOS by
bus-callback signal.

Now I am trying to see, if I can replace the playbin to a construct the
apprsc pipeline dynamically. The difficulty I face here is to convert the
below pipeline by linking elements separately :

Playbin [appsink]: 
GstElement *playbin = gst_parse_launch(" filesrc
location=C:/videos/dolby.mp4 ! qtdemux name=mdemux ! h264parse !
video/x-h264,stream-format=byte-stream ! appsink name=video_sink 
emit-signals=FALSE sync=TRUE drop=TRUE num-buffers=2000 ", NULL);

I expect to create the above pipeline something like this :
	/* Create the elements */
	data.source = gst_element_factory_make("filesrc", "source");
	data.qtdemuxer = gst_element_factory_make("qtdemux", "mdemux");
	data.h264parser = gst_element_factory_make("h264parse", "h264_parse");
	data.sink = gst_element_factory_make("appsink", "video_sink");

I have no much idea of linking qtdemux to appsink. Going through the
documents [gst-inspect-1.0 qtdemux], I came to know that qtdemux is sometime
pad and need to link it using pad-added callback.

I have not seen any examples for linking qtdemux to appsink. So trying to
understand.

If you have any suggestion please let me know. Thanks for your support !









--
Sent from: http://gstreamer-devel.966125.n4.nabble.com/


More information about the gstreamer-devel mailing list