View Issue Details

IDProjectCategoryView StatusLast Update
0001617OBS-StudioOutputs Pluginpublic2020-04-04 08:56
ReporterArno500 Assigned To 
PrioritynormalSeveritytrivialReproducibilityalways
Status closedResolutionwon't fix 
PlatformOBS StudioOSWindows 
Product Version25.0.0 
Summary0001617: SRT output doesn't to honor latency setting
DescriptionFor some reason, when using SRT directly in OBS, I can't seem to stream properly to an SRT FFMPEG ingest with a bad connection. Basically I want to stream on a line with packet drops that may occur and slow bandwidth from time to time. SRT should be perfect for these kind of uses. But when using OBS to stream via SRT, a really low number of packet drop is enough to get one of these:
````
[mpegts @ 0x55ded175c740] Continuity check failed for pid 256 expected 4 got 10
[mpegts @ 0x55ded175c740] Continuity check failed for pid 0 expected 15 got 0
[mpegts @ 0x55ded175c740] Continuity check failed for pid 4096 expected 15 got 0
[mpegts @ 0x55ded175c740] Packet corrupt (stream = 0, dts = 3315590).
[mpegts @ 0x55ded175c740] Continuity check failed for pid 257 expected 5 got 10
[mpegts @ 0x55ded175c740] Continuity check failed for pid 256 expected 14 got 5
[mpegts @ 0x55ded175c740] Packet corrupt (stream = 0, dts = 3323090).
[mpegts @ 0x55ded175c740] Continuity check failed for pid 256 expected 7 got 8
[mpegts @ 0x55ded175c740] Continuity check failed for pid 257 expected 8 got 13
[mpegts @ 0x55ded175c740] Packet corrupt (stream = 0, dts = 3324590).
[mpegts @ 0x55ded175c740] Continuity check failed for pid 17 expected 0 got 1
```
And of course the stream has some H264 corruption artifacts.
The thing is, when using srt-live-transmit demo app (and proxying OBS stream), I can give up to 90% packet drop (with a high bandwith to retransmit of course) and still have nice clear video.

I suspect OBS side doesn't honor the latency setting in the URL (which I set to 3000 for more "connection flexibility"). When using the default latency of 120 in srt-live-transmitter I get similar results as OBS. This is exactly the same problem with the custom ffmpeg output.
That's unfortunate because using SRT in OBS is rendered almost useless for unstable connections.

Note: I use "clumsy" to simulate a bad connection with packet drops.
Steps To ReproduceYou can test with clumsy (rule: `udp and (udp.DstPort == 4444 or udp.SrcPort == 4444)`) by increasing the packet drop rate.

For rock-solid transmission with bad connection:
OBS and srt-live-transmit are on my machine, FFMPEG is on a VPS with a high bandwidth and reliable connection.
OBS -----(UDP or SRT)-----> srt-live-transmit ------(sends SRT to server with latency=3000 on caller URL)------> FFMPEG -----(RTMP)----> Twitch.tv


For unstable transmission (but should not):
OBS -----(SRT, latency set or not)---> FFMPEG ----(RTMP)----> Twitch.tv
TagsFFmpeg

Activities

pkv

2020-03-30 23:24

developer   ~0004971

check the wiki: the srt streaming output is buggy; there's a fix which can be tested (ping me on obs discord if you want to try it). In the meantime, use the custom ffmpeg output to URL: it works better with srt.

pkv

2020-04-04 08:55

developer   ~0004975

closing this; the latency option is in microseconds in ffmpeg not in ms as in libsrt API.
Setting latency=3000000 <=> 3 sec .

Issue History

Date Modified Username Field Change
2020-03-30 23:22 Arno500 New Issue
2020-03-30 23:22 Arno500 Tag Attached: FFmpeg
2020-03-30 23:24 pkv Note Added: 0004971
2020-04-04 08:55 pkv Note Added: 0004975
2020-04-04 08:56 pkv Severity major => trivial
2020-04-04 08:56 pkv Status new => closed
2020-04-04 08:56 pkv Resolution open => won't fix