Gstreamer can some times be harder to connect from the client. We favored using mjpeg streamer stream instead h264 stream. we use mjpegstreamer as server to serve the video as jpeg image sequences.
the command we run is as below
mjpg_streamer -o "output_http.so -w ./www" -i "input_raspicam.so
We then put this to the boot menu with supervisord. mjpgstreamer starts on boot and works if the camera is connected,otherwise stops running. Make sure that your camera is connected on the boot.
The supervisor configuration file is in `/etc/supervisor/conf.d/
To stop/start the stream use below command
sudo supervisorctl stop/start stream
To disable it from the boot permanently :
sudo supervisorctl disable stream