Send video stream with audio to an RTMP server
You can use Screen Capturing SDK as a directshow filter and control it through the Windows Registry.
Please check these documentation articles: https://cdn.bytescout.com/help/BytescoutScreenCapturingSDK/html/Screen_Capturer_Filter__DirectShow_video_filter_API_.htm and https://cdn.bytescout.com/help/BytescoutScreenCapturingSDK/html/Screen_Capturing_Filter_Registry_Settings.htm
Also, see this sample source code: