Changes between Version 11 and Version 12 of gstreamer


Ignore:
Timestamp:
03/10/2020 06:17:46 PM (3 years ago)
Author:
Tim Harvey
Comment:

added gst-variable-rtsp-server example

Legend:

Unmodified
Added
Removed
Modified
  • gstreamer

    v11 v12  
    12511251
    12521252
     1253[=#gst-variable-rtsp-server]
     1254=== gst-variable-rtsp-server
     1255[https://github.com/Gateworks/gst-gateworks-apps/blob/master/src/gst-variable-rtsp-server.c gst-variable-rtsp-server] is a solution created by Gateworks that allows changing the quality of a live stream on the fly based on the number of clients connected to the server. Similar to other adaptive bitrate technologies, it can change quality based on information is knows about the stream. In our case, the number of connected clients was deemed as appropriate.
     1256
     1257This application can change the {{{video_bitrate}}} control of the {{{v4l2h264enc}}} element based on the {{{--steps}}} input (default to 5). For example, if using the default {{{steps}}} value of 5, if the min bitrate was 500 and max bitrate was 2000, it would take 5 clients to get from the best to the worst quality.
     1258
     1259Example:
     1260 * Start a RTSP server using videotestsrc on default port of 9099 serving H264:
     1261{{{
     1262#!bash
     1263gst-variable-rtsp-server "videotestsrc ! v4l2h264enc ! rtph264pay name=pay0 pt
     1264=96"
     1265}}}
     1266
     1267To connect as a client, you can use any program that can connect to an RTSP stream. Below is an example connecting with GStreamer:
     1268{{{
     1269#!bash
     1270gst-launch-1.0 rtspsrc location=rtsp://172.24.10.180:9099/stream latency=10 ! decodebin ! autovideosink
     1271}}}
     1272
     1273With the above, if there is only a single client, the stream will be at it's best quality. But as you connect more clients, the quality of the stream will drop in order to account for network congestion.
     1274
    12531275
    12541276[=#rtmp]