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

Feature Request: add option to control compression #5

Closed
givo opened this issue Apr 30, 2020 · 2 comments
Closed

Feature Request: add option to control compression #5

givo opened this issue Apr 30, 2020 · 2 comments

Comments

@givo
Copy link

givo commented Apr 30, 2020

Hi,

Currently I'm using rtspatt as my RTSP server for testing purposes, and it's working pretty good. One of the things that I'm missing is an option to control the compression level. Out of the box the rtspatt compression level is a bit too much for my purposes, so I wish to have a simple RTSP server with an option to control the compression level.

Is it possible to add this option?

Thank you :)

@aler9
Copy link
Member

aler9 commented May 2, 2020

Hello, thanks for your interest in this project.

An RTSP server can only propagate already-existing streams, that are left untouched with respect to the original source. It differs from a media server, which is a more complex software that usually performs both re-encoding (editing of the streams, that allows compression) and propagation.

Theferore, compression is not part of the RTSP protocol (nor it was part of rtspatt); if we want to be more specific, it is indeed part of the RTSP protocol, but it only covers the initial handshake, so i don't think this is what you're looking for.

To achieve compression you must use an external software, together with rtsp-simple-server, for instance ffmpeg, in this way:

  1. start rtsp-simple-server:
./rtsp-simple-server
  1. connect your source to rtsp://localhost:8554/original

  2. link rtsp://localhost:8554/original to ffmpeg, then link ffmpeg to rtsp://localhost:8554/compressed:

ffmpeg -i rtsp://localhost:8554/original -c:v libx264 -preset ultrafast -tune zerolatency -b 600k -f rtsp rtsp://localhost:8554/compressed

now if you open rtsp://localhost:8554/compressed you'll see the compressed stream, while if you open rtsp://localhost:8554/original you'll see the original stream.

Hope this is what you're looking for. Bye

@aler9 aler9 closed this as completed May 17, 2020
@github-actions
Copy link
Contributor

github-actions bot commented Jan 1, 2023

This issue is being locked automatically because it has been closed for more than 6 months.
Please open a new issue in case you encounter a similar problem.

@github-actions github-actions bot locked and limited conversation to collaborators Jan 1, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants