What format should I transcode and remux videos to?



If I use the standard Kodi player, what video, audio, subtitle and mux formats can I safely expect to always work without issues?

I have a rather huge collection of videos encoded and muxed to various standards.

And I would like to know what format(s) to convert that collection to. 

The errors i have seen so far include
    Videoplayback too fast and stopping to resync with audio like every 3-20 seconds.
    Subtitles completely unsynced and varying randomly when play restarted
    Audio codec not supported.

and various other errors too numerous to list.

Playing these items back in MX player and in VLC works well in many more instances than when using the Kodi player.

All items are in all cases played back as served from Serviio v 2, but these problems are exactly the same when playing from an SMB share. VLC and MX also work exactly the same from dlna as from smb.