方案4"/>
ffmpeg CCTV方案4
ffmpeg还有一个开源项目是ffserver,可以接收ffmpeg输入流并转码为http输出。以下为具体步骤:
1. sudo apt-get install ffmpeg
2. etc/ffserver.conf config:
...
Port 8090
# bind to all IPs aliased or not
BindAddress 0.0.0.0
# max number of simultaneous clients
MaxClients 100
# max bandwidth per-client (kb/s)
MaxBandwidth 16000
# Suppress that if you want to launch ffserver as a daemon.
#NoDaemon<Feed feed1.ffm>
File /tmp/feed1.ffm
FileMaxSize 10M
</Feed><Stream live.h264>
Format rtp
Feed feed1.ffm
VideoCodec libx264
VideoFrameRate 24
VideoBitRate 100
VideoSize 1920x1080
NoAudio
#AVPresetVideo default
#AVPresetVideo baseline
#AVOptionVideo flags +global_header
#
#AudioCodec libfaac
#AudioBitRate 32
#AudioChannels 2
#AudioSampleRate 22050
#AVOptionAudio flags +global_header
</Stream>...3.
ffserver &
4.
sudo ffmpeg -i rtsp://... http://localhost:8090/feed1.ffm
更多推荐
ffmpeg CCTV方案4
发布评论