Place the camera at center field, center court or center net.

You need to place the camera near the halfway line, in a place that it sees the whole field (3m and beyond), and a place that it will be safe from people or other hazards.