Sorry, no idea. It could be some setting, but I would not know which one
That's why I pointed you to the other forum. Probably best chance if it's related to the application itself.
Well, for a start you should any Python code in code tags...
You don't need to install Kodi to use omxplayer.