How to configure ffserver to support rtmp instead of http?

I captured the camera image using ffmpeg and the following command:

ffmpeg -y -f vfwcap -r 25 -i 0 http://10.172.180.235:8090/feed2.ffm 

and on another machine (with the above ip) I have ffserver working with the following configuration file:

 HttpPort 8090 HttpBindAddress 0.0.0.0 MaxHTTPConnections 2000 MaxClients 1000 MaxBandwidth 3000 CustomLog - <Stream stat.html> Format status ACL allow localhost ACL allow 192.168.0.0 192.168.255.255 ACL allow 10.172.180.199 ACL allow 10.172.180.216 ACL allow 10.172.180.215 </Stream> <Feed feed2.ffm> File /tmp/feed2.ffm FileMaxSize 1G ACL allow 127.0.0.1 ACL allow 10.172.180.199 ACL allow 10.172.180.216 ACL allow 10.172.180.236 ACL allow 10.172.180.109 </Feed> <Stream live.flv> Format flv Feed feed2.ffm VideoCodec libx264 VideoFrameRate 30 VideoBitRate 800 VideoSize 1280x720 AVOptionVideo crf 23 AVOptionVideo preset medium AVOptionVideo me_range 16 AVOptionVideo qdiff 4 AVOptionVideo qmin 10 AVOptionVideo qmax 51 AVOptionVideo flags +global_header NoAudio AudioCodec aac Strict -2 AudioBitRate 128 AudioChannels 2 AudioSampleRate 44100 AVOptionAudio flags +global_header </Stream> 

And it works, I can stream the video to FLV via http ... But now I would like to use rtmp because I want to display live stream on my webpage with some kind of player. I wanted to use video.js , but it seems that in recent versions it no longer supports live video ... I found mediaelement.js , but I need rtmp protocol for streaming live content, so the reason for my question. Thank you for your help.

+6
source share

Source: https://habr.com/ru/post/988141/


All Articles