obs-studio
obs-studio copied to clipboard
vlc-video: Add option to suppress stop and restart stream on playlist update
Currently, the running stream is stopped whenever you update and save a video playlist in vlc-video plugin properties. This enhancement adds an option to disable stopping and restarting the stream so that the current video will continue and play the next video in the updated playlist will play when the current video finishes.
Description
Currently, when you update a video playlist in the vlc-video plugins properties page and commit the changes, the plugin stops the stream and restarts the playlist from the beginning. This option allows the user to suppress the stop and restart so that the updated stream and playlist continues playing.
The current stream will continue playing and the video in the next index position in the playlist will be played next.
Motivation and Context
Many people have said that the current behavior is not expected or desired, and they wish that the vlc-video plugin did not behave this way. This gives them a way to suppress that behavior. Here is an example of feedback about that: https://obsproject.com/forum/threads/media-playlist-source.168774/#post-648347
Also, this provides the ability to have long video playlists that can be edited without starting at the beginning of the playlist every time a change is made. This has been a common feature request for literally years. Example: https://obsproject.com/forum/threads/directory-watch-media.105921/post-615398
How Has This Been Tested?
I tested it on Windows 11.
Created a playlist and updated it on the fly while the stream was playing. When I unchecked "Restart Stream" and rearranged videos in playlists, the vlc-video plugin played the expected videos based on the updated playlists without restarting the stream. When the "Restart Stream" checkbox is checked, the stream stops and starts at the beginning of the updated playlist, which is the expected current functionality.
A friend tested by streaming a video playlist for over 8 hours. He edited the playlist at times while doing that, and the stream was stable and did not restart.
Types of changes
Tweak (non-breaking change to improve existing functionality)
When the user unchecks the Restart Stream checkbox, the plugin skips the "Stop the current stream and Start a new stream with the updated playlist" behavior. The current video plays until it is complete, and the next video in the updated playlist is then played.
The checkbox is set to True by default, which matches the current plugin functionality. The user has to take the action of unchecking the box to get the updated functionality.
Documentation (a change to documentation pages)
A documentation update would require updating the Knowledge Base article for this plugin, and I do not have access to that. A screenshot would need to be taken to show the addition of a checkbox for "Restart Stream", and a description for "Restart Stream" would need to be added.
The current screenshot in the Knowledge Base is:
And the currently documented properties (that look incorrect to me) are here:
Checklist:
- [x] My code has been run through clang-format.
- [x] I have read the contributing document.
- [x] My code is not on the master branch.
- [x] The code has been tested.
- [x] All commit messages are properly formatted and commits squashed where appropriate.
- [x] I have included updates to all appropriate documentation. (N/A because this is documented in KB).