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

Will SRS support controlling recording files through the interface? #3510

Closed
linkewei0580 opened this issue Apr 12, 2023 · 1 comment
Closed
Labels
TransByAI Translated by AI/GPT.

Comments

@linkewei0580
Copy link

linkewei0580 commented Apr 12, 2023

Will SRS support controlling the recording file through the API interface? This is supported in NGINX-RTMP, so it would be great if we can record when needed. Thank you.

TRANS_BY_GPT3

@linkewei0580
Copy link
Author

linkewei0580 commented Apr 12, 2023

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 is an experimental capability introduced in version 3.0.

[Experimental] Support HTTP RAW API, please read #459 #319
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 and issues 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 instead 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 pulls streams for recording and uses HTTP callbacks 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 need to be recorded.

On the other hand, modifying dvr_apply in the RAW API allows enabling recording on certain streams.

Using the RAW API triggers numerous boundary conditions, such as streams being pushed and then stopped, and the recording rules can be highly diversified. These are typical considerations that a recording service needs to take into account, as each recording may have different requirements, rather than being suitable for implementation in a general open-source solution.

TRANS_BY_GPT3

@winlinvip winlinvip changed the title SRS 是否会支持通过接口控制录制文件。 Will SRS support controlling recording files through the interface? 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
TransByAI Translated by AI/GPT.
Projects
None yet
Development

No branches or pull requests

2 participants