For the best results, follow these steps when exporting from FCPX:
File > Share > Master File…
Go into "Settings"
Set Format to "Computer".
Set Video Codec to H.264 (either Better Quality or Faster Encode, depending on how long you want to wait. Quality difference is minor.)
Set Resolution to the same as the source video (usually 1920 x 1080)
Check 'Include chapter markers'. This will embed your timeline chapter markers into the video file and MediaZilla will import them automatically.
Click 'Next'
Choose where you want to save it, then click 'Save'
Alternatively, you can use Compressor or Handbrake to fine tune the bitrate and other settings.
Important: Always be sure your output resolution has even values for width and height. Many codecs do not support odd resolution values and the results could be undesirable.