Myzhar
September 9, 2016, 10:35am
1
Hi all,
I made an application based on GStreamer and AppSrc to stream a video acquired by a Pleora camera.
I have a problem with the starting order of server and clients: if I start the server, then the clients, the stream is not acquired.
I tried with “config-interval=1” as read in other posts, but without success.
The pipeline that I am using is the following:
"appsrc name=mysource ! video/x-raw, format=I420, framerate=30/1, width=720, height=480 ! videoconvert ! omxh264enc bitrate=2000000 ! h264parse ! rtph264pay pt=96 config-interval=1 ! udpsink host=192.168.1.255 port=16000 sync=false async=false"
The clients (on other machines) are started as:
gst-launch-1.0 udpsrc port=16000 ! 'application/x-rtp, encoding-name=H264, payload=96' ! rtph264depay ! queue ! avdec_h264 ! videoconvert ! ximagesink sync=false async=false
Thank you in advance for help
Walter
Myzhar
September 12, 2016, 11:45am
2
Well, it seems that I solved the problem.
According to what I tested, it seems like the omxh264enc does not send the SPS/PPS (Keyframe) by default, so the option “config-interval=1” alone is not enough and the option “insert-sps-pps=true” must be added to omxh264enc .
This pipeline works pretty well and you can start clients and server in any order:
appsrc name=mysource ! video/x-raw, format=I420, framerate=30/1, width =720, height=480 ! videoconvert ! omxh264enc bitrate=2000000 <b>insert-sps-pps=true</b> ! h264parse ! rtph264pay pt=96 config-interval=1 ! udpsink host=192.168.1.255 port=16000 sync=false async=false
Walt
when we are not using “config-interval=1” and “insert-sps-pps=true” then over pipeline not works perfectly (video not play on rtp).
what is need of this two parameter in pipeline?
You can get details about a gstreamer plugin options with gst-inspect:
gst-inspect-1.0 omxh264enc
...
[b] insert-sps-pps : Insert H.264 SPS, PPS at every IDR frame
flags: readable, writable
Boolean. Default: false[/b]
...
gst-inspect-1.0 rtph264pay
...
[b] config-interval : Send SPS and PPS Insertion Interval in seconds (sprop parameter sets will be multiplexed in the data stream when detected.) (0 = disabled, -1 = send with every IDR frame)
flags: readable, writable
Integer. Range: -1 - 3600 Default: 0 [/b]
...