From the basic recipes in the picamera docs they give this example with "warm-up time"!
from time import sleep
from picamera import PiCamera
camera = PiCamera()
camera.resolution = (1024, 768)
# Camera warm-up time
...in /boot/config.txt solved the problem for me with a Pi Zero, good quality power supply and low quality 3rd party knock-off cheap camera.
My guess is that 3rd party cheapo cameras draw more volts that the board expects, and that over volting the board compensates for this.
In /etc/motion/motion.conf you've got width & height settings. On my motion system (with an original 5MP picamera V1) I've set those to:
# Image width (pixels). Valid range: Camera dependent, default: 320
# Image height (pixels). Valid range: Camera dependent, default: 240
The camera does NOT use any of the pins on the expansion header, so all normal listed pins are available for use.
Pins 27, 28 (SDA0, SCL0) are RESERVED for HATs (and other internal purposes) so are UNAVAILABLE on ALL models and are shared but this is undocumented.
Which GPIO pins does the Pi Zero camera use?
Rpi camera uses GPIO 0, 1, and also I2C 0.
I think GPIO pins 0, 1, and I2C 0 are for OS to use. Users should not use them.
I did once extracted the I2C 0 physical wires out and tried to fiddle with I2C 0 bus signals, because I did not have enough I2C buses to use. But that is ...