obs-studio
obs-studio copied to clipboard
obs-ffmpeg: Add end action UI property for local file source
For local file, replace UI properties : "Loop" and "Show nothing when playback ends" by a property list call End Action with three possible values : Hide, Freeze, Loop
Description
Currently in Obs FFmpeg source, when using local file the end action of a video file, can be set to three mode, using two checkbox (loop and Show nothing when playback ends) If loop is choose, the checkbox "Show nothing when playback ends", do nothing. The UI proposal, is to use a property list, with the three mode when local file is checked Doesn't change the UI when Local file is unchecked. Internally, doesn't change the way is_looping and clear_media_end works.

Motivation and Context
Having something more easy to understand for user, to define end action of a local video file.
How Has This Been Tested?
Mac os 11.6.2 Mac intel, Xcode Tested using local file, and checking the three mode.
Types of changes
- Tweak (non-breaking change to improve existing functionality)
Checklist:
I'm not sure it's the cleanest way to implement it. Mainly for UI change for non local file, and using integer or enum for property list.
- [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.
When changing properties like this, you need to account for existing setups in the wild. You should cleanly migrate such settings to the equivalent value in the new settings or version the source such that old versions still work unchanged while newly added sources use the new behavior.
I update the patch. And let the previous property "looping", but hide it. And add callback, when parameter change, to update the new property list. Tested with a scene with 3 local file (in each end action mode). Opening and modify it in previous version and current version. Behaviour stay the same when switching between the two version
I'm not 100% sold on terminology. I think at the very least, "Freeze on final frame" (if that's what happens) would be better than "Freeze". If the "Hide" action doesn't actually toggle the eye to automatically hide the source, then I'd like to avoid the term "Hide" in favour of the previous "Show nothing".
I'm unsure how better to communicate the term "End Action" without it being very long. "When Playback Ends.." maybe? I don't know.
I'm not 100% sold on terminology. I think at the very least, "Freeze on final frame" (if that's what happens) would be better than "Freeze". If the "Hide" action doesn't actually toggle the eye to automatically hide the source, then I'd like to avoid the term "Hide" in favour of the previous "Show nothing".
Yes we can use Show nothing, who avoid confusion with show/hide property.
Another name for the "Freeze" action (who keep the last frame), can be "Frame hold" (is something close to what Premiere Pro used for this), or "Freeze last frame" who is shorter than "Freeze on final frame".
I'm unsure how better to communicate the term "End Action" without it being very long. "When Playback Ends.." maybe? I don't know.
I think shorter text are cleaner for UI. But if you prefer another text, will update.
Will this function finally auto disable Media Sources which finshed playing? Streamdeck is a pain to use with OBS Studio right now as Media Sources stay active, event they finished playing. IF changing scenes, all Medisa Sources will re-start which is a pain.
This PR doesn't change the existing behaviour (it change UI in local file mode). There is already other properties for Media source, for what you want to do.
This PR doesn't change the existing behaviour (it change UI in local file mode). There is already other properties for Media source, for what you want to do.
yes I was referring to local video files indeed. So with this new "Hide" option, after the local Video has played, it would hide the local media source in OBS right?
Is there a way I could test that allready witihout having to compile myself for win 64 bit? I guess it requires only 1 updated dll
There is no new options in this PR, only a proposal for reorganize two checkbox to a property list with 3 parameters.
Currently the behaviour is :
Hide = Show nothing when playback ends (Checked) / Loop (Unchecked) Freeze = Show nothing when playback ends (Unchecked) / Loop (Unchecked) Loop = Loop (Checked)
Is there a way I could test that allready witihout having to compile myself for win 64 bit? I guess it requires only 1 updated dll
Sorry didn't know how to enable test build in a PR.
@Username69992872 I added the required label and restarted CI, once it's finished you should be able to download test artifacts from the "Checks" section of this PR.
Show nothing Freeze last frame Play media again
tooltip: Show nothing = make transparent Freeze last frame = pause at the last frame Play media again = make endless loop
Hello,
Thanks for your comments.
Don't see a function to add tooltip to a property list item. "obs_property_set_long_description", seems to be able to set tooltip only for the entire property list.
Don't forget to explain to translators that "loop" is verb here.
Don't forget to explain to translators that "loop" is verb here.
How to do that ?
The way you can do this:
- reword
- ask translations maintainer (@Gol-D-Ace or whoever is now)