bluenviron / mediamtx

Ready-to-use SRT / WebRTC / RTSP / RTMP / LL-HLS media server and media proxy that allows to read, publish, proxy, record and playback video and audio streams.
MIT License
10.69k stars 1.39k forks source link

Feature Request: Accept German Characters in Camera Path Validation #3412

Closed MahmoudHassan77 closed 1 month ago

MahmoudHassan77 commented 1 month ago

Which version are you using? v1.8.2

Which operating system are you using? Linux arm7 standard (mediamtx_v1.8.2_linux_armv7.tar.gz) Run on OpenWRT without problems except this one.

Describe the issue The current implementation of the camera path validation regex does not accept German characters. This feature request is to enhance the regex pattern to support German characters (ä, ö, ü, Ä, Ö, Ü, ß).

Additionally, mediamtx can't read RTMP streams, resulting in the error [RTMP source] not enough bytes. This stream works fine with other RTMP clients (VLC, OBS, vMix, etc.).

Proposed Change: Modify the regex pattern in the line: var rePathName = regexp.MustCompile(^[0-9a-zA-Z_-/.~]+$)

to include German characters. The updated regex should look like this: var rePathName = regexp.MustCompile(^[0-9a-zA-Z_-/.~äöüÄÖÜß]+$)

Rationale: Supporting German characters in the camera path will enhance the usability of the application for German-speaking users, ensuring that they can use paths that include their native characters without validation errors.

Impact:

Users: German-speaking users will be able to use camera paths with German characters. Code: Only a minor change in the regex pattern is required. Steps to Implement:

Locate the line with the current regex pattern: var rePathName = regexp.MustCompile(^[0-9a-zA-Z-/.~]+$) Update it to include German characters: var rePathName = regexp.MustCompile(^[0-9a-zA-Z-/.~äöüÄÖÜß]+$) Test the validation to ensure it now accepts paths with German characters.

github-actions[bot] commented 1 month ago

This issue is being automatically closed because it does not follow the issue template. Please reopen the issue and make sure to include all sections of the template.