Stream a [u8] frame to an RTMP server using gstreamer-rs


#1

Please is there a way to stream a given frame(i.e [u8]) values to a rtmp server url via gstreamer-rs


#2

Since no one has attempted to formulate an answer, here goes mine.

I understand GStreamer is a media framework. This means it provides some basic functionality for reading and processing media streams (which are all byte streams, [u8]), while actual codecs and other media transformations are written as GStreamer plugins.

Having the GStreamer application installed will allow you to process input data (single/multiple video frames) and send it to a rtmp-sink of your choice. A quick search through google came up with this: https://stackoverflow.com/questions/41550901/how-to-stream-via-rtmp-using-gstreamer
The important part is that you call the program gst-launch (from the GStreamer package) and use the plugin rtmpsink (which you might have to install separately, i’m not sure) to stream input data to the desired smtp server. No use of gstreamer-rs necessary. I do recommend you lookup the CLI docs for getting to know all appropriate parameters which your use case depends on.

So what can you do with gstreamer-rs then? Like it’s README states, you can use the bindings it contains to utilize GStreamer framework functionality into your own project. This basically boils down to: Use it to write your own GStreamer plugin.
… or use the framework in some way for another specific use cases.