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

Cannot stream via SRT protocol #4200

Open
deximy opened this issue Oct 12, 2024 · 1 comment
Open

Cannot stream via SRT protocol #4200

deximy opened this issue Oct 12, 2024 · 1 comment
Labels
EnglishNative This issue is conveyed exclusively in English. SRT It's about SRT protocol.

Comments

@deximy
Copy link

deximy commented Oct 12, 2024

Describe the bug
When streaming via SRT protocol, ffmpeg cannot establish connection with SRS.

Version
[2024-10-12 14:27:52.821][INFO][1][94k4u9z7] XCORE-SRS/5.0.213(Bee)
ffmpeg version 6.1-full_build-www.gyan.dev Copyright (c) 2000-2023 the FFmpeg developers
built with gcc 12.2.0 (Rev10, Built by MSYS2 project)

To Reproduce

  1. Run SRS with command docker run --rm -it -p 1935:1935 -p 12345:8080 -p 10080:10080/udp \ registry.cn-hangzhou.aliyuncs.com/ossrs/srs:5 \ ./objs/srs -c conf/srt.conf
  2. Start streaming with command ./ffmpeg -re -i ./doc/source.flv -c copy -pes_payload_size 0 -f mpegts 'srt://*.*.*.*:10080?streamid=#!::r=live/livestream,m=publish'

Expected behavior
The output of ffmpeg:

[aost#0:1/copy @ 0000029bb0c5c8c0] Error submitting a packet to the muxer: I/O error
[out#0/mpegts @ 0000029bb0c3d400] Error muxing a packet
[out#0/mpegts @ 0000029bb0c3d400] Error writing trailer: I/O errorx
[out#0/mpegts @ 0000029bb0c3d400] Error closing file: I/O error
[out#0/mpegts @ 0000029bb0c3d400] video:16909kB audio:20kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: unknown
size=   12577kB time=00:00:01.28 bitrate=80285.5kbits/s speed=0.221x
Conversion failed!

The output of SRS:

[2024-10-12 14:28:16.339][WARN][1][][11][SRT] /srs/trunk/objs/Platform-SRS5-Linux-5.15.0-GCC9.4.0-x86_64/srt-1-fit/srtcore/core.cpp:2182(processSrtMsg_HSREQ) # : @376050738: HSREQ/rcv: Agent did not set rcv-TSBPD - ignoring proposed latency from peer
[2024-10-12 14:28:16.347][INFO][1][054k5143] SRT client ip=*.*.*.*:51431, fd=376050738
[2024-10-12 14:28:16.347][WARN][1][054k5143][22] use private address as ip: 172.17.0.2, ifname=eth0
[2024-10-12 14:28:16.347][INFO][1][054k5143] @srt, streamid=#!::r=live/livestream,m=publish, stream_url=/live/livestream, vhost=__defaultVhost__, app=live, stream=livestream, param=
[2024-10-12 14:28:16.347][INFO][1][054k5143] new srt source, stream_url=/live/livestream
[2024-10-12 14:28:16.348][INFO][1][054k5143] new live source, stream_url=/live/livestream
[2024-10-12 14:28:16.348][INFO][1][054k5143] ignore disabled exec for vhost=__defaultVhost__
[2024-10-12 14:28:16.348][INFO][1][054k5143] http: mount flv stream for sid=/live/livestream, mount=/live/livestream.flv
[2024-10-12 14:28:16.794][INFO][1][054k5143] 4B audio sh, codec(10, profile=LC, 2channels, 0kbps, 48000HZ), flv(16bits, 2channels, 44100HZ)
[2024-10-12 14:28:16.800][INFO][1][054k5143] 49B video sh,  codec(7, profile=High, level=Other, 3840x2160, 0kbps, 0.0fps, 0.0s)
[2024-10-12 14:28:16.804][WARN][1][054k5143][22] VIDEO: Timestamp 1421=>1416, may need mix_correct.
[2024-10-12 14:28:17.827][INFO][1][1556v6go] Hybrid cpu=8.91%,28MB, cid=2,1, timer=62,0,0, clock=0,48,1,0,0,0,1,0,0, objs=(pkt:0,raw:0,fua:0,msg:168,oth:0,buf:0)
[2024-10-12 14:28:17.848][INFO][1][94k4u9z7] Process: cpu=8.91%,28MB, threads=2
[2024-10-12 14:28:22.103][INFO][1][054k5143] cleanup when unpublish
[2024-10-12 14:28:22.103][INFO][1][054k5143] SRT: before dispose resource(srt-ts-conn)(0x7f4a8c058440), conns=1, zombies=0, ign=0, inz=0, ind=0
[2024-10-12 14:28:22.104][ERROR][1][054k5143][4] srt serve error code=6002(SrtTimeout)(SRT connection is timeout) : srt: recvmsg : wait readable : srt socket 376050738 timeout
thread [1][054k5143]: do_publishing() [./src/app/srs_app_srt_conn.cpp:478][errno=62]
thread [1][054k5143]: recvmsg() [./src/protocol/srs_protocol_srt.cpp:801][errno=62]
thread [1][054k5143]: wait_readable() [./src/protocol/srs_protocol_srt.cpp:861][errno=62](Interrupted system call)
[2024-10-12 14:28:22.104][INFO][1][ff603791] SRT: clear zombies=1 resources, conns=1, removing=0, unsubs=0
[2024-10-12 14:28:22.104][INFO][1][054k5143] SRT: disposing #0 resource(srt-ts-conn)(0x7f4a8c058440), conns=1, disposing=1, zombies=0
[2024-10-12 14:28:22.104][INFO][1][054k5143] close srt_fd=376050738
@winlinvip winlinvip added the EnglishNative This issue is conveyed exclusively in English. label Oct 12, 2024
@winlinvip winlinvip added the SRT It's about SRT protocol. label Oct 23, 2024
@suzp1984
Copy link
Contributor

Rev10, Built by MSYS2 project
Are you running in Window platform?
check #3251 , running in Cygwin seems not a good idea.
Try the docker image in windows?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
EnglishNative This issue is conveyed exclusively in English. SRT It's about SRT protocol.
Projects
None yet
Development

No branches or pull requests

3 participants