I found another problem. Some of my files simply will not play when I use the app to send them to chromecast. They do play fine in the app and the webview though. I suspect it happens if the files have special characters like ? or : .
Some examples of filenames that will not play:
Re: Life in a different world from zero - s01e01.mkv
Haven't You Heard? I'm Sakamoto - s01e01.mkv
There are no errors in the normal logfiles. However if I force transcoding I DO get errors. Adding an example log here.