当前位置: 首页 > 软件库 > 应用工具 > 多媒体工具 >

obs-browser

CEF-based OBS Studio browser plugin
授权协议 GPL-2.0 License
开发语言 JavaScript
所属分类 应用工具、 多媒体工具
软件类型 开源软件
地区 不详
投 递 者 辛意智
操作系统 跨平台
开源组织
适用人群 未知
 软件概览

obs-browser

obs-browser introduces a cross-platform Browser Source, powered by CEF (Chromium Embedded Framework), to OBS Studio. A Browser Source allows the user to integrate web-based overlays into their scenes, with complete access to modern web APIs.

On Windows, this also adds support for Service Integration (linking third party services) and Browser Docks (webpages loaded into the interface itself). macOS support for service integration & browser docks is in the works, and Linux support is planned.

This plugin is included by default on official packages on Windows and macOS. While Linux is supported, the official ppa does not currently include the browser source due to a conflict with GTK.

JS Bindings

obs-browser provides a global object that allows access to some OBS-specific functionality from JavaScript. This can be used to create an overlay that adapts dynamically to changes in OBS.

Get Browser Plugin Version

/**
 * @returns {number} OBS Browser plugin version
 */
window.obsstudio.pluginVersion
// => 1.24.0

Register for event callbacks

/**
 * @typedef {Object} OBSEvent
 * @property {object} detail - data from event
 */

window.addEventListener('obsSceneChanged', function(event) {
	var t = document.createTextNode(event.detail.name)
	document.body.appendChild(t)
})

Available events

Descriptions for these events can be found here.

  • obsSceneChanged
  • obsSourceVisibleChanged
  • obsSourceActiveChanged
  • obsStreamingStarting
  • obsStreamingStarted
  • obsStreamingStopping
  • obsStreamingStopped
  • obsRecordingStarting
  • obsRecordingStarted
  • obsRecordingPaused
  • obsRecordingUnpaused
  • obsRecordingStopping
  • obsRecordingStopped
  • obsReplaybufferStarting
  • obsReplaybufferStarted
  • obsReplaybufferSaved
  • obsReplaybufferStopping
  • obsReplaybufferStopped
  • obsVirtualcamStarted
  • obsVirtualcamStopped
  • obsExit

Control OBS

Get webpage control permissions

Permissions required: NONE

/**
 * @type {number} level - The level of permissions. 0 for NONE, 1 for READ_ONLY, 2 for BASIC, 3 for ADVANCED and 4 for ALL
 *
 * @param {function} callback
 * @returns {Level}
 */
window.obsstudio.getControlLevel(function (level) {
    console.log(level)
})

Get the current scene

Permissions required: READ_ONLY

/**
 * @typedef {Object} Scene
 * @property {string} name - name of the scene
 * @property {number} width - width of the scene
 * @property {number} height - height of the scene
 */

/**
 * @param {function} callback
 * @returns {Scene}
 */
window.obsstudio.getCurrentScene(function(scene) {
	console.log(scene)
})

Get OBS output status

Permissions required: READ_ONLY

/**
 * @typedef {Object} Status
 * @property {boolean} recording - not affected by pause state
 * @property {boolean} recordingPaused
 * @property {boolean} streaming
 * @property {boolean} replaybuffer
 * @property {boolean} virtualcam
 */

/**
 * @param {function} callback
 * @returns {Status}
 */
window.obsstudio.getStatus(function (status) {
	console.log(status)
})

Save the Replay Buffer

Permissions required: BASIC

/**
 * Does not accept any parameters and does not return anything
 */
window.obsstudio.saveReplayBuffer()

Start the Replay Buffer

Permissions required: ADVANCED

/**
 * Does not accept any parameters and does not return anything
 */
window.obsstudio.startReplayBuffer()

Stop the Replay Buffer

Permissions required: ADVANCED

/**
 * Does not accept any parameters and does not return anything
 */
window.obsstudio.stopReplayBuffer()

Start streaming

Permissions required: ALL

/**
 * Does not accept any parameters and does not return anything
 */
window.obsstudio.startStreaming()

Stop streaming

Permissions required: ALL

/**
 * Does not accept any parameters and does not return anything
 */
window.obsstudio.stopStreaming()

Start recording

Permissions required: ALL

/**
 * Does not accept any parameters and does not return anything
 */
window.obsstudio.startRecording()

Stop recording

Permissions required: ALL

/**
 * Does not accept any parameters and does not return anything
 */
window.obsstudio.stopRecording()

Pause recording

Permissions required: ALL

/**
 * Does not accept any parameters and does not return anything
 */
window.obsstudio.pauseRecording()

Unpause recording

Permissions required: ALL

/**
 * Does not accept any parameters and does not return anything
 */
window.obsstudio.unpauseRecording()

Start the Virtual Camera

Permissions required: ALL

/**
 * Does not accept any parameters and does not return anything
 */
window.obsstudio.startVirtualcam()

Stop the Virtual Camera

Permissions required: ALL

/**
 * Does not accept any parameters and does not return anything
 */
window.obsstudio.stopVirtualcam()

Register for visibility callbacks

This method is legacy. Register an event listener instead.

/**
 * onVisibilityChange gets callbacks when the visibility of the browser source changes in OBS
 *
 * @deprecated
 * @see obsSourceVisibleChanged
 * @param {boolean} visibility - True -> visible, False -> hidden
 */
window.obsstudio.onVisibilityChange = function(visibility) {

};

Register for active/inactive callbacks

This method is legacy. Register an event listener instead.

/**
 * onActiveChange gets callbacks when the active/inactive state of the browser source changes in OBS
 *
 * @deprecated
 * @see obsSourceActiveChanged
 * @param {bool} True -> active, False -> inactive
 */
window.obsstudio.onActiveChange = function(active) {

};

Building

OBS Browser cannot be built standalone. It is built as part of OBS Studio.

By following the instructions, this will enable Browser Source & Custom Browser Docks on all three platforms. Both BUILD_BROWSER and CEF_ROOT_DIR are required.

On Windows

Follow the build instructions and be sure to download the CEF Wrapper and set CEF_ROOT_DIR in CMake to point to the extracted wrapper.

On macOS

Use the macOS Full Build Script. This will automatically download & enable OBS Browser.

On Linux

Follow the build instructions and choose the "If building with browser source" option. This includes steps to download/extract the CEF Wrapper, and set the required CMake variables.

  • 在升级obs-browser,需要把obs-browser-page打包进来,但在本地上跑是正常,到其他机子上运行,加载浏览器插件时就crash。分析步骤: obs-browser 依赖于CEF,在确定了CEF已经一致的,排出了CEF 里“Chromium Embedded Framework.framework”库的问题 通过加log代码,确定了代码在CefInitialize(args, se

  • 参考 https://github.com/obsproject/obs-browser 编译 cef,有些版本号可能编译不过或者与 obs browser 不匹配,需要多尝试,本人测试多次才找到 3626 的 32 位版本与最新的 obs browser 编译成 32 位才调通 下载 http://opensource.spotify.com/cefbuilds/index.html cef_b

  • OBS 与webrt 结合开发,先从熟悉obs开始。 OBS CMakelist.txt 学习obs 先从构建看起 本文记录了主txt 和 UI 构造exe的txt 支持浏览器融合,与 https://github.com/obsproject/obs-browser 有关 obs-studio cmake list 支持不编译UI, 在CMake中新建一个BOOL变量:DISABLE_UI 必须

  • obs是国外开源的直播推流工具,用的很多。本人从 https://github.com/obsproject/obs-studio下载源码编译,具体的过程请参考https://github.com/obsproject/obs-studio/wiki/Install-Instructions#windows-build-directions,但这个要求使用VS2017编译,我的还是VS2015,编

  • 安装源码 根据wiki来 https://github.com/obsproject/obs-studio/wiki/install-instructions#windows-build-directions 安装browser插件 根据这个项目来 https://github.com/obsproject/obs-browser 源码文档 https://obsproject.com/docs/

 相关资料
  • OBS Studio 是一款用于实时流媒体和屏幕录制的软件,为高效捕获,合成,编码,记录和流传输视频内容而设计,支持所有流媒体平台。 特性: 高性能实时视频/音频捕获和混合。创建由多种来源组成的场景,包括窗口捕获,图像,文本,浏览器窗口,网络摄像头,捕获卡等。 设置无限数量的场景,用户可以通过自定义过渡无缝切换。 带有每个源滤波器的直观音频混合器,例如噪声门,噪声抑制和增益。全面控制VST插件支持

  • This repository provides the build tool to build binary packages in aa safe and reproducible way. It can be used standalone or within theOpen Build Service (OBS). Latest packages for obs-build are ava

  • 我已经在Ubuntu14.04上安装并启动了nginx服务器。我的目标是使用HLS(http live streaming)流媒体视频(live)。我遵循了本教程https://www.vultr.com/docs/setup-nginx-on-ubuntu-to-stream-live-hls-video,它推荐使用OBS-Studio。然而,我不知道如何从OBS-STUDIO流到Nginx,然

  • 我想将静态图像流式传输到android studio仿真器。为此,我在linux ubuntu 20.04中使用v4l2loopback v.12.5创建了一个虚拟相机。虚拟摄像机在/dev/video2中创建。我可以使用obs和一个插件,ffmpeg或gstreamer在那里流式传输,但我对每一个都有不同的问题。我不在乎哪个软件能用...我总是使用分辨率为1920x1080的图像来测试这一点。

相关阅读

相关文章

相关问答

相关文档