How to convert .h264 videos to .m2ts format.
Converting H.264 Encoded Video Files directly to Blu-ray BDAV Video Files (.h264 to .m2ts conversion) should be possible and quite straightforward.
Use an editing program or (online) conversion tool, such as the Freemake Video Converter or FFmpeg, which allow users to import H264 videos and re-save them in M2TS format.
Program for multimedia streaming and conversion
One of the most popular and successful free video conversion softwares
A video converter utility