At first it seemed to work but then I tried to edit the profile some more to get a .ts file working but now I am back to square one.

I had made a back up of the original profile.xml file, so started again and added only the code above but I still can't get most of the files to play. Format not supported.

I don't know what the difference is or what I have done differently.

I have found that the media player app on the TV will play all the files including the .ts file but the media server app using Serviio has a better layout, so I would at least like to get the MPEG TS files playing again.

Hard to know where you went wrong. Try re-installing Serviio (over the top - no need to uninstall)and starting again. This will resore the profiles to their default state. Make a backup of the profiles.xml file before making any changes - that way you can revert back if needed.