Skip to content

is a rtsp server implemented using netty and javacv and can also be a camera emulator. It can convert video files into rtsp stream and send rtsp stream to client.

Notifications You must be signed in to change notification settings

quantum2947/rtsp-server

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

rtsp-server

is a rtsp server implemented using netty and javacv and can also be a camera emulator. It can convert video files into rtsp stream and send rtsp stream to client.

Any type of video file is supported .

Usage:

Start a netty rtsp server using your local video file:

public class RtspServerStarter {
    public static void main(String[] args) {
        RtspServer rtspServer = new RtspServer(new File("d:/Test/test_video.mp4"), 554);
        String address = rtspServer.start();
        log.info("Rtsp Server started, address [{}]", address);
    }
}  
// eg. server address [rtsp://192.168.31.209:554]

Start a rtsp client to connect the created rtsp server:

public class RtspClient {
    public static void main(String[] args) {
        pullRtspStream("rtsp://192.168.31.209:554");
    }
{

Then you can see the video preview window:

image-20240417010953383

Settings:
Parameter Description example
filePath Your local video file path. d:/Test/test_video.mp4
serverPort Rtsp server port 554
rtpPort Rtp port 34532
rtcpPort Rtcp port 34533

About

is a rtsp server implemented using netty and javacv and can also be a camera emulator. It can convert video files into rtsp stream and send rtsp stream to client.

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages