Skip to content

Desuq Cafe

Documentation menu

Scene Collections & Profiles

OBS organizes its configuration into scene collections (groups of scenes and sources) and profiles (output, encoder, and service settings). This guide covers switching between them, configuring video output, and setting the stream service destination.

Scene Collections

FunctionDescription
GetSceneCollectionList()Refresh scene collection list from OBS
SetCurrentSceneCollection(Name)Switch to a scene collection (causes OBS reload!)
CreateSceneCollection(Name)Create new collection and switch to it
GetCachedSceneCollections()Get locally cached collection names
GetCurrentSceneCollectionName()Get current collection name (cached)

Warning: Switching scene collections causes OBS to reload all sources, so expect a brief pause.

Profiles

FunctionDescription
GetProfileList()Refresh profile list from OBS
SetCurrentProfile(Name)Switch to a profile
CreateProfile(Name)Create new profile and switch to it
RemoveProfile(Name)Delete a profile (cannot delete current!)
GetProfileParameter(Category, Name)Get a profile config parameter
SetProfileParameter(Category, Name, Value)Set a profile config parameter
GetCachedProfiles()Get locally cached profile names
GetCurrentProfileName()Get current profile name (cached)

Common Profile Parameters

CategoryParameterDescription
OutputRecFilePathRecording output directory
OutputModeOutput mode (Simple/Advanced)
StreamkeyStream key
StreamserverRTMP server URL

Video Settings

FunctionDescription
GetVideoSettings()Fetch current resolution and FPS
SetVideoSettings(Settings)Set multiple video settings at once
SetBaseResolution(Width, Height)Set canvas resolution
SetOutputResolution(Width, Height)Set output/scaled resolution
SetFPS(Numerator, Denominator)Set framerate
GetCachedVideoSettings()Get locally cached video settings

Warning: Video settings cannot be changed while streaming or recording!

Common FPS Values

FPSNumeratorDenominator
24241
30301
29.97 (NTSC)300001001
60601
59.94 (NTSC)600001001
1201201

Stream Service Settings

FunctionDescription
GetStreamServiceSettings()Fetch current stream destination settings
SetStreamServiceSettings(Settings)Set stream service using struct
SetSimpleRTMPSettings(Server, StreamKey)Quick setup for custom RTMP
GetCachedStreamServiceSettings()Get locally cached stream settings

Service Types

TypeDescription
rtmp_customCustom RTMP server (you provide server URL)
rtmp_commonPre-configured services (Twitch, YouTube, etc.)

Common RTMP Servers

ServiceServer URL
Twitchrtmp://live.twitch.tv/app
YouTubertmp://a.rtmp.youtube.com/live2
Facebookrtmps://live-api-s.facebook.com:443/rtmp/
Kickrtmps://fa723fc1b171.global-contribute.live-video.net/app/

Settings Struct (FOBSStreamServiceSettings)

FieldTypeDescription
StreamServiceTypeFStringrtmp_custom or rtmp_common
ServerFStringRTMP server URL (for rtmp_custom)
KeyFStringStream key (sensitive!)
ServiceFStringService name (for rtmp_common, e.g., “Twitch”)
bUseAuthboolWhether to use authentication
UsernameFStringAuth username
PasswordFStringAuth password

Notes:

  • Changes require a stream restart to take effect.
  • Stream key is sensitive data, so handle it securely.
  • OBS does not push events for these settings, so use manual refresh.

Events

Subscribe to these events to react to configuration changes:

  • OnCurrentSceneCollectionChanging(SceneCollectionName): About to change scene collection
  • OnCurrentSceneCollectionChanged(SceneCollectionName): Scene collection changed
  • OnSceneCollectionListChanged: Scene collection list was modified
  • OnCurrentProfileChanging(ProfileName): About to change profile
  • OnCurrentProfileChanged(ProfileName): Profile changed
  • OnProfileListChanged: Profile list was modified
  • OnStreamServiceSettingsReceived(Settings): Stream service settings fetched

See also