Client crashes when sending OSC command

Hi everyone,

To make it short:
I want a video loop of multiple .mov files in a group (Timetable preview, sponsor showcase, etc). Apparently only way to do that is via an OSC command.

Okay, no issue… well yes… issue.

With client 2.0.8: I cannot enable the OSC Input. Whenever I enable it, enter the default port and hit enter, then go back into the setting, it is disabled.

So now I tried it with the latest “next” version. OSC input is even enabled by default. But whenever I send the OSC command, the client freezes and shortly afterwards crashes, with the server receiving an 10053 error.

According to google: Connection termination error. Well okay, let’s do my best. Disable all other software I have running. Even de-installed my antivirus, as that might be an issue.
Nope, error keeps popping up.

Does anyone have a clue what might be wrong here and how I can solve this issue?
I mean, in the worst case I just have to make multiple big .mov files that I have to sort through (though I would want to avoid that if possible).

Gladly appreciate any help :slight_smile:

Hi, OSC is only for ready data from the CasparCG server.
It’s streaming info without waiting for responce from connected server.
With AMCP commands you must setup a connection first before starting a osc server.
You have to use a string filter for the osc info in a seperate thread.

You don’t need osc if you want to play/loop a playlist if you use loadbg with AMCP.
Start first clip
PLAY 1-1 clip 1
after a few seconds
LOADBG 1-1 clip 2
if clip 2 plays
LOADBG 1-1 clip 3

This only works for clips not for stills.
If you want to do that you must run a playlist timer in your client.

It’s possible you misunderstood me. I think you refer to a custom client, but my issue is with the original client.
It’s not possible to play a loop of multiple items in a group just like that. A workaround for this is to give the group an UID and then using the OSC command “/control/GroupUID/play” to play the specified group (with each item being delayed by the time necessary, since autostep also don’t seem to work in my case.). Then having a delayed OSC command in the group that just plays the group again and again in a loop.
So yeah, using the OSC Output tool in the original client just crashes my client with a disconnect error message. So yeah, I wonder if there could be something on my side that causes the crash.

Also I tried your recommendation with pre-loading a clip while the one before is running, but in my case it does not autoplay the next pre-loaded clip after the first one ends. Though it wouldn’t help me in this case, as I can’t use this to automate a loop with the og client.

You mention you used the latest “next” version of the client and you get freezes and crashes. I assume that this is client 2.2.0. I see a similar issue if I send an OSC command from this client, but mostly the client closes immediately without the freeze. There is a reported issue, number 294, for this behaviour on Github client issues. See issue report.

Your problem enabling the OSC input on Client 2.0.8 make me wonder if the client database has become locked or corrupted. The client configuration defaults to a folder in the c:\Users folder on Windows. If the user login name is gfx01 the normal location for the database file and the client logs is c:\Users\gfx01.CasparCG\Client where the default database name is Database.s3db. There is also a folder that contains the client logs. The logs list all trasactions with the server or servers, plus reports about OSC messages is receives. There might be information in the log file about the failure to enable the OSC operation in client 2.0.8.

The database can be inspected using the free “DB Browser for SQLite” tool available here. The OSC settings are viewable and editable in the Configuration data table.

You can also create a new configuration database for testing functions by adding a parameter to the client startup command line. I use desktop shortcuts to start the client, and the database file to use is set by adding -t then the database name and path in full. An example shortcut target line is:

"C:/CasparCG/ClientV2d0d9/casparCG Client.exe” -t c:/casparclient/usedb209.s3db

Make sure you specify the file extension. If the file does not exist, it is created with default values. You can then edit the configuration properties using the standard client configuration process. If the new file allows you to set or clear the OSC flag the original configuration file has an access issue.

It is important to run matched server and client versions. The version 2.0.X clients are designed to work with CasparCG servers versions 2.0 and 2.1. Client 2.2.X is designed to run with CasparCG server 2.2 or later (e.g. 2.3.3_LTS). The format of the OSC status data issued by the server changed with server version 2.2.0 and hence the client must process the newer format. The client database structure also changes slightly. A common consequence of not using the matched client and server is that the clip durations do not display when a clip is running, and that autoplay does not work. It was documented elsewhere in this forum that the only way to clean the client database is to delete it, meaning all of your other settings such as server names and addresses have to be entered again. Keeping a copy of the configuration database after the user elements are complete can be a quick way to recover after some issues.

If you can persuade all your CasparCG users to only start the client via a shortcut, it is good practice to include the database name in the shortcut such that it never uses the default database name, thus someone starting the client the wrong way, such as double clicking the exe file, will not corrupt your active configurations.

If you are using server version 2.0 or 2.1 (eg NRK fork), you may prefer client 2.0.9 as this has the standard OSC listen and WebSocket OSC support has been added. When this client is run it still reports itself as version 2.0.8, but the Help About screen shows database revision 213 where the client 2.0.8 reports database revision 210. The 2.0.9 client is available in the master branch on clients. Look for the file that has a creation date 2017-11-09. When unzipped the changelog shows the changes for version 2.0.9.

Finally, thank you for the hints about making the standard client play loops via OSC triggers. I was not aware of that trick, and have proved the operation on my CasparCG testbed system.

1 Like

Hey Andy,

Thank you very much for your insights! Really interesting and helpful.
I have tested this issue with client 2.0.8 and server 2.0.7, as well as client 2.2.0 and server 2.2.2.

Regarding the database: It seems the database is okay, as I can open and read it, but after I deleted it and let the client create a new one, I was actually able to enable the OSC Input on the 2.0.8 client. Seems like there was indeed a problem.
When I try to make a custom database via the shortcut command, the client startup logo pops up, but the client doesn’t start at all. Looking at the log I see that it has issues with creating the new database. I wondered if that might be a permission issue, but even with admin rights it is not able to create the database.

[2021-06-14 12:38:20.025] [12ac] [W] QSqlDatabasePrivate::database: unable to open database: “unable to open database file Error opening database”
[2021-06-14 12:38:20.026] [12ac] [W] QSqlQuery::exec: database not open
[2021-06-14 12:38:20.026] [12ac] [F] Failed to execute sql query: CREATE TABLE BlendMode (Id INTEGER PRIMARY KEY, Value TEXT), Error:

So in the end it only works for me by opening it the default way and it is able to create the default database again when I delete it.

But even then, it seems that my OSC Output commands do not get through at all. As if the client is not even sending it. The log files do not show any info. Though the OSC for the client seems to work (it did before too), as I receive the timing of media that is currently being played. It just doesn’t like me trying to execute custom osc commands. Very weird.

The github error you have linked is exactly the issue I have with 2.2.0. Hope they get to fix that.

This week I should get the chance to test this on the caspar computer of our tv station. I wonder if my own computer is just filled with too many different softwares that might cause this weird behaviour. I will let you know if I get it to work there.

In any case I have for now created a single video file for the whole loop. Not as dynamic as I hoped, but hey, as long as it works.

Is the Windows firewall enabled? Can it be, that it stops these messages? I usually disable the Windows internal firewall, but you need to be sure, that you have a some firewall enabled in your (ADSL) router etc. so that you are not exposed to the internet.

Hi Didi,

I have actually even de-installed my antivirus because I thought this might be the issue. But even with my firewall completely disabled, it seems to not send anything at all.
Just to confirm: The OSC Output port in the client settings has to be the same as the port predefined in the server config, is that correct?


I guess so, never tried it :slight_smile:

1 Like

haha okay. Well I will see if I get teamviewer access today to the caspar pc in our studio. I can then try it out there, since it is a rather clean computer.

1 Like

Please accept my apologies - I assumed that the database file would create on any path, including paths that are not yet in existance. When I tried to run client 2.0.8 with a command line database name I saw exactly the same messages as you, and the client immediately closed.

I created the path where I wanted the database file to be stored, then started the client. The new database was created in the now existing/valid assigned path, and the client ran correctly.

Just for clarity on some of the other settings for client 2.0.8 or 2.0.9.
The Client OSC Input port number must match the server OSC default port. The server config has a segment like:


This requires that the client OSC Input port number is set to 6250 (client default port). The predefined-client tags are optional and are not needed in many installations. When a client connects to a server, that server auto-enables an output OSC status stream directed to the IP address it received from the client to the UDP port defined in the tags.

If there are entries for a predefined client, the server also sends the OSC status stream to the defined addresses and ports. This supports users who write custom software that receives, parses and displays a sub-set of the server status. A useage example is a computer screen showing the name of the video file in each channel of the server, with the run time remaining on each file. Useful for the programme director or production assistant to know when the clip will finish and they are back with live studio/OB content.

The client OSC Output form entry must be addressed to the OSC listener on the target device. If the target device is a lighting desk controller at listening on UDP port 9004 create an entry line in the OSC output with properties Name=Lighting , Address= , Port=9004

To fire the OSC message back at the client that issues the OSC message add an output line with a name such as self-trigger an address of and a port of 6250.

To generate an OSC output in the client, add an OSC command from the library tools to the rundown. In the Inspector panel of the client, OSC output section, select your named device (e.g. self-trigger) from the Output drop down list. In the Path box enter the control command /control/GroupUID/play (borrowing from your earlier posting). Set the Message box to 1. Set the Type to Integer. The message and type are those required by the CasparCG Client OSC server.

Assuming an item in the rundown has the UID used in the OSC output message the item will fire when the F2 key is pressed with the OSC Output command selected. The client log will also note the OSC message and it’s actions.

If the above guideline do not get the operational functionality, there are other open-source tools that may help investigations such as Wireshark and BitFocus Companion.

Wireshark is very powerful, but can also be quite tricky to use if you are not familiar with network packet analysers. A complexity in the scenario discussed here is the status traffic and the OSC command can be interleaved. If the CasparCG server is not on local host then Wireshark captures on the local loopback interface only have the OSC command traffic.

BitFocus Companion was created to support the Elgato Stream Deck control lots of other kit, but can be used without the Stream Deck hardware as it has an emulator that runs in a modern web browser. You can set a button to generate the OSC command for the client. You can also send commands from the CasparCG client that press buttons in Companion. You see an indication in the button when a press happens. The press button button 7 on button page bank 1 the command is /press/bank/1/7 Message=1 Type=Integer. To release the button make the message value 0.

There are slight differences when using client 2.2.0 with a version 2.2.0 or newer server. The major changes are the OSC general monitor port used by the server status can be a different port to that used for OSC control of the client. As with client 2.0.9 there is also a UDP port por Web Socket messages. This make it relatively simple to create a web page on a tablet computer or similar that can trigger events in CasparCG client/server.

1 Like

Thank you so much for your detailed answer!
Now, I got to try it on our studio computer and first it didn’t work. But yeah, just putting the output port same as the input port did the trick. Which is weird, because I did try this on my personal computer before.
So, back to my personal computer, I try the same: Nope. Doesn’t work.
I have now re-activated my firewall (from deactivating it before, since Didi recommended it), restarted server and client, and see there, Windows wants me to grant them access to the network again. I tried it again.

Well guess what. It worked.

So it seems like this was something weird related to my firewall. I wonder if the firewall did not configure the client properly and with me turning the firewall completely off and now back on, it wanted me to confirm the connection. I think that is a bit weird, but on the other hand, it’s Windows after all… and looking at it, likely the root cause might’ve come initially from my antivirus that I had installed when I tried it first. That’s what you get for trying things like this from your personal computer :wink:

Glad it works now. I will definitely keep our studio pc on the 2.0.8 version for now, as long as the other bug mentioned above is still there.

Thanky everyone for the help :slight_smile:

Pleased to hear all is now working.

I do lots of experiments on my simple development system, and one day encountered an issue of connecting between client on one machine and server on another machine. Eventually I looked at the firewall rules lists. I found about 30 entries for CasparCG server and client items. Many entries happened because of trying out minor increments in server or client version, each added a new rule to the list. I deleted all of the entries apart from the currently active client and server entries. Machine to machine connections suddenly worked. Windows probably could not cope with so many similar rule sets on a single port.

1 Like

True. I checked the firewall rules and I can see about 5 different rules for the client and server each. Some are actually activated and some are not. I think that was the cause of the problem, having my antivirus block it and defender might’ve just taken the deactivated setting for that server version without asking me anymore.