dvr_apply with regex pattern breaks DVR recording, while unset dvr_apply works
Issue Description:
I'm using SRS v6.0.101 (Docker deployment) and encountered an issue with dvr_apply regex matching:
Expected Behavior:
Use regex in dvr_apply to selectively record streams (e.g., exclude streams containing 165-0-7).
Example config:
dvr { enabled on; dvr_path ./objs/nginx/html/[app]/[stream]/[timestamp].flv; dvr_apply ^(?!.165-0-7).$; # Exclude streams with "165-0-7" }
Actual Behavior:
It seems like there was no text provided in your input. Please provide some text for rephrasing.
When dvr_apply is not set, DVR works perfectly (all streams are recorded).
Your input appears to be empty. Please provide the text you would like to have rephrased.
When dvr_apply is set (even with simple regex like .*), no streams are recorded.
It seems that you have submitted an empty message again. If you have any text that you need rephrased, please enter it so I can assist you.
No errors in logs (docker logs
Environment:
SRS Version: 6.0.101
OS: Linux (Docker)
TRANS_BY_GPT4
Title: Alternative ways to control DVR recording programmatically after HTTP RAW API removal It seems like there was no text provided in your input. Please provide some text for rephrasing. Description: I need to implement dynamic control over which streams should be recorded based on business logic in my backend service. Previously, I could have used the HTTP RAW API for this, but I understand it has been removed in current SRS versions. Your input appears to be empty. Please provide the text you would like to have rephrased. My Requirements: It seems that you have submitted an empty message again. If you have any text that you need rephrased, please enter it so I can assist you. All streams should be allowed to publish (no blocking via on_publish) You have submitted an empty message. Please provide the text you would like to have rephrased, and I will be happy to help. Recording should be enabled/disabled per-stream based on: It appears you've sent another empty message. If you have any text that you need rephrased into simple, technical English, please provide the content, and I will assist you. Complex business rules from my backend You have submitted an empty message. If you have any text that you need to be rephrased into simple, technical English, please provide the content, and I will assist you. Database lookups It appears you've sent another empty message. To assist you with rephrasing, I need the text you want to be translated into simple, technical English. Please provide the text when you're ready. User permissions It seems you've sent a blank message again. If you have any text that you need rephrased into simple, technical English, please provide the content, and I'll be glad to help. What I've Considered: You have submitted an empty message. If you have any text that you would like to be rephrased into simple, technical English, please provide the text, and I will assist you. on_dvr callback + file deletion: It appears you've sent another empty message. To assist you with rephrasing, I need text content to work with. Please provide the text you wish to have rephrased into simple, technical English. Works but inefficient (records then deletes) It seems you've submitted a blank message again. If you have any text that you need rephrased into simple, technical English, please provide the content, and I'll be happy to assist you. Wastes disk I/O on unwanted recordings Your message is empty. Please provide the text you would like to have rephrased into simple, technical English. Question: What are the recommended approaches to implement programmatic recording control in current SRS versions? Specifically: It appears that your message is still empty. If you have any text that needs to be rephrased into simple, technical English, please provide the content. Is there a supported way to dynamically enable/disable DVR per stream through the existing API?
TRANS_BY_GPT4
The dvr_apply does NOT support regex patterns - it only supports exact string matching.
How dvr_apply actually works:
- "Record all streams" command.
- "Record only the streams specified as 'live/stream1' or 'live/stream2'" command.
- Any other value (including regex like
.*or^(?!.*165-0-7).*$) is treated as a literal string to match
TRANS_BY_GPT4