Many people were looking for live streaming solution on a web page. I want to share the following knowledge after doing so many researches and having spent so many time.
Run the following command line.
ffmpeg -y -rtsp_transport udp -i "my_rtsp_url" -vcodec libx264 -listen 1 -movflags isml+frag_keyframe -f mp4 http://ip_address:port_nr/test.mp4
Add the following HTML video tag to your web page.
<video controls autoplay>
<source src="http://ip_address:port_nr/test.mp4" type ="video/mp4">
</video>
Now you can start live-streaming on your web page.
My question:
In general for a video playback, the browser loads the whole video file test.mp4
first and then just starts playing the video.
With the above technique, how can FFMPEG keep pushing video frames to the video source of the HTML without having a complete video file first?
Or
Video source of the HTML keeps pulling frames from the FFMPEG server?
Does anyone know how it works? I am not looking for a streaming solution. I want to understand how these two work together?