系統環境 Debian 7 x64 / centos 7 x64 均可以linux
首先去下載源碼 http://www.live555.com/liveMedia/public/live555-latest.tar.gzweb
wget http://www.live555.com/liveMedia/public/live555-latest.tar.gz tar xzf live555-latest.tar.gz cd live ./genMakefiles linux-64bit #注意後面這個參數是根據當前文件夾下config.<後綴>獲取獲得的 make
最後就會在當前目錄下生成mediaServer 文件夾,有一個live555MediaServer可執行文件。centos
cd mediaServer
./live555MediaServer
這樣就啓動了一個 rtsp server 能夠看到並非支持全部的視頻格式:網絡
[root@localhost mediaServer]# ./live555MediaServer LIVE555 Media Server version 0.89 (LIVE555 Streaming Media library version 2016.06.26). Play streams from this server using the URL rtsp://192.168.0.111/<filename> where <filename> is a file present in the current directory. Each file's type is inferred from its name suffix: ".264" => a H.264 Video Elementary Stream file ".265" => a H.265 Video Elementary Stream file ".aac" => an AAC Audio (ADTS format) file ".ac3" => an AC-3 Audio file ".amr" => an AMR Audio file ".dv" => a DV Video file ".m4e" => a MPEG-4 Video Elementary Stream file ".mkv" => a Matroska audio+video+(optional)subtitles file ".mp3" => a MPEG-1 or 2 Audio file ".mpg" => a MPEG-1 or 2 Program Stream (audio+video) file ".ogg" or ".ogv" or ".opus" => an Ogg audio and/or video file ".ts" => a MPEG Transport Stream file (a ".tsx" index file - if present - provides server 'trick play' support) ".vob" => a VOB (MPEG-2 video with AC-3 audio) file ".wav" => a WAV Audio file ".webm" => a WebM audio(Vorbis)+video(VP8) file See http://www.live555.com/mediaServer/ for additional documentation. (We use port 80 for optional RTSP-over-HTTP tunneling, or for HTTP live streaming (for indexed Transport Stream files only).)
將MP3文件《test.mp3》複製到和上面live555MediaServer
可執行文件的同一個目錄,
可用vlc在打開網絡中輸入地址 rtsp://192.168.0.111/test.mp3
聽音樂了。ide