After hours of searching and trying to get the MJPEG streaming within Motion on linux, the following is the MJPEG stream that worked for me.
Obviously fill in your IP address, username and password set within the camera admin. I was using this with the Foscam FI9900P 1080P Full HD IP Security CCTV Camera.
For your username and password within Motion, simply comment out the line:
; netcam_userpass value
I tried for hours trying all combinations of urls, to find that the one above worked quite well, with full resolution MPEG streaming.
I recommend Mr-Dave’s fork of Motion which can be cloned from github.