[FFmpeg-user] ffmpeg for transcoding a stream into web pag

Ted Park kumowoon1025 at gmail.com
Fri May 3 11:17:14 EEST 2019


> So my idea was tho use ffmpeg or gstreamer to  embed it in html, with some
> sort of player.
Html you’re gonna need to write yourself, but you can use the rtsp stream as an input and output HLS to embed in your html, I think this will get you what you want.

Something like

ffmpeg -i rtsp://192.0.2.123/stream.sdp -f hls -hls_playlist_type event -hls_segment_type mpegts -hls_segment_filename segment-%d.ts index.m3u8

Will produce a playlist file pointing to little segments of ts files that you can host with any http server. It should work,  (you might need to transcode to h264 if it’s not) A html5 video element with the playlist file as the source should play in most browsers nowadays. 

<video autoplay controls src=“url/to/index.m3u8”>This text displays if the video element isn’t supported.</video>


More information about the ffmpeg-user mailing list