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

Multiple Inputs SRT to Origin "No room to store incoming packet" #452

Closed
mithrand1rr opened this issue Jul 23, 2021 · 3 comments
Closed
Assignees
Labels
bug Confirmed as bug long-term fix Requires a long-term fix

Comments

@mithrand1rr
Copy link

Hi there trying to pipe in multiple streams into the origin over local host. The streams are SRT and up to 3-4 work as expected but once we go over the 4-5 number on the input side we start to get the folioing

W [SRT:RcvQ:w1:6533] SRT | core.cpp@SRT:9626 | @779869:No room to store incoming packet: offset=1 avail=0 ack.seq=1574014853 pkt.seq=1574014854 rcv-remain=8191 drift=0

Tried to disable all the unnecessary publishers that and noise but the system resources are well under 50% across the board. No encoding is happening, everything should be bypassed on the Audio and video side of things.

Also tested multiple inputs from sources other than local host and still only seem to be able to get around 3-4 stable.

Origin config is below. The goal we are trying to get to is 20+ incoming streams. Again they are all being piped in via local host (127.0.0.1:9998)

As always thanks in advanced for any tips/ tricks!

`

OvenMediaEngine origin *
<!-- 
To get the public IP address(mapped address of stun) of the local server. 
This is useful when OME cannot obtain a public IP from an interface, such as AWS or docker environment. 
If this is successful, you can use ${PublicIP} in your settings.
-->
<StunServer>stun.l.google.com:19302</StunServer>

<!-- Settings for the ports to bind -->
<Bind>
	<!-- Enable this configuration if you want to use API Server -->
	
	<Managers>
		<API>
			<Port>${env:OME_API_PORT:48081}</Port>
			<WorkerCount>1</WorkerCount>
		</API>
	</Managers>
	
	<Providers>
		<!--<RTMP>
			<Port>${env:OME_RTMP_PROV_PORT:1935}</Port>
		</RTMP> -->
		<SRT>
			<Port>${env:OME_SRT_PROV_PORT:9998}</Port>
		</SRT>
		<MPEGTS>
			<!--
				Listen on port 4000-4005
				This is just a demonstration to show that you can configure the port in several ways
			-->
			<Port>${env:OME_MPEGTS_PROV_PORT:4000-4003,4004,4005/udp}</Port>
		</MPEGTS>
		<WebRTC>
			<Signalling>
				<Port>${env:OME_SIGNALLING_PORT:3333}</Port>
				<!-- If you want to use TLS, specify the TLS port -->
				<!-- <TLSPort>3334</TLSPort> -->
			</Signalling>
			<IceCandidates>
				<TcpRelay>${env:OME_TCP_RELAY_ADDRESS:*:3478}</TcpRelay>
				<IceCandidate>${env:OME_ICE_CANDIDATES:*:10006-10010/udp}</IceCandidate>
			</IceCandidates>
		</WebRTC>
	</Providers>

	<Publishers>
		<!-- The OVT is protocol for ORIGIN-EDGE -->
		<OVT>
			<Port>${env:OME_ORIGIN_PORT:9000}</Port>
		</OVT>
		 <!--<HLS> -->
			<!--<Port>${env:OME_HLS_STREAM_PORT:8080}</Port> -->
			<!-- If you want to use TLS, specify the TLS port -->
			<!-- <TLSPort>443</TLSPort> -->
		<!--</HLS>
		<DASH>
			<Port>${env:OME_DASH_STREAM_PORT:8080}</Port> -->
			<!-- If you want to use TLS, specify the TLS port -->
			<!-- <TLSPort>443</TLSPort> -->
		<!--</DASH> -->
		<WebRTC>
			<Signalling>
				<Port>${env:OME_SIGNALLING_PORT:3333}</Port>
				<!-- If you want to use TLS, specify the TLS port -->
				<!-- <TLSPort>3334</TLSPort> -->
			</Signalling>
			<IceCandidates>
				<TcpRelay>${env:OME_TCP_RELAY_ADDRESS:*:3478}</TcpRelay>
				<IceCandidate>${env:OME_ICE_CANDIDATES:*:10006-10010/udp}</IceCandidate>
			</IceCandidates>
		</WebRTC>
	</Publishers>
</Bind>

<VirtualHosts>
	<!--
		You can include multiple XML files by doing the following:
		<VirtualHost include="sites-enabled/*.xml" />
	-->
	<VirtualHost include="VHost*.xml" />
	<VirtualHost>
		<Name>default</Name>

		<!-- Settings for multi ip/domain and TLS -->
		<Host>
			<Names>
				<!-- Host names
					<Name>stream1.airensoft.com</Name>
					<Name>stream2.airensoft.com</Name>
					<Name>*.sub.airensoft.com</Name>
					<Name>192.168.0.1</Name>
				-->
				<Name>*</Name>
			</Names>
			<!--
			<TLS>
				<CertPath>path/to/file.crt</CertPath>
				<KeyPath>path/to/file.key</KeyPath>
				<ChainCertPath>path/to/file.crt</ChainCertPath>
			</TLS>
			-->
		</Host>

		<!-- Refer https://airensoft.gitbook.io/ovenmediaengine/signedpolicy
		<SignedPolicy>
			<PolicyQueryKeyName>policy</PolicyQueryKeyName>
			<SignatureQueryKeyName>signature</SignatureQueryKeyName>
			<SecretKey>aKq#1kj</SecretKey>
			<Enables>
				<Providers>rtmp,webrtc,srt</Providers>
				<Publishers>webrtc,hls,dash,lldash</Publishers>
			</Enables>
		</SignedPolicy>
		-->

		<!-- Settings for applications -->
		<Applications>
			<Application>
				<Name>TEST</Name>
				<!-- Application type (live/vod) -->
				<Type>live</Type>
				<OutputProfiles>
					<OutputProfile>
						<Name>main</Name>
						<OutputStreamName>${OriginStreamName}</OutputStreamName>
						<Encodes>
							<Audio>
								<Bypass>true</Bypass>
							</Audio>
							<Video>
								<Bypass>true</Bypass>
							</Video>
							<!--<Audio>
								<Codec>opus</Codec>
								<Bitrate>196000</Bitrate>
								<Samplerate>48000</Samplerate>
								<Channel>2</Channel>
							</Audio> -->
						</Encodes>
					</OutputProfile>
				</OutputProfiles>
				<Providers>
					<OVT />
					<WebRTC />
					<RTMP />
					<SRT />
					<RTSPPull />
					<MPEGTS>
						<StreamMap>
							<!--
								Set the stream name of the client connected to the port to "stream_${Port}"
								For example, if a client connets to port 4000, OME creates a "stream_4000" stream
							-->
							<Stream>
								<Name>stream_${Port}</Name>
								<Port>4000,4001-4004</Port>
							</Stream>
							<Stream>
								<Name>stream_4005</Name>
								<Port>4005</Port>
							</Stream>
						</StreamMap>
					</MPEGTS>
				</Providers>
				<Publishers>
					<SessionLoadBalancingThreadCount>12</SessionLoadBalancingThreadCount>
					<OVT />
					<WebRTC>
						<Timeout>30000</Timeout>
					</WebRTC>
					 <!--<HLS>
						<SegmentDuration>5</SegmentDuration>
						<SegmentCount>3</SegmentCount>
						<CrossDomains>
							<Url>*</Url>
						</CrossDomains>
					</HLS>
					<DASH>
						<SegmentDuration>5</SegmentDuration>
						<SegmentCount>3</SegmentCount>
						<CrossDomains>
							<Url>*</Url>
						</CrossDomains>
						<UTCTiming />
					</DASH> -->
					<!--<LLDASH>
						<SegmentDuration>5</SegmentDuration>
						<CrossDomains>
							<Url>*</Url>
						</CrossDomains>
						<UTCTiming />
					</LLDASH> -->
				</Publishers>
			</Application>
		</Applications>
	</VirtualHost>
</VirtualHosts>

`

@getroot
Copy link
Member

getroot commented Jul 26, 2021

This seems to be related to the recv buffer of SRT.

Haivision/srt#409

We will find out if there is an option in the SRT to solve this and apply it.

Thanks for reporting.

@getroot getroot added the bug Confirmed as bug label Aug 9, 2021
@stale
Copy link

stale bot commented Jun 2, 2022

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale label Jun 2, 2022
@getroot getroot added the pinned label Jun 2, 2022
@stale stale bot removed the stale label Jun 2, 2022
@getroot getroot removed the pinned label Mar 9, 2023
@getroot getroot added the long-term fix Requires a long-term fix label Apr 10, 2023
@dimiden
Copy link
Member

dimiden commented May 31, 2023

The "No room to store.." error can be resolved by adjusting the size of SRTO_RCVBUF.
You can refer to srt-socket-options for instruction on how to set SRT option.

For more information, please refer to Haivision/srt#642.

@dimiden dimiden closed this as completed May 31, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Confirmed as bug long-term fix Requires a long-term fix
Projects
None yet
Development

No branches or pull requests

3 participants