Skip to main content

RTMP streaming

Products: Video Capture SDK .Net

The SDK is adept at streaming both video and audio to RTMP servers, such as Wowza, and various social platforms, including YouTube, Twitch, and Facebook. It utilizes FFMPEG for RTMP streaming, a powerful tool known for its versatility in handling multimedia data. This feature enables seamless live broadcasting and content delivery to a wide audience across different platforms. Its compatibility with popular streaming services and RTMP servers enhances its utility for a range of applications, from professional broadcasting to casual live streaming. The integration of FFMPEG ensures efficient, high-quality streaming, making the SDK a robust choice for developers in the multimedia streaming domain.

Sample code

Video and audio encoder configuration

Set the Network_Streaming_Enabled property to true to enable network streaming.

VideoCapture1.Network_Streaming_Enabled = true;

Set network streaming format to RTMP_FFMPEG_EXE and create FFMPEGEXEOutput object.

VideoCapture1.Network_Streaming_Format = NetworkStreamingFormat.RTMP_FFMPEG_EXE;

var ffmpegOutput = new FFMPEGEXEOutput();

Set the output format and video and audio codecs.

ffmpegOutput.FillDefaults(DefaultsProfile.MP4_H264_AAC, true);

Set the output muxer.

ffmpegOutput.OutputMuxer = OutputMuxer.FLV;

Configure output.

VideoCapture1.Network_Streaming_Output = ffmpegOutput;

Enable audio streaming (required for YouTube and Facebook Live).

VideoCapture1.Network_Streaming_Audio_Enabled = true;

YouTube streaming

Set the URL to rtmp://a.rtmp.youtube.com/live2/ + YouTube stream key.

VideoCapture1.Network_Streaming_URL = "rtmp://a.rtmp.youtube.com/live2/" + "YOUR KEY HERE";

Facebook Live streaming

Set the URL to rtmps://live-api-s.facebook.com:443/rtmp/ + Facebook stream key.

VideoCapture1.Network_Streaming_URL = "rtmps://live-api-s.facebook.com:443/rtmp/" + "YOUR KEY HERE";

Other RTMP servers

Set the URL to the RTMP server URL.

VideoCapture1.Network_Streaming_URL = "rtmp server url";

See also


Visit our GitHub page to get more code samples.