Skip to content

BreakingY/simple-rtsp-server

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

90 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

中文

simple-rtsp-server

File playback and device live streaming depend on FFmpeg

  • FFmpeg version == 4.x, tested versions: 4.0.5 and 4.4.5
  • File playback and device live streaming can be configured
    • -DRTSP_FILE_SERVER=ON to enable file playback
    • -DDEVICE_LIVE=ON to enable device live streaming (rtsp_server_live_device.c)
  • If both RTSP_FILE_SERVER and DEVICE_LIVE are set to OFF, the project will no longer depend on FFmpeg.

Compilation

  1. Linux
    • mkdir build
    • cd build
    • cmake -DRTSP_FILE_SERVER=ON -DDEVICE_LIVE=ON ..
    • make -j
  2. Windows (MinGW + CMake)
    • mkdir build
    • cd build
    • cmake -G "MinGW Makefiles" -DRTSP_FILE_SERVER=ON -DDEVICE_LIVE=ON ..
    • mingw32-make

Test

  1. File playback
  • ./rtsp_server_file auth (authentication: 0-not authentication; 1-authentication) loop (file playback loop control: 0-not loop; 1-loop) dir_path (specified folder path, default: ../mp4path)
  • Place the MP4/MKV files you want to play back in dir_path. The project includes four test files (MP4/MKV).
  • Example: ./rtsp_server_file 1 1 ../mp4path/
  • rtsp://admin:123456@ip:8554/filename
  1. Custom session and media source (video)
  • ./rtsp_server_live auth (authentication: 0-not authentication; 1-authentication) file_path (h264: ../mp4path/test.h264)
  • Example: ./rtsp_server_live 1 ../mp4path/test.h264
  • rtsp://admin:123456@ip:8554/live
  1. Custom session and media source (audio + video, only tested, no A/V synchronization)
  • ./rtsp_server_live_av auth (authentication: 0-not authentication; 1-authentication) file_path (h264: ../mp4path/test.h264) file_path (aac: ../mp4path/test.aac)
  • Example: ./rtsp_server_live_av 1 ../mp4path/test.h264 ../mp4path/test.aac
  • rtsp://admin:123456@ip:8554/live
  1. Camera and microphone live streaming
  • ./rtsp_server_live_device auth (authentication: 0-not authentication; 1-authentication)
  • Example: ./rtsp_server_live_device 1
  • rtsp://admin:123456@ip:8554/live
ba2301fb0825b0bab489b9f474fc9cb

Email

About

rtsp server, H264/H265/AAC/PCMA(G711A); TCP/UDP; support authentication

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published