Is there a way to get a notification over AMCP when the current video stops playing?
I am trying to make a simple client that plays videos in sequence one after another. My idea was to just feed them to the server via the LOADBG command, but I need to know when the current video stops so I can feed the next one.
For now I am planning to issue INFO 1 once a second, but that seems silly and I was wondering if there a better way…
I don’t mind using OSC for that if I have to, but I don’t know if there is a way to dynamically add OSC clients to the server.
Correct, it sends back to the ip address that opened the AMCP connection, and will automatically stop sending when the AMCP connection closes.
This is intended to be a substitute for how when opening an AMCP connection casparcg will start sending osc data to port I think 9250 (unless you enable disable-send-to-amcp-clients in the config), but that doesn’t work well if you are running multiple applications on one machine who want the osc.
@dimitry_ishenko
by the way, what do you mean by dynamically adding clients?
For working with standard OSC protocol:
If you mean that you have several casparCG servers, then the approximate solution is that you need to have a list of current servers (and keep it up to date): this.connectionService.servers
Then, with each new message received on the OSC port, you check whether the sender’s address is your target CasparCG server and send a stop event to the media layer if it is completed…
@teo I have one server, but will connect from different machines with different IP addresses (DHCP), so I won’t be able to put all of them in casparcg.config to get OSC.