File Output

File Output
Section titled “File Output”File Output writes your current track information to a plain text file on your local machine every time your track changes. The file is overwritten with the latest track data each time an update arrives, so any application watching that file always sees the most recent track.
This is one of the most flexible destinations because the file can be consumed by anything: OBS, Stream Deck plugins, Python scripts, AutoHotkey, custom dashboards, or any other software that can read a text file.
Common Use Cases
Section titled “Common Use Cases”OBS GDI+ Text Source Point an OBS Text (GDI+) source directly at the output file. OBS monitors the file and redraws the text source automatically when the content changes. This gives you a lightweight, low-overhead track display that does not require a browser source.
Stream Deck Dynamic Text Stream Deck plugins like Stream Deck Tools can read text files to display dynamic content on your deck buttons. Show the current artist or title on a dedicated button without any scripting.
Third-Party Streaming Tools Applications like Snaz, NowPlaying.tools, and various OBS companion apps can consume text files. If a tool expects track info in a file, File Output is the bridge.
Set Logging and Archiving Configure a file output with a format that appends timestamps alongside track data, then process the file after your set to reconstruct a tracklist. (Note: the file is overwritten each track change, so for a running log you would need to use the Webhooks destination with a logging endpoint instead.)
Custom Scripts and Automation Watch the file from a shell script, Python script, or AutoHotkey macro and trigger any action when it changes, such as sending a notification, updating a remote API, or controlling other software.
- Open the Now Playing dashboard and go to Connections → Destinations.
- Find the File Output card and click Configure.
- Enter the Base Path: the directory where Now Playing should write the
output files.
- macOS example:
/Users/yourname/Documents/NowPlaying - Windows example:
C:\Users\YourName\Documents\NowPlaying
- macOS example:
- Choose the Format: Text, JSON, or Both.
- If using Text format, set the Template using template variables (see below).
- Optionally change the Text Filename (default:
now-playing.txt) or JSON Filename (default:now-playing.json). - Toggle the File Output destination on.
The files are created automatically if they do not exist. The base directory must already exist, as Now Playing does not create nested directories.
Output Format and Template Variables
Section titled “Output Format and Template Variables”Use these template variables in your template string to control what is written to the text file. Variables use double braces.
| Variable | Description |
|---|---|
{{artist}} | Artist or performer name |
{{title}} | Track title |
{{album}} | Album or release name |
{{label}} | Record label |
{{genre}} | Genre |
{{bpm}} | Track BPM |
{{key}} | Musical key (e.g., A min, F# maj) |
Example format strings:
| Format String | Example Output |
|---|---|
{{artist}} - {{title}} | Lane 8 - Sunday Songs |
Now Playing: {{title}} by {{artist}} | Now Playing: Sunday Songs by Lane 8 |
{{artist}} - {{title}} [{{bpm}} BPM] | Lane 8 - Sunday Songs [120 BPM] |
{{title}} | Sunday Songs |
You can include newlines in your template string to write multi-line files. Some OBS text sources handle multi-line content better than others, so test with your specific setup.
Output Formats
Section titled “Output Formats”Text writes the rendered template string to the text filename. This is the most common format for OBS text sources and Stream Deck plugins.
JSON writes a full JSON object with all available track fields to the JSON filename. This is useful for scripts or tools that need structured data.
Both writes both files on every track change.
File Encoding
Section titled “File Encoding”Files are written in UTF-8 encoding. Most modern applications handle UTF-8 correctly. If you see garbled characters in OBS or another tool, check that the consuming application is also set to read UTF-8. In OBS, the Text (GDI+) source has a Read from file option that reads UTF-8 by default on current versions.
Troubleshooting
Section titled “Troubleshooting”The file is not being created or updated
- Check that the base directory exists. Now Playing will not create missing directories.
- Verify the Now Playing desktop app is running and connected to your DJ software.
- On macOS, check that Now Playing has permission to write to the chosen location. If you encounter a permissions error, try moving the output directory to your home directory or Desktop.
OBS is not updating when the file changes
- Confirm the OBS text source is using Read from file mode, not direct text input.
- The file path in OBS must exactly match the file path configured in Now Playing, including capitalization on case-sensitive systems.
- Try toggling the OBS source off and back on to force a re-read.
Special characters appear as question marks or boxes
The consuming application may not be reading the file as UTF-8. Check the encoding settings of the application reading the file.
File path with spaces or special characters causes issues
Some third-party tools do not handle file paths with spaces reliably. If you
encounter issues, move the output directory to a path without spaces (e.g.,
C:\StreamAssets\NowPlaying) and update both Now Playing and the consuming
application.