x264 has parameters to specify whether the input is BT601 or BT709. This information is stored in the bitstream, allowing players to render the video with correct colors. This works with most players.
If the colorspace isn’t specified, then players will guess it based on frame size (cutoff point usually is 720p).