Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to use this library with customized video and audio RTP packets #138

Open
blueme0 opened this issue Oct 23, 2024 · 1 comment
Open

Comments

@blueme0
Copy link

blueme0 commented Oct 23, 2024

Hi Pedro, your library has been a great help to me.

In my project, I am currently receiving audio and video information as RTP packets from external devices through two separate ports via ServerSocket.
I would like to utilize these RTP packets directly with the RTSP-Server library. Is that possible?
I am looking for a way to relay the received RTP packets to a new port for streaming while controlling the stream using the RTSP-Server.

@pedroSG94
Copy link
Owner

Hello,

This library can't handle external packets, it is designed to emulate a RTSP server but using internal video/audio source and can't receive clients that send video/audio to the server (pushers), only works with RTSP players.

Actually, you can use RtspServerStream class and create your own VideoSource using that RTP packets but you will need unpaquetize that RTP packets to obtain raw video/audio data and then use a decoder like in this case:
pedroSG94/RootEncoder#1584 (comment)

Read the whole post to have more context. In this case the user receive the video from a Rtmp source so you need do the same but before fill the BufferDecoder class with the data received from the ServerSocket you need unpaquetize it and send the full video/audio frames to the BufferDecoder

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants