Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

from php script i want to change dynamically source media #328

Open
federicopalumbo opened this issue Dec 9, 2020 · 3 comments
Open

from php script i want to change dynamically source media #328

federicopalumbo opened this issue Dec 9, 2020 · 3 comments

Comments

@federicopalumbo
Copy link

Hello I have many mp4 and I want stream dynamically that media, I mean that from my local server i can make http requests or command line request and other scripts, and i want xsplit stream my media and also change it dynamically. I need to change media also before the its end, i don't need just queue it. At the moment I can play it in VLC and grab the window, but i would have the media streamed directly.

If is possible, can you give some advice?

Thanks
Federico

@SML-MeSo
Copy link
Collaborator

Hi! Sorry for the delayed response. A few questions to understand your main use case:

  1. Are your media files hosted locally in your PC or within a network drive?
  2. Are you looking to play the files one after another or do you want the ability to change the media at any pre-determined condition via script?
  3. Are you open to using javascript or are you bent on using php (more complicated to accomplish) ?

@federicopalumbo
Copy link
Author

federicopalumbo commented Jan 20, 2021 via email

@SML-MeSo
Copy link
Collaborator

Not sure if this is what you're looking for, but XBC has the Macros extension, which helps automate streaming and other functions, please see https://www.xsplit.com/blog/how-to-use-macros-in-xsplit-broadcaster.

From the looks of it, these may be some things to note:

  • need to have a way to open XBC itself. The Macros extension automatically opens along with it, as long as you don't close it the last time you used XBC.
  • The Macros extension needs events to trigger its functions. Either by scheduled date/time, hotkeys, etc. Or even scripts, albeit quite complicated. (More on this later)
  • The Macros extension does not have a builtin way to dynamically change a video, though we have a Video Playlist plugin where you pre-add videos into it and videos will be played in succession. You can still use scripts to change the video file dynamically but as previously mentioned, is quite complicated.

If using scripts cannot be avoided:

  • Unfortunately, the XBC core API can only be accessed thru javascript, which is being utilized by the XJS framework. If a php script is needed, the only way for it to function is by connecting the script to a running javascript script that will interpret your commands via websocket (You may have to construct the javascript receiver script and the websocket server yourself)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants