If you want the same VLC playlist to start again after its last video, enable Loop Playlist in the OBS VLC Video Source. If “reload” means rereading a playlist that has changed, OBS exposes Lua signals and source settings that can support that workflow, but the end-of-playlist timing needs testing in your own OBS and VLC versions.
The distinction matters: looping repeats the list already loaded into the source, while refreshing updates the source’s playlist settings and can restart its player. A media_ended callback is a building block, not proof by itself that the final item has finished.
Decide what “reload” means
People use “reload” for two different jobs. You might have a fixed list of bhajans or ambient tracks and want it to play from the beginning whenever it reaches the end. Or you may replace, add or remove files and want OBS to pick up the changed list before playback begins again.
For the first job, a script is usually unnecessary. The VLC Video Source has a Loop Playlist setting for restarting after it runs out of media. For the second, you need a way to update the source’s playlist settings, and possibly a way to react to a media lifecycle event. These operations are related, but they are not interchangeable.
A playlist may also advance from one item to the next without reaching its final item. A source-level media_ended signal tells you that media ended; the documentation does not establish that every such signal uniquely means the whole playlist has finished. Treat that uncertainty as a design and testing issue rather than assuming a callback can distinguish the cases automatically.
Before writing code, make a short note of the desired behaviour: repeat the current list, reload a changed list, or take a custom action at a verified end point. That decision determines whether to use a setting, a script, or a different playback arrangement.
Use Loop Playlist for repetition
OBS supports multiple media files in its VLC Video Source when VLC is installed and the source is available in your OBS build. In the source properties, add the files in the required order and enable Loop Playlist if you want that same configured list to repeat. Shuffle Playlist controls order rather than refresh behaviour.
This is the simplest path for a station that plays a stable collection repeatedly. For example, a study channel might have a folder of fixed instrumental tracks, while a devotional channel might use a maintained list of recorded services. Once you have checked the list order and enabled looping, play through the end in a controlled test and confirm the first item returns as expected.
Looping does not express “scan for files I added after playback began” or “replace the list from an external source”. It controls repetition of the configured playlist. If the playlist contents change, reopen the source properties and confirm what OBS currently has loaded before relying on it for an overnight broadcast.
Keep the operating distinction in mind if you are building a longer rerun. The guide to a YouTube live rerun of esports tournament VODs is useful context for arranging recorded material, though a rerun plan and a VLC source’s loop setting solve different parts of the workflow.
When a script is needed
A Lua script becomes relevant when you need a custom action after an event or need to apply changed playlist settings programmatically. OBS scripting includes Lua through the obslua module, and you manage scripts from Tools > Scripts. The OBS scripting documentation describes the scripting interface and lifecycle.
A script has at least three separate responsibilities: identify the intended source, decide whether the event represents the condition you care about, and perform the update or action. Keeping those responsibilities separate makes it easier to test. It also prevents a routine transition between playlist items from triggering a refresh that interrupts playback.
The VLC source implementation reads a playlist settings array and rebuilds its media list player when settings are updated. That update is consequential: it can stop and restart player handling, so it is not a seamless in-place change. If the stream is visible while this happens, a brief interruption or restart may be noticeable. See the OBS VLC source implementation for the implementation detail.
If you do not need custom behaviour, avoid adding a script simply because “reload” sounds more reliable. A script adds source-name dependencies, version-specific behaviour and another thing to inspect after an OBS update. For a genuinely changed list, test first with a copy of the scene and a short playlist rather than the live channel’s only scene.
Listen for media_ended
OBS source APIs expose media lifecycle signals, including media_ended. Lua can connect a callback to a source signal handler with signal_handler_connect(handler, signal, callback). The OBS reference documentation documents the source and signal concepts; the scripting guide explains how Lua callbacks fit into OBS.
At a high level, an implementation pattern is to find the VLC source by its exact OBS name, obtain its signal handler, and connect a Lua function to the media_ended signal. The callback should then verify that the signal relates to the intended source and decide whether a refresh is appropriate. This is a pattern, not tested drop-in code: exact APIs, callback details and observed signal behaviour must be checked against the OBS version you run.
Do not assume that the callback fires only after the final playlist entry. If your source emits an end event between items, updating the settings there could repeatedly restart the playlist or prevent it reaching the final item. Establish observed behaviour using a small playlist and logs or a visible test action before attaching a refresh operation.
There may be other ways to determine that the list is finished, depending on the source and version, but the documentation cited here does not promise a universal playlist-boundary event. Avoid building around an undocumented assumption. If your test cannot distinguish an item transition from the end of the list, use the built-in loop for a stable list, or redesign the trigger rather than refreshing on every end signal.
Update VLC source settings carefully
A VLC source’s playlist is represented in settings as a playlist array, with entries that include a value for the media path. If your goal is to update a list, preserve the existing array structure and entry values unless you are intentionally replacing those entries. A careless settings write can leave the source with an empty or malformed playlist.
The update operation causes OBS’s VLC source to rebuild playlist handling. That is why an update can restart playback: it is not just a request to re-read a filename while leaving the current player untouched. Plan for the interruption, and do not describe it to viewers or operators as seamless.
A cautious workflow is to prepare the intended settings, apply them only after your tested end condition, and then observe whether the first expected item starts. If you replace files on disk, ensure the new paths exist and can be opened by the account running OBS. If a changed file has the same path, test whether your specific source and version see the replacement after the settings update.
OBS data and source objects have ownership and cleanup requirements. When writing a complete script, release or otherwise handle objects according to the scripting API rather than retaining references indefinitely. The official OBS scripting guide warns that misuse of the API can leak memory or crash OBS. That is another reason to begin with a controlled test instead of pasting unverified code into a channel that must stay live.
Compare the two approaches
Choose the least complicated option that matches the actual job. A fixed list that should repeat is a source configuration task. A changing list or custom end action is a scripting task, with more testing and maintenance attached.
| Approach | Use it when | Main trade-off |
|---|---|---|
| VLC Video Source with Loop Playlist | The configured playlist should repeat unchanged | Simple and built in; it does not itself define a workflow for rereading changed files or settings |
| Lua callback plus source settings update | You need a custom reaction or to apply changed playlist settings | More control, but the update can restart playback and media_ended is not documented as a unique whole-playlist boundary |
If your actual requirement is to keep a channel running while your computer is switched off, local OBS scripting is not the only operational question. A 24/7 devotional stream using Docker and FFmpeg illustrates a different kind of playback arrangement; it does not remove the need to verify how the playlist itself advances or refreshes.
For a small channel, favour a fixed, tested list over automatic file discovery if you do not need frequent changes. You can update the list during a planned maintenance window, verify it in OBS, and then resume normal playback. That trades convenience for a clearer failure mode: you know which files are configured, rather than discovering an unexpected folder change during a long broadcast.
Test timing in your OBS and VLC versions
The end signal and source update behaviour should be tested in the exact setup you intend to use. OBS and VLC versions can differ in implementation details, and the cited documentation does not guarantee a universal timing sequence for the final playlist item. Do not infer production behaviour from a script that merely loads without an error.
Build a disposable scene with a VLC Video Source, a short list of files you are permitted to use, and the same loop and shuffle settings planned for the channel. First test looping without a script. Confirm whether the source returns to the first item, whether transitions between items look as expected, and whether the source behaves the same after restarting OBS.
Then test the signal without changing settings: have the callback record or visibly indicate each media_ended event. Note whether events occur between entries, at the final entry, or in other cases such as manually stopping playback. Repeat the test after changing the playlist, and after restarting OBS, so you know whether the observed behaviour is repeatable in your own environment.
Only after that should you test a settings update. Use a copy of the source, expect playback to restart, and confirm the list and first item after the update. If an update happens too early, too often, or not at all, do not attach it to the live scene yet. Change the trigger or keep the workflow manual until the observed behaviour is clear.
Record the OBS version, operating system, VLC version, source name, and relevant playlist settings alongside your test notes. This does not make the behaviour guaranteed; it gives you a useful baseline if an update changes it. If you run the channel overnight, check the logs and the visible output during a supervised test before treating the arrangement as dependable.
For a machine that streams locally, reliability includes more than a playlist callback: sleep settings, power interruptions, and OBS restarts matter too. The explanation of electricity costs for a 24/7 stream in India is relevant when deciding whether leaving a local computer running fits your operating plan. It does not change the source timing behaviour, so test that separately.
Keep the live channel recoverable
Treat playlist refresh as a maintenance operation until it has passed testing. Keep a known-good scene collection or export, and avoid experimenting first on the only scene that feeds your public broadcast. A mistaken source update can leave the VLC source stopped or pointing at files that are unavailable.
If the channel must continue while you edit content, plan an orderly change window. Update the playlist, verify playback from the first item, and then return to the live scene. If you cannot pause the channel, consider whether your workflow can use a second tested scene or source and a deliberate switch, rather than forcing an unverified update into the active source.
A cloud-based workflow can remove the specific burden of leaving your own computer on to carry the broadcast. StreamNeo turns an uploaded video into a YouTube live stream, so a fixed file can keep playing without a local OBS machine left running; it does not change the distinction between repeating a fixed file and refreshing a VLC playlist, and it is YouTube-only.
Before committing, compare the operating options on the pricing page. When the file and channel are ready, start free — 24-hour trial, no card.
FAQ
Does OBS already have a way to repeat a VLC playlist?
Yes. Enable Loop Playlist in the VLC Video Source when you want the configured list to start again after it runs out of media. Test the end of the list in your own setup before relying on it for a long broadcast.
Does media_ended mean the whole playlist has finished?
Not necessarily. It is a media lifecycle signal, and the documentation does not promise that it uniquely identifies the final playlist boundary. Observe its behaviour in your OBS and VLC versions before using it to trigger a refresh.
Will updating the playlist settings be seamless?
No such guarantee is documented. The VLC source update rebuilds playlist handling and may restart playback, so test the visible interruption and resulting first item in a copy of your scene.
Can Lua reload files added to a playlist automatically?
Lua can work with OBS source signals and settings, but a reliable file-change workflow needs a tested way to detect changes and apply the correct playlist data. Preserve the settings structure, verify paths, and do not assume an untested callback will refresh files at the right point.