Inputs are OBS’s sources (browser sources, text, media, capture devices, and so on). This guide covers creating and managing inputs, controlling media playback, editing input settings, and working with hardware capture-device properties.
| Function | Description |
|---|
CreateInput(Scene, Name, Kind, Settings, Enabled) | Create new input and add to scene |
CreateInputFromString(Scene, Name, Kind, JsonSettings, Enabled) | Blueprint-friendly version |
RemoveInput(Name) | Remove input (must not be in any scene!) |
SetInputName(Name, NewName) | Rename an input |
GetInputKindList(bUnversioned) | Fetch available input kinds (source types) |
GetCachedInputKinds() | Get locally cached input kinds |
| Kind | Description |
|---|
browser_source | Web browser |
text_gdiplus_v3 | Text (GDI+, Windows) |
text_ft2_source_v2 | Text (FreeType2) |
ffmpeg_source | Media Source |
image_source | Image |
color_source_v3 | Solid Color |
vlc_source | VLC Video |
window_capture | Window Capture |
game_capture | Game Capture |
dshow_input | Video Capture Device |
wasapi_input_capture | Audio Input |
wasapi_output_capture | Audio Output Capture |
Notes:
CreateInput atomically creates the input and adds it to the specified scene.
RemoveInput will fail if the input is still referenced by any scene. Remove all scene items first.
- Input names must be globally unique in OBS.
- Use
GetInputKindList(true) for unversioned names (simpler, recommended).
| Function | Description |
|---|
PlayMedia(Name) | Start playback |
PauseMedia(Name) | Pause playback |
StopMedia(Name) | Stop playback |
RestartMedia(Name) | Restart from beginning |
NextMedia(Name) | Go to next item in playlist |
PreviousMedia(Name) | Go to previous item in playlist |
SetMediaInputCursor(Name, Ms) | Seek to position in milliseconds |
OffsetMediaInputCursor(Name, OffsetMs) | Seek relative to current position |
SeekToPercent(Name, Percent) | Seek to percentage of duration (0.0 to 1.0) |
GetMediaInputStatus(Name) | Fetch media status (state, duration, cursor) |
GetCachedMediaInputStatus(Name) | Get locally cached media status |
OnMediaInputPlaybackStarted(InputName): Media started playing
OnMediaInputPlaybackEnded(InputName): Media finished playing
OnMediaInputActionTriggered(InputName, Action): Media action was triggered
OnMediaInputStatusReceived(Status): Media status was fetched
| Function | Description |
|---|
GetInputSettings(Name) | Fetch current settings for an input (async) |
GetInputSettingsByUuid(Uuid) | Fetch settings by input UUID |
SetInputSettings(Name, Settings, Overlay) | Set input settings (JSON object) |
SetInputSettingsFromString(Name, JsonStr, Overlay) | Set input settings (JSON string) |
GetInputDefaultSettings(Kind) | Get default settings for an input type |
SetTextSourceText(Name, Text) | Set text content for text sources |
SetBrowserSourceUrl(Name, Url) | Set URL for browser sources |
SetImageSourceFile(Name, Path) | Set file path for image sources |
SetMediaSourceFile(Name, Path, Loop) | Set file path for media sources |
SetColorSourceColor(Name, Color) | Set color (ABGR int64 format) |
GetCachedInputSettings(Name) | Get locally cached settings (JSON object) |
GetCachedInputSettingsString(Name) | Get locally cached settings (JSON string) |
HasCachedSettings(Name) | Check if settings are cached for an input |
| Input Kind | Convenience Method | Settings Key |
|---|
text_gdiplus_v3 | SetTextSourceText() | text |
text_ft2_source_v2 | SetTextSourceText() | text |
browser_source | SetBrowserSourceUrl() | url |
image_source | SetImageSourceFile() | file |
ffmpeg_source | SetMediaSourceFile() | local_file, looping |
color_source_v3 | SetColorSourceColor() | color (ABGR) |
Note: Use bOverlay=true (default) to merge with existing settings, or false to replace all settings.
Device Properties (Capture Devices)
For inputs backed by hardware (capture cards, webcams, audio devices), the InputSettings handler can enumerate a device-list property’s options and “press” a properties button. These are reached via GetClient()->GetInputSettings():
| Function | Description |
|---|
GetInputPropertiesListPropertyItems(Input, Property) | Enumerate a list property’s items (e.g. video_device_id). Async: fires OnInputPropertyItemsReceived with FOBSPropertyItems |
PressInputPropertiesButton(Input, Property) | ”Press” a properties button (e.g. an activate/refresh button), handy to recover a stalled capture device |
Useful for building an in-engine device picker, or re-activating a capture device that dropped.
// Enumerate the available cameras for a video capture device input.
Subsystem->GetClient()->GetInputSettings()
->GetInputPropertiesListPropertyItems(TEXT("Webcam"), TEXT("video_device_id"));
// Re-activate a stalled capture device.
Subsystem->GetClient()->GetInputSettings()
->PressInputPropertiesButton(TEXT("Webcam"), TEXT("activate"));
See also