Resource icon

Media Playlist Source 0.1.3

It would be better if this tool could be combined with a tool like tuna to display the title of the song being played
Did you find a solution for this? I currently use VLC playlist Source and Tuna. Tuna works well but VLC gets stuck on files and ends up repeating the same one over and over. VLC has to go but I need another option for playing local files.
 
Did you find a solution for this? I currently use VLC playlist Source and Tuna. Tuna works well but VLC gets stuck on files and ends up repeating the same one over and over. VLC has to go but I need another option for playing local files.
not yet
 
I just started to test the current version because using VLC Playlist all video stuck for a second at every change so I thought maybe this plugin do it better. When I switch to the scene containing this playlist, the first video also stuck on its first frame for about second, but later elements of the playlist doesn't, they just start to play almost a second later, than the previous item ends. This is much better, I just put a picture in the background so it functioning like a basic graphic transition and I don't have a black output at every playlist item change, but it would be even better if there would be no delay at all. I assume that this is some kind of puffering issue, so the starting problem is hard to resolve as it is unknown when the scene will be activated, but for later items couldn't it be foresighted? By knowing when the current item will be ends, could it puffer the next one in time so it can started instantly?

Unfortunately this is the smaller problem. The bigger is if I turn off "Loop playlist" and on "Shuffle", then it is unreliable. I've tried all combination of visibility and restart behavior, but non of those done reliably what I want: playing all the playlist item once in a random order when the scene activated, then switch over to another scene automatically when the last item ended (using the Advanced Scene Switcher for the switch over). "Stop when not visible, restart when visible" and "Play the first file in the playlist" combination cause that at restart it plays the first file on the visible list, but the visible list is in the order of how I added the items, not in the shuffled order, so if the visible first item isn't the first in the actual shuffled order, then all the files before will be skipped. Because of this I've tried the "Stop when not visible, play next when visible" option, but this also caused that some elements of the list is skipped sometimes.
 
I am having a problem now with this plugin with the audio. For starting streaming I usually mute the audio for the source since I have other music playing and I just need video. Not with even muting clicked the audio form the videos is still coming though on the stream. Anyone knows a fix for this?
 
I am having a problem now with this plugin with the audio. For starting streaming I usually mute the audio for the source since I have other music playing and I just need video. Not with even muting clicked the audio form the videos is still coming though on the stream. Anyone knows a fix for this?
use advanced scene switcher plugin to mute sources when needed.
 
Like many of you, I was looking for a solution to putting the currently playing track as text. I vibecoded this script that you can save as a .py file and put into your OBS Scripts. It interacts with Media Playlist Source and dumps the current playing audio track into the chosen text file (minus directories and filename extensions). You can then access this text file with a Text tool to post it in your stream.

Python:
import obspython as obs
import os

# Global variables for script state
source_name = ""
output_path = ""
interval    = 1
last_file   = ""

def script_description():
    return "Exports a cleaned-up 'current_file_name' (no folders, no extension) to a text file."

def update_text_file():
    global source_name, output_path, last_file
    
    if not source_name or not output_path:
        return

    source = obs.obs_get_source_by_name(source_name)
    if source:
        settings = obs.obs_source_get_settings(source)
        full_path = obs.obs_data_get_string(settings, "current_file_name")
        
        if full_path:
            # --- THE CLEANUP LOGIC ---
            # 1. Get just the filename (e.g., "Song.mp3")
            filename_with_ext = os.path.basename(full_path)
            # 2. Split the name from the extension and keep the name (e.g., "Song")
            clean_name = os.path.splitext(filename_with_ext)[0]
            
            # Only write to disk if the song has actually changed
            if clean_name != last_file:
                try:
                    with open(output_path, "w", encoding="utf-8") as f:
                        f.write(clean_name)
                    
                    last_file = clean_name
                    obs.blog(obs.LOG_INFO, f"Updated text file: {clean_name}")
                except Exception as e:
                    obs.blog(obs.LOG_WARNING, f"Failed to write to file: {e}")
        
        obs.obs_data_release(settings)
        obs.obs_source_release(source)

def script_update(settings):
    global source_name, output_path, interval
    
    source_name = obs.obs_data_get_string(settings, "source")
    output_path = obs.obs_data_get_string(settings, "path")
    interval    = obs.obs_data_get_int(settings, "interval")
    
    obs.timer_remove(update_text_file)
    if source_name and output_path:
        obs.timer_add(update_text_file, interval * 1000)

def script_properties():
    props = obs.obs_properties_create()
    
    p = obs.obs_properties_add_list(props, "source", "Playlist Source:",
                                   obs.OBS_COMBO_TYPE_EDITABLE,
                                   obs.OBS_COMBO_FORMAT_STRING)
    sources = obs.obs_enum_sources()
    if sources:
        for s in sources:
            name = obs.obs_source_get_name(s)
            obs.obs_property_list_add_string(p, name, name)
        obs.source_list_release(sources)

    obs.obs_properties_add_path(props, "path", "Output Text File:",
                               obs.OBS_PATH_FILE_SAVE, "Text files (*.txt)", None)
    
    obs.obs_properties_add_int(props, "interval", "Update Interval (seconds):", 1, 60, 1)
    
    return props
 
Back
Top