ffmpeg transcode to live stream

前端 未结 1 760
日久生厌
日久生厌 2021-01-15 13:20

I need to display a ip camera stream in an html video tag, i have figured out how to transcode to a file from the rtsp stream like this

ffmpeg -i \"rtsp://user

相关标签:
1条回答
  • 2021-01-15 13:30

    Something like this should work to create a live HLS stream from a video camera but the latency will not be good. If latency is important, you may want to look at WebRTC.

    ffmpeg -i "rtsp://user:password@ip" -s 640x480 -c:v libx264 -f ssegment -hls_flags delete_segments -segment_list playlist.m3u8 -segment_list_type hls -segment_list_size 10 -segment_list_flags +live -segment_time 10 out_%6d.ts

    You need to locate the output for the generated ts and m3u8 files behind an HTTP server and then you can use this test page to check that it's working.

    0 讨论(0)
提交回复
热议问题