天天看點

ffserver 搭建rtsp視訊和音頻伺服器

視訊:

1.ffserver.conf

RTSPPort 8554

BindAddress 0.0.0.0

RTSPBindAddress 0.0.0.0

MaxHTTPConnections 2000

MaxClients 1000

MaxBandwidth 30000

CustomLog -

NoDaemon

#NoDefaults

<Stream hh.264>

File "/home/wht/share/test/live/mediaServer/hh.264"

Format rtp

</Stream>

2.ffserver -f ffserver.conf

音頻:

1.ffserver.conf

  1. RTSPPort 5454  
  2. BindAddress 0.0.0.0  
  3. RTSPBindAddress 0.0.0.0  
  4. MaxHTTPConnections 2000  
  5. MaxClients 1000  
  6. MaxBandwidth 1000  
  7. #MP3 audio  
  8. <Stream cry.mp3>  
  9. File "/media/sf_chuchen/ffmpeg/cry.mp3"  
  10. Format rtp  
  11. NoVideo  
  12. </Stream>  

2. 其中,以下兩條必須指定

RTSPPort 5454  #rtsp server 端口

Format rtp  #格式為rtp,在http下,為流的格式(MP3)

vlc播放:

rtsp://ip_addr:5454/stream_name

繼續閱讀