Server frontend / watchdog

Greetings!
I spent last weekend coding a little app that will help me a lot in many cases. It’s basically a frontend to the server config and a watchdog that unifies the consoles into one app just like the one from NRK.

I’ve been editing all the config files in plain text in notepad (mainly in production servers where there’s no XML editor installed) and found it very irritating, so I picked up the sample config file and poured it in a simple UI to make all the changes in every server installation. It’s based on 2.3.x config so it should work from 2.2 onward.

The app also runs and looks for the server’s processes in the background so if any process stops running it launches it again (except when the process is stopped in the app itself). When run, the app is minimized to the tray so is away from inexperienced operators’ hands.

Some Pictures

Icon ContextMenu

Keep in mind that is somewhat a beta and may have bugs, but you are very welcome to try it out:

17 Likes

Really nice thanks! I will try it!

Very neat and works very well so far, thanks for sharing!

I tested it in various servers and found a serious bug in servers with higher log levels. When the log output is becoming huge, the UI redraw drives the app unresponsive.

Change list:

  • Check if an instance of the app is already running and bring it to front if a new instance is started
  • Limited the console outputs to a set number of lines
  • Fixed Caspar project links not working
  • Added horizontal scroll bar on consoles
  • Added an option to start at login (add value to registry)
  • Added an option to set the console buffer size
  • Save the window size and position

I’ve just found out that Windows 10 starts the server in the background at startup, even before the user logs in.
Is that common? Have you ever experienced that?

I am on Windows 10 LTSC 2019

I just updated the server launcher with some fixes to the config editor.

  • The paths were all messed up.
  • The screen consumer’s sbs-key option was actually saving the key-only value.

I’ve noticed on my machine it tends to open up some applications I hadn’t closed when shutting down. So browsers, office documents etc.

Yes, you need to press shift when you click shut down for the machine to really shut down.
Otherwise it just stores everything from memory and loads it again when rebooting.

Good work @rrebuffo :+1:

some points want to share:

  • this launcher is crashing on starting casparcg server or media scanner because of incorrect path
  • launcher state isn’t changing on closing casparcg server by client side, by pressing q in console or server crashes

testing environment: windows 10 64bit

Thank you very much for the feedback @noumaan! I took a look at those issues and made some corrections.

I never tried to manually start the server when the icon is missing or the server didn’t start automatically at launch, I guess is lack of testing on my end. I fixed that so it also checks the executables when starting manually and prompts the user to correct that.

It is, but it’s just not visible… if you kill the server with task manager, with ‘kill’ or ‘restart’ it starts again immediately. The only problem is with ‘q’ command from console, it shows “Successfully shutdown CasparCG Server” but the process never exits. It stays there until you send any other dummy command from the console and then it’s shut down. Couldn’t test the server crash scenario because it doesn’t crash (I tried the clock change crash but worked only once in a single server).
It now checks the exit code and if it returns 0 it stays down as if it was stopped from the launcher.

1 Like

It is your effort so thanks to you for giving time to this community and making it more valuable :blush:

¡Qué tal, @rrebuffo! I must say I’m really impressed and excited about this launcher, because it addresses one of the actual gripes about launching and monitoring Server in recent versions, which is a lack of a GUI for the config file, as Frontend used to do on 2.0.7 and prior. ¡Y más encima lo tenés en español!

I’ve got a couple of bugs to report, and also a feature request. I hope it’s not a big deal to implement, but I really appreciate your work so far.

Right now I’ve been using NRK’s Caspar Launcher for my needs, which I’ve used for testing different Server configs and paths, exploring different solutions. Many of those times I screwed up the configuration so badly that I had to manually edit or delete the config file, a .json that generates beside the executable. Your launcher has no config file apparently and I can’t seem to find its settings for manual tinkering or deletion. Is there any way to know where that config file is? Or registry settings?

Another thing that I do a lot with NRK’s Caspar Launcher is adding other executables to monitor. In this case I don’t use scanner.exe very often and I add other executables as RedCast OnTime or custom clients for specific purposes. Is there any chance to add custom executables to the monitor in the future?

Also, I’m using NRK’s CasparCG Server fork in production, and I’d like to be able to remove the scanner.exe monitor from the options. This is most probably in line with the previous request.

Thank you in advance.

Are you talking about the casparcg.config file or the app’s settings? If its the app settings only, there’s not much to work with… Just both paths, language, buffer size, startup setting and the window position. It’s a xml file located at the user’s AppData folder: C:\Users\[user]\AppData\Local\CasparLauncher\CasparLauncher.exe_...\user.config. You just delete that file/folder and it reverts to defaults.
If you meant caspar.config, the easiest way is to create a basic xml with no data:

<?xml version="1.0" encoding="UTF-8"?>
<configuration/>

and then edit the file and save the config. The config editor starts up with all the defaults set (according to the comments in the original config file) There’s a bug where it hangs if the first configuration node is not present, I will fix that soon and maybe add a button to create a new file with defaults.
The initial idea was to create multiple files and manage them inside the app but didn’t do that for the moment because of time constraints. Definitely is a feature I will add eventually.

First, you wouldn’t want to have a GUI attached to another GUI as it is created as a child process of the main process but it’s possible. You can actually replace the Scanner path with any executable you want (tested it with notepad and it works properly :man_shrugging:t2:). Again, the initial idea was to add every tab as an editable item but ended up hardcoding it because of the hurry. The GUI is already prepared to do all of that (notice the extra space in the Status tab among other things). It’s not hard to implement… just need some free time, which I didn’t have lately.

Así es, the whole app idea is to have a friendly interface for the server in environments where operators are regular people just picking between a bunch thumbnails and writing some text in a box. So a “hackery” console window scrolling nonsense in front of them is actually scary and worrying:

Example


It reads: “Mauro look… Is that you?”

So to wrap up, here in Argentina, most of the people doesn’t understand a word of English and that is scary too so NRK launcher wouldn’t cut it and I ended up building one from scratch, en Español. The actual claim should be that it is in localized in English also. Now that I did to be able to share it with the community and to help a little further I’m happy to accept any other languages if you want to translate it, just ask for it.

Wow, long post. Sorry.

Great work man! Excelente!! I would make one small request/suggestion tho, that the default paths for the server were ./casparcg.exe and ./scanner.exe.

That way we can just toss the exe file (and lib) on the server folder.

Keep the good work and thanks!

Done. Didn’t notice I set the text boxes as read-only. Fixed that.
Also, there’s no need to write ./

Just starting using the launcher and really liked it, thanks for the tool!

Only small objection I have is that creates yet another directory.,“logs”, in server directory while there is already “log” directory which can be used for the purpose.

If you are accepting wishlist for future releases basic configuration overview/editing capabilities of output channels like old Frontend has would be a nice addition.

What do you mean by that?
What would differ from the “channels” tab in the config editor?

Sorry if I missed something, built the tool myself from this repo:

End the user interface is like this:

Do not see configuration editor integrated here.

That’s NRK’s launcher.
Take a better look at the first post in this thread.

Ah, my bad, NRK discussion pointed me here. Now I see the difference: