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

API: Remove HTTP-RAW-API capability, RAW API removed. #2653

Closed
winlinvip opened this issue Oct 8, 2021 · 1 comment
Closed

API: Remove HTTP-RAW-API capability, RAW API removed. #2653

winlinvip opened this issue Oct 8, 2021 · 1 comment
Assignees
Labels
API HTTP-API, HTTP-Callback, etc. Enhancement Improvement or enhancement. TransByAI Translated by AI/GPT.
Milestone

Comments

@winlinvip
Copy link
Member

winlinvip commented Oct 8, 2021

RAW API implementation is about how to modify the configuration and reload it. The most natural way is to write a backend server using Go or Node.js. After modifying the configuration file, you can send a signal to SRS or call the reload API. Moreover, how to modify the configuration and when to modify it are strongly related to the business, and they are part of the business system. Therefore, they were removed in version 4.0.

RAW API is removed because it implements the config file modify and reload, which should do by user server.

HTTP RAW API was introduced in version 3.0 as an experimental capability.

It mainly provides the ability to modify the system's API, primarily through modifying configuration files and then reloading them to take effect. After providing this capability, there have been continuous bug reports related to it, so it has been decided to remove this experimental capability in version 4.0.

The main reason for its numerous issues is that the business system, which should have been implemented by the users, was implemented within the RAW API. For example, on-demand recording only requires recording certain streams.

  • A typical approach is to create a separate system to manage FFmpeg processes, where each FFmpeg process pulls streams for recording, and HTTP callbacks are used to determine which streams need to be recorded.
  • Alternatively, HLS can be used to write ts files, and the on_hls callback can be used to decide which streams should be recorded.
  • With the modification of the RAW API's dvr_apply, recording can be enabled for certain streams.

Using the RAW API can trigger a significant number of boundary conditions, where streams may start and stop pushing, and the recording rules can be highly diversified. These are typical considerations that recording services need to take into account, as each recording may have different requirements, rather than being suitable for implementation in a generic open-source solution.

TRANS_BY_GPT3

@winlinvip winlinvip self-assigned this Oct 8, 2021
@winlinvip winlinvip added API HTTP-API, HTTP-Callback, etc. Enhancement Improvement or enhancement. labels Oct 8, 2021
@winlinvip winlinvip added this to the 4.0 milestone Oct 8, 2021
@winlinvip
Copy link
Member Author

winlinvip commented Oct 10, 2021

RAW API opened by SRS3:

Only partial capabilities are retained in SRS4:

Retained RAW API capabilities:

All others will be disabled, and the configuration will be changed to:

  • allow_reload on|off;
  • allow_query off; Not supported to enable, query before update.
  • allow_update off; Not supported to enable, update configuration.

TRANS_BY_GPT3

@winlinvip winlinvip changed the title 删除HTTP-RAW-API能力 API: 删除HTTP-RAW-API能力, RAW API removed Nov 4, 2021
peipeiguo added a commit to peipeiguo/srs that referenced this issue Sep 7, 2022
@winlinvip winlinvip changed the title API: 删除HTTP-RAW-API能力, RAW API removed API: Remove HTTP-RAW-API capability, RAW API removed. Jul 29, 2023
@winlinvip winlinvip added the TransByAI Translated by AI/GPT. label Jul 29, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
API HTTP-API, HTTP-Callback, etc. Enhancement Improvement or enhancement. TransByAI Translated by AI/GPT.
Projects
None yet
Development

No branches or pull requests

1 participant