Stream CSI Camera to HTTP in MJPEG format

You may try the following. I use SimpleHttpServer that can be installed into python from pip:

# Create a new folder for this
mkdir /home/nvidia/hlstest
cd /home/nvidia/hlstest

# Start the http server in background
python -m SimpleHTTPServer 8080 &

# Launch the pipeline
gst-launch-1.0 nvarguscamerasrc ! 'video/x-raw(memory:NVMM),width=640,height=480,framerate=30/1' ! nvvidconv ! 'video/x-raw(memory:NVMM),format=I420' ! nvjpegenc ! jpegparse ! multipartmux ! hlssink playlist-root=http://192.168.0.40:8080 location=/home/nvidia/hlstest/segment_%05d.ts max-files=10 target-duration=1

You would have to cleanup before restarting the pipeline:

rm -f *.ts
rm -f playlist.m3u8

Now, it is important that you know the framerate on receiver side, otherwise the frames may be decoded as they come and it may be too fast.

gst-launch-1.0 souphttpsrc location=http://192.168.0.40:8080/playlist.m3u8 is-live=true do-timestamp=true ! application/x-hls ! hlsdemux ! multipartdemux ! image/jpeg,framerate=30/1 ! decodebin ! autovideosink