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

**SRT: Support PUSH SRT by IP and optional port.** Support streaming by IP and optional port. #3198

Closed
winlinvip opened this issue Sep 30, 2022 · 1 comment · Fixed by #3202
Assignees
Labels
SRT It's about SRT protocol. TransByAI Translated by AI/GPT.
Milestone

Comments

@winlinvip
Copy link
Member

winlinvip commented Sep 30, 2022

Some device only support IP and an optional port, for example:

srt://192.168.1.100:10080

Where SRS's server IP is 192.168.1.100 which can be a public internet IP.

TRANS_BY_GPT3

@winlinvip winlinvip added the SRT It's about SRT protocol. label Sep 30, 2022
@winlinvip winlinvip added this to the 5.0 milestone Sep 30, 2022
@xiaozhihong xiaozhihong linked a pull request Oct 8, 2022 that will close this issue
@xiaozhihong
Copy link
Collaborator

xiaozhihong commented Oct 8, 2022

By quink:

FFmpeg/FFplay has several usage modes: 

---------------------------------------------------------------------------
Simulate server to test streaming playback:

Listener passively pushes the stream (write):
./ffmpeg -re -i  ~/video/cctv.mp4 -c copy -f mpegts -mode listener srt://127.0.0.1:6666

Caller actively pulls the stream (read):
./ffplay srt://127.0.0.1:6666

----------------------------------------------
Simulate server testing for streaming.

The listener passively receives (reads).
./ffplay -mode listener  srt://127.0.0.1:6666

The caller actively pushes the stream (writes).
 ./ffmpeg -re -i  ~/video/cctv.mp4 -c copy -f mpegts srt://127.0.0.1:6666

----------------------------------------------
./ffmpeg -h protocol=srt
-mode              <int>        ED......... Connection mode (caller, listener, rendezvous) (from 0 to 2) (default caller)
     caller          0            ED.........
     listener        1            ED.........
     rendezvous      2            ED.........

The caller is the default and all three types are supported.

The above is not feasible for SRS because SRS is a server and needs to know whether the client needs to pull or push the stream. The so-called Caller and Listener mode is just a logical distinction and cannot be used to obtain the peer's mode after the communication is established, similar to using interfaces like srt_getsockopt(SRTO_MODE) (there is no such SRT socket option). Therefore, in the absence of a stream ID, the server can only assume that the other party is pushing the stream.

TRANS_BY_GPT3

winlinvip added a commit that referenced this issue Oct 9, 2022
* SRT: use default streamid when empty

* Fix #3198: SRT: Support PUSH SRT by IP and optional port. v5.0.76

Co-authored-by: winlin <winlin@vip.126.com>
@winlinvip winlinvip changed the title SRT: Support PUSH SRT by IP and optional port. 支持IP和端口推流。 **SRT: Support PUSH SRT by IP and optional port.** Support streaming by IP and optional port. 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
SRT It's about SRT protocol. TransByAI Translated by AI/GPT.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants