Continuously streaming a video file code review

Shabeer shaf.nttf at gmail.com
Mon Feb 18 01:06:00 UTC 2019


Hi Russel,

I have the similar requirement and I tried your source code to stream a mp4
video continuously using RTSP. But the video seems not displayed.
<br/>

1. The pipeline seems to be proper and the bus callback and need data
function is invoked.<br/>
/const gchar *pipe_line_string = "appsrc name=mysrc is-live=true max-bytes=0
do-timestamp=true min-latency=0 ! queue ! h264parse name=parse ! queue !
rtph264pay name=pay0 pt=96 timestamp-offset=0";
/
<br/>
2. The caps string is retrieved from the video file using the
"gst-discoverer-1.0  xx.mp4 -v" command 
    [Is this the proper way to fetch the caps ? ] <br/>

/const gchar *videocaps =  "video/x-h264, stream-format=(string)avc,
alignment=(string)au, level=(string)2.1, profile=(string)high,
codec_data=(buffer)01640015ffe1001967640015acd941e08fea1000000300100000030320f162d96001000668ebe3cb22c0,
width=(int)480, height=(int)270, framerate=(fraction)25/1,
pixel-aspect-ratio=(fraction)1/1, interlace-mode=(string)progressive,
chroma-format=(string)4:2:0, bit-depth-luma=(uint)8,
bit-depth-chroma=(uint)8, parsed=(boolean)true";/

<br/>
3.  Using this command [client]
gst-launch-1.0 playbin uri="rtsp://19x.16x.12x.xx:554/test" tried to play
the video stream.
<br/>
4. The command line shows the server is active and the video is streaming.
But no video output is displayed in the console. need_data and bus_callback
functions are called when needed and I could see the buffer is pushed to
appsrc.
<br/>
5. The .mp4 file has both audio and video. But the pipeline constructed has
only video src. I was able to use the same pipeline and stream the video
without appsrc. 
<br/>
I am sure that the issue may be in caps filters, but not sure how to build
the cap filters manually.The problem occurs only when trying to use appsrc
to stream the video. Can you please suggest the issue in the below code ? 
<br/>
I am using appsrc to continuously stream the video by adding a bus watch for
the EOS. Also tried using VLC to stream the video, no video is displayed but
I could see the seekbar is moving with time lapsed [which means the video is
streamed but not displayed due to wrong caps ?? ]

<br/>

Many thanks

Shaf



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


More information about the gstreamer-devel mailing list