Skip to content

RTSP Client/Server Implementation that sends/receives H264 bitstreams

License

Notifications You must be signed in to change notification settings

ibiscum/rtsplib

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

33 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

rtsplib

rtsplib provides a rtsp client/server for h264 transimssion

Requirements

Building rtsplib requires:

Creating Conan package

Use the following command inside the root folder.

conan create . @<user>/testing

with <user> being the remote name

If you want to upload to a server use:

conan upload rtsplib/<version>@<user>/testing --all -r artekmed

Using the new Package

conanfile.txt (on the same level as your CMakeLists.txt)

[requires]
rtsplib/<version>@<user>/testing

[generators]
cmake

Inside CMakeLists.txt:

include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake)
conan_basic_setup()

...

add_executable(MyApp [...] )
target_link_libraries(MyApp PRIVATE ${CONAN_LIBS} [...] }

Building project:

mkdir build && cd build
conan install .. --build rtsplib
cmake ..
make

Run conan profile update settings.compiler.libcxx="libstdc++11" default in case you encounter linking issues.

The executables are located inside the folder build/bin/

Tuning Streaming Performance

If the resolution of the video stream is large and/or LOSSLESS H.264 compression is enabled, the network buffer of the UDP socket on the receiver side might reach its limit fairly quickly and starts to discard packages. To prevent this, rtsplib increases the UDP receive buffer size automatically on Windows. On Linux, the maximum size needs to be set on the OS.

To check the current UDP/IP receive buffer default and limit, type the following commands into the terminal:

$ sysctl net.core.rmem_max
net.core.rmem_max = 212992
$ sysctl net.core.rmem_default
net.core.rmem_default = 212992

For increasing the buffer size permanently, add the following lines into /etc/sysctl.conf and reboot:

net.core.rmem_max=26214400
net.core.rmem_default=26214400

For immediate effect, type into the terminal:

$ sudo sysctl -w net.core.rmem_max=26214400
net.core.rmem_max = 26214400
$ sudo sysctl -w net.core.rmem_default=26214400
net.core.rmem_default = 26214400

Reference Third-Party

RTSP Server: https://github.com/PHZ76/RtspServer (MIT Licence), adapted to project by Kevin Yu

RTSP Client: https://github.com/sliver-chen/Simple-Rtsp-Client (no Licence), adapted to project by Kevin Yu

© Research group MITI refactored by Ulrich Eck CAMP/TUM

About

RTSP Client/Server Implementation that sends/receives H264 bitstreams

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • C++ 88.9%
  • C 6.0%
  • CMake 4.6%
  • Python 0.5%