ScnLib_SetStreamingUrl()

ScnLib_SetStreamingUrlA/W()

Std EditionPro EditionMax EditionUltra Edition
C++ __declspec(dllimport) void __stdcall ScnLib_SetStreamingUrlA(LPCSTR pcszURL, LPCSTR pcszKey);
__declspec(dllimport) void __stdcall ScnLib_SetStreamingUrlW(LPCWSTR pcwszURL, LPCWSTR pcwszKey);
C# [DllImport("ScnLib.dll", CharSet = CharSet.Unicode)] public static extern void ScnLib_SetStreamingUrlW(string URL, string Key);
Basic Public Declare Unicode Sub ScnLib_SetStreamingUrlW Lib "ScnLib.dll" (ByVal URL As String, ByVal Key As String)
Delphi procedure ScnLib_SetStreamingUrlA(const URL: PAnsiChar; const Key: PAnsiChar); stdcall; external 'ScnLib.dll';
procedure ScnLib_SetStreamingUrlW(const URL: PWideChar; const Key: PWideChar); stdcall; external 'ScnLib.dll';
  • Description
    Set the live streaming address.

  • Parameters
    • URL [in]
      The live streaming address of RTMP/RTMPS protocol. Set a zero value or an empty string to deactivate the live streaming feature. Typically, a live streaming address follows this format:
      rtmp(s)://<media-server-address>[:port]/<application>/[appInstance]
      Where
      • rtmp(s): Represents the protocol type. Use 'rtmp' for RTMP protocol, or 'rtmps' for RTMPS protocol.
      • <media-server-address>: The domain name or IP address of the media server, which could be an online video website or a local network server.
      • [:port]: The TCP port for the connection, typically 1935 for RTMP or 443 for RTMPS.
      • <application>: The name of the application, generally a public access point identifier.
      • [appInstance]: The name of the application instance, often a private stream key exclusive to the user.
    • Key [in]
      The live streaming key. You may set the streaming key as the application instance name. If a zero value or an empty string is passed, this parameter will be ignored and the full live streaming address should be included in the URL parameter. For instance:
      ScnLib_SetStreamingUrlA("rtmp://live.twitch.tv/app","live_84397912_jVSmpJOfADNXMCO9g1rziQbyVERdIf")
      is equivalent to
      ScnLib_SetStreamingUrlA("rtmp://live.twitch.tv/app/live_84397912_jVSmpJOfADNXMCO9g1rziQbyVERdIf","")
  • Return Value
    None.

  • Remarks
    Use this function to set the live streaming address. The SDK is capable of live streaming your real-time screen recording video to a media server using the RTMP/RTMPS protocol. Many live video broadcasting platforms (like Twitch) provide a public ingest server address and a private stream key. Here, the ingest server address corresponds to <media-server-address>, and the stream key matches [appInstance]. A typical live streaming address for Twitch might resemble:
    rtmp://live.twitch.tv/app/live_84397912_jVSmpJOfADNXMCO9g1rziQbyVERdIf
    Note that live streaming addresses can vary for different websites/servers due to distinct server configurations.

    By default, the live streaming address is an empty string. To activate live streaming, set a valid live streaming address and key with this function before starting your recording. Changing the live streaming address during the recording process is permitted. To retrieve the current live streaming address and key, call ScnLib_GetStreamingUrlA/W(). To verify whether live streaming is active, call ScnLib_IsStreaming().

  • See Also
    ScnLib_GetStreamingUrlA/W()
    ScnLib_SetStreamingBitrate()
    ScnLib_IsStreaming()

Try the SDK for FREE SDK APIs overview