一. live555源码下载
Rtsp 源码下载地址
http://www.live555.com/liveMedia/public/
二. live555server编译
1.编译命令
cd live
./genMakefiles linux-64bit #注意后面的这个参数是根据当前文件夹下config.<后缀>获取得到的
make
2. make时 报错fatal error: openssl/ssl.h: 没有那个文件或目录
安装sudo apt-get install openssl
sudo apt-get install libssl-dev
三.编译成功
make成功
最后就会在当前目录下生成mediaServer 文件夹,有一个live555MediaServer可执行文件。
四. 启动server
cd mediaServer
./live555MediaServer
五.启动成功
这样就启动了一个 rtsp server 可以看到并不是支持所有的视频格式:
LIVE555 Media Server
version 1.08 (LIVE555 Streaming Media library version 2021.02.11).
Play streams from this server using the URL
rtsp://192.168.2.19:8554/<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 8000 for optional RTSP-over-HTTP tunneling, or for HTTP live streaming (for indexed Transport Stream files only).)
报错
[rtsp @ 0x7fe804000920] method DESCRIBE failed: 404 Stream Not Found
rtsp://192.168.2.19:8554/test.h264: Server returned 404 Not Found
是格式不支持