#7187 closed defect (invalid)
ffmpeg stops immediately when sending by libsrt
| Reported by: | koba | Owned by: | |
|---|---|---|---|
| Priority: | normal | Component: | avformat |
| Version: | git-master | Keywords: | libsrt |
| Cc: | Marton Balint | Blocked By: | |
| Blocking: | Reproduced by developer: | no | |
| Analyzed by developer: | no |
Description
Summary of the bug:
Build ffmpeg on git tag 'n4.1-dev' with configure --enable-libsrt.
Transmitting by SRT always fails.
How to reproduce:
Receiver
% ffplay -i 'srt://localhost:3000?mode=listener'
Sender
% ffmpeg -report -re -f lavfi -i testsrc=s=1280x720:r=30 -c:v libx264 -f mpegts 'srt://localhost:3000'
Sender ffmpeg stops with these error
18:46:44.038217/ffmpeg*E: SRT.c: LiveSmoother: payload size: 9024 exceeds maximum allowed 1316 [srt @ 0x273f980] Operation not supported: Incorrect use of Message API (sendmsg/recvmsg).. av_interleaved_write_frame(): Unknown error occurred Error writing trailer of srt://localhost:3000: Unknown error occurred
I attach full error.log and output file by '-report' option.
FYI: this quick dirty patch fixes this problem.
diff --git a/libavformat/libsrt.c b/libavformat/libsrt.c
index 0f9529d..073261b 100644
--- a/libavformat/libsrt.c
+++ b/libavformat/libsrt.c
@@ -466,6 +466,7 @@ static int libsrt_open(URLContext *h, const char *uri, int flags)
}
}
}
+ h->max_packet_size = 1316;
return libsrt_setup(h, uri, flags);
}
Attachments (2)
Change History (5)
by , 8 years ago
comment:1 by , 8 years ago
| Cc: | added |
|---|
comment:2 by , 8 years ago
Bug confirmed on my side and by several other people: https://github.com/Haivision/srt/issues/371
nxstreaming in the link has a better patch IMO:
https://gist.github.com/nxtreaming/defaf90d4a08fdda0a7b30440ddfbbaa
It adds a pkt_size option to the protocol exactly as with udp protocol.
edit: the mss option should be used per mss=1316
So not a bug.
The doc should reflect that important info since it is not clearly spellt out.
comment:3 by , 8 years ago
| Resolution: | → invalid |
|---|---|
| Status: | new → closed |



console output