Commit Graph

16 Commits

Author SHA1 Message Date
Winlin
ac868852e4
SRT: Support configurable default_streamid option. v6.0.180 (#4515)
Add a new default_streamid configuration option for the SRT server to
allow customization of the default streamid used when SRT clients
connect without setting the SRTO_STREAMID socket option.

When SRT clients (like VLC) connect without properly setting the
SRTO_STREAMID socket option, SRS previously used a hardcoded default
value of "#!::r=live/livestream,m=publish". This caused conflicts when:

1. A publisher connects without setting streamid (uses default publish
mode)
2. A player tries to connect without setting streamid (also uses default
publish mode)
3. The player gets a "Stream already exists or busy" error because both
are trying to publish

Start SRS with default stream id as viewer:

```bash
./objs/srs -c conf/srt.vlc.conf
```

Publish SRT stream by FFmpeg:

```bash
ffmpeg -re -i ./doc/source.flv -c copy -pes_payload_size 0 -f mpegts \
  'srt://127.0.0.1:10080?streamid=#!::r=live/livestream,m=publish'
```

Play SRT stream by ffplay:

```bash
ffplay 'srt://127.0.0.1:10080?streamid=#!::r=live/livestream,m=request'
```

Play SRT stream by VLC:

```
 Correct - Use simple URL without streamid parameter:
srt://127.0.0.1:10080

 Wrong - VLC doesn't support streamid parameter:
srt://127.0.0.1:10080?streamid=#!::r=live/livestream,m=request
```

---
Co-authored-by: OSSRS-AI <winlinam@gmail.com>
2025-10-01 21:25:39 -04:00
hondaxiao
fbc6eebe18 SRT: remove rtmp_to_srt 2022-06-14 20:02:25 +08:00
winlin
bda0268a37 SRT: Update full.conf for new configs. 2022-06-14 20:02:24 +08:00
hondaxiao
b566182f0b SRT: fix utest failed 2022-06-14 20:02:24 +08:00
hondaxiao
94fa0ff7bd Refine SRT code, with StateThread adpater 2022-06-14 19:58:42 +08:00
winlin
e3bca883e1 SuqashSRS4: Build SRT native 2021-05-16 16:14:00 +08:00
winlin
adb6f723c7 Config: Update config files, daemon off, log to console 2021-02-18 11:39:25 +08:00
winlin
4ff8a055c5 Update conf to follow wiki 2020-10-23 20:54:36 +08:00
runner365
7f4cc6221c 1,solve audio timestamp bugs;2,solve video dts increase bugs 2020-02-29 16:47:20 +08:00
runner365
4bd37d43b4 solve dts==0 bugs; solve large aac 2930bytes timestamp bugs 2020-02-26 11:14:05 +08:00
runner365
24f286684e add srt parameter configure 2020-02-12 20:02:55 +08:00
winlin
87ba204a42 Update doc for SRT url. 2020-01-23 18:25:44 +08:00
winlin
c7f6eef4ac Refine config file, link to issue. 2020-01-23 11:51:35 +08:00
runner365
03ef01c635 update configure 2020-01-22 10:59:50 +08:00
runner365
746d188e6f update srt.conf 2020-01-21 19:23:38 +08:00
runner365
5c5fd805c5 add srt mpegts to rtmp 2020-01-21 19:20:09 +08:00