Obs lua example

Create your free GitHub account today to subscribe to this repository for new releases and build software alongside 40 million developers. Note: please download Hotfixes have been released since this update. Skip to content. Dismiss Be notified of new releases Create your free GitHub account today to subscribe to this repository for new releases and build software alongside 40 million developers. Sign up. Releases Tags. Choose a tag to compare.

Search for a tag. Lua is supported via Luajit, which comes with the program. Lua is recommended for high-performance scripts, automation, and sources. Python is available if access to its convenient libraries is desired.

On windows, to use Python, Python version 3. Added an example Lua script: An "Instant Replay" script which automatically saves a replay if there's an active replay buffer, and then plays back that replay in a specified media source after that replay has saved. Added an example Python script: A "URL Text" script which sets the text of a specified text source to the text downloaded from a specified URL every specified interval. This allows the ability to lower the audio level of an audio source based on how loud another source is.

Added surround sound audio output support, which allows outputting 2. When using this feature, please also make sure to increase your audio bitrate to support all the channels in output settings.

Lua Hello World Example: How To Write and Execute Lua Program on Linux OS

Although some services like Twitch support it, note that certain services such as YouTube may not fully support surround sound streaming, and may not downmix them correctly for stereo viewers Added new audio meters to allow the ability to see the audio levels of each audio channel of that source. This allows the ability to know if there are any issues with a specific audio channel e. Changed audio meters to behave like peak programme meters.

This will make it easier to see if your audio is clipping and set your audio levels correctly. Added the ability to rename audio sources via right-clicking them in the audio mixer, including desktop and microphone audio capture sources added via audio settings. Scenes in the Multiview can be clicked to change the scene or the preview scene in studio mode.

You can blacklist certain scenes from displaying in the multi-view by right-clicking the scene in the scenes list and unchecking "Show in Multiview".

You can also change the Multiview's layout style in general settings. Added an option in general settings that allows you to transition to a scene in studio mode simply by double-clicking on it.

This also applies to the multiview projector. Added separate projectors for both preview and program views in studio mode.Rendering Graphics.

Scripting Scripts can be added, removed, and reloaded in real time while the program is running. To use Python on windows, you must download and install Python 3.

obs lua example

Then, in the scripting dialog, you must set the path to the Python 3. Called on script startup with specific settings associated with the script. The settings parameter provided is not typically used for settings that are set by the user; instead the parameter is used for any extra internal settings data that may be used in the script.

Called when the script is being saved. This is not necessary for settings that are set by the user; instead this is used for any extra internal settings data that may be used in the script.

Called to set default settings if any associated with the script. You would typically call Default Value Functions for the on the settings in order to set its default values. Called to define user properties associated with the script.

These properties are used to define how to show settings properties to a user. Called every frame in case per-frame processing is needed. Using this function in Python is not recommended due to the global interpreter lock of Python. Removes a timer callback. It is possible to register sources in Lua. Certain functions are implemented differently from the C API due to how callbacks work.

Lua only: Adds a primary output render callback. This callback has no parameters. Adds a callback to a specific signal on a signal handler. Adds a global callback to a signal handler. Navigation index next previous OBS Studio Parameters: settings β€” Settings associated with the script.

obs lua example

Parameters: seconds β€” Seconds passed since previous frame. Returns: An array of reference-incremented sources. Returns: List of scene items. Parameters: callback β€” Render callback. Parameters: name β€” Unique name identifier string of the hotkey.

Parameters: callback β€” Callback of the hotkey to unregister. The callback takes no parameters. This callback is automatically cleaned up.So you want to contribute programming for OBS Studio?

Whether you're making a new plugin or tinkering with OBS's core, we appreciate all contributions to the project. Follow this guide to get up and running. It is highly recommended that you read OBS Studio's Contributing guide so that you know code guidelines as well as what is required when you want to submit a change.

Our developer community is always helpful to new developers wanting to get their feet wet with OBS programming. The next step is to get the program building so that you can start making your modifications or plugins. The bug tracker uses your forum login credentials, so you don't have to log in twice.

Feel free to explore ideas, issues, suggestions, and bugs, and if you feel so inclined, try your hand at implementing one! Many people want to get into OBS Studio development in order to make a plugin, rather than alter core functionality.

It turns out that OBS code is already pretty modular, and many features that are considered "core" features are actually plugins that just come bundled with OBS, so learning about OBS development really means learning about plugin development as well.

In fact, you can even make new plugins with Lua though not with Python. That means that if you create a plugin for OBS Studio or a modified version of OBS Studio and distribute it in binary form, you must give users a way to access the source code of your binary. Otherwise, you will be in violation of the license. The easiest way to do this is to have a public Github repository of your fork or plugin, and include a text file in your download for the binary containing a link to the repo.

The relevant part of the license is under section 3 of the GPLv2. Developer Chat Our developer community is always helpful to new developers wanting to get their feet wet with OBS programming. Build the code The next step is to get the program building so that you can start making your modifications or plugins.

Plugin Development Many people want to get into OBS Studio development in order to make a plugin, rather than alter core functionality. Thanks for being willing to help out, and good luck!Forums New posts Search forums. What's new New posts New resources New profile posts Latest activity.

Resources Latest reviews Search resources. Members Current visitors New profile posts Search profile posts. Log in Register. Search titles only. Search Advanced search…. New posts. Search forums. Log in. For a better experience, please enable JavaScript in your browser before proceeding.

Lua OBS Script; Cross-Script Communication

Thread starter superlou Start date Feb 12, Overview Reviews 1 History Discussion. Each text source can be formatted using Lua date format strings. Hotkeys may be set to toggle Banyarola Member. What is 'DSK'? DSK is short for "down-stream key.

OBS Studio 21.0.2 (macOS Release)

This tool isn't as extensive as many modern software DSK solutions. Matt Franklin New Member. Do you think you could run up a demo on YouTubeor somewhere? I love the sound of this plugin, but I'm so used to jurry-rigging scenes and transitions that I can't wrap my head around the DSK workflow or implementation.

PS: Thanks for designing tools fore something other than "Let's Play" streaming! It starts around 48 seconds in because I forgot that if the program output is black, so is the stream. I'm hoping to put together some nicer demos after I get my next script working.Quick links.

Example script for OBS with usb keypad homemade streamdeck How can be this controlled in that simulator? Can HIDmacros be used with this application? I tried using HID macros, but ran into the issue where the keypress occurs too fast for OBS to detect it when not the active window. Last edited by mrKaine83 on Mon Jan 01, pm, edited 1 time in total. Re: Example script please? Last edited by mrKaine83 on Tue Mar 06, pm, edited 2 times in total.

Is there a way you could assist me and others with a more detailed walkthrough? I actually put together a video tutorial that should hopefully clear things up.

Just 2 small comments: - the "number" part from device id doesn't have to be from that specific place. It can be any part of that long value which is unique between other values for other keyboards - you don't need HidMacros to get the key number. I believe those number are virtual key codes so you can find it at web google it or the easiest way is to log the value in script even if it is not used by the code. Or just similar print command at the beginning of callback handler.

I have been asking for a clarification on how button "press" or "releases" work but the person whom i ask help for does not seem to care It's not enough to combine some scripts if you don't understand what they are doing. Board index All times are UTC.The script is too long to embed in this page, and it's much better to view it in a text editor that supports Lua syntax highlighting, because there are a lot of comments in the script explaining things.

The purpose of this script is two-fold: To provide a reference tutorial for others writing Wireshark dissectors in Lua To test various functions being called in various ways, so this script can be used in the test-suites If you wonder why some functions are called some way, or differently than previous invocations of the same function: the reason is its trying to to show both that it can be done numerous ways, but also trying to test those numerous ways.

This script creates an elementary dissector for DNS. It's neither comprehensive nor error-free with regards to the DNS protocol. That's OK. We don't need another one. We also have other example Lua scripts, but the nice thing about this one is getting capture files to run it against is trivial.

If you have a capture file with DNS packets in it, simply select one in the Packet List pane, right-click on it, and select "Decode As A dissector tutorial with TCP-reassembly Download this fpm. How to use this script: Once the script is loaded, it creates a new protocol named "FPM". Like the dissector tutorial script above, this script is too long to embed in this page, and it's much better to view it in a text editor that supports Lua syntax highlighting, because there are a lot of comments in the script explaining things.

obs lua example

Also like dissector tutorial script above, the purpose of this script is to provide a reference tutorial as well as a test script. This script creates an elementary file reader and writer for the legacy pcap file format. The goal isn't to do that.

The reason this was written is getting "test" files to see how it works is trivial, since any pcap file will do the old style pcap files, not pcapng. How to use this script: Once the script is loaded, it actually inserts itself as a new file reader before the built-in pcap file reader, so opening any pcap file means this new file reader is the one reading it.

Like any Lua script, you can load it one of three ways: By putting it in the personal plugins directory. By loading it from init. The last method is the one recommended for this file reader, so that you don't inadvertently continue using this file reader when you don't intend to.

What does that mean? It means it reads a pcap file and displays the contents of the file format itself, showing the file header, record headers, etc. To do this it creates a "pcapfile" protocol dissector, with associated protocol fields of what pcap file formats have. This implements both a Lua-based dissector and custom file format reader.

Like the tutorial scripts above, this script is too long to embed in this page, and it's much better to view it in a text editor that supports Lua syntax highlighting, because there are a lot of comments in the script explaining things. There are several preferences that can be set in Wireshark, under the " PcapFile " protocol. Like any Lua script, you can load it one of three ways: By putting both scripts in the personal plugins directory.

It usually displays "Automatic". Select the "Fileshark Pcap" from that drop-down list, and select the file you want to open, and it will display that file in FileShark mode. For example, this reads in a file named " test. By default it creates one for "frame", but we're tapping IP layer.GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together. If nothing happens, download GitHub Desktop and try again.

If nothing happens, download Xcode and try again. If nothing happens, download the GitHub extension for Visual Studio and try again. With Version This repository holds some example scripts. Nothing here has been rigorously tested and has no warranty. It will likely set your computer on fire. Skip to content. Dismiss Join GitHub today GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.

obs lua example

Sign up. No description, website, or topics provided. Python Shell. Python Branch: master. Find file. Sign in Sign up. Go back. Launching Xcode If nothing happens, download Xcode and try again. Latest commit. Latest commit f2f Jun 20, You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Mar 25, Add GPLv3. Jan 24, Release memory in helloworld script.

Jan 26, Add pep8 verification test script. Add Readme. Add sc2 script. Jun 20, Add flake8 testing.


thoughts on “Obs lua example

Leave a Reply

Your email address will not be published. Required fields are marked *