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

Multiplexed stream is not present in OriginMapStore Redis db #1577

Open
maruf-cs opened this issue Apr 2, 2024 · 9 comments
Open

Multiplexed stream is not present in OriginMapStore Redis db #1577

maruf-cs opened this issue Apr 2, 2024 · 9 comments
Assignees
Labels
bug Confirmed as bug patched Patch applied

Comments

@maruf-cs
Copy link

maruf-cs commented Apr 2, 2024

Suppose I want to multiplex ('mux') 'stream720' and 'stream480' into 'stream'. However, upon inspection, I noticed that 'stream' is not present in Redis, while 'stream720' and 'stream480' are.

To Reproduce
Steps to reproduce the behavior:

  1. Set Server.xml as follows
         <OriginMapStore>
		<RedisServer>
			<Host>mydomain.com:6379</Host>
		</RedisServer>
		<OriginHostName>ome-dev.mydomain.com</OriginHostName>
	</OriginMapStore>

       <Multiplex>
	       <MuxFilesDir>.</MuxFilesDir>
       </Multiplex>
  1. With Encoder OBS Studio 30.0.02 64bit
  2. Call /v1/vhosts/default/apps/app/multiplexChannels with body
{
  "outputStream": {
    "name": "stream"
  },
  "sourceStreams": [
    {
      "name": "720",
      "url": "stream://default/app/stream720",
      "trackMap": [
        {
          "sourceTrackName": "bypass_video",
          "newTrackName": "video_720"
        },
        {
          "sourceTrackName": "aac_audio",
          "newTrackName": "aac_audio"
        }
      ]
    },
    {
      "name": "480",
      "url": "stream://default/app/stream480",
      "trackMap": [
        {
          "sourceTrackName": "bypass_video",
          "newTrackName": "video_480"
        },
        {
          "sourceTrackName": "aac_audio",
          "newTrackName": "aac_audio"
        }
      ]
    }
  ],
  "playlists": [
    {
      "name": "LLHLS ABR",
      "fileName": "playlist",
      "options": {
        "webrtcAutoAbr": true,
        "hlsChunklistPathDepth": 0
      },
      "renditions": [
        {
          "name": "720",
          "video": "video_720",
          "audio": "aac_audio"
        },
        {
          "name": "480",
          "video": "video_480",
          "audio": "aac_audio"
        }
      ]
    }
  ]
}
  1. The api call produces stream.mux file which contains
<?xml version="1.0"?>
<Multiplex>
	<OutputStream>
		<Name>stream</Name>
	</OutputStream>
	<SourceStreams>
		<SourceStream>
			<Name>720</Name>
			<Url>stream://default/app/stream720</Url>
			<TrackMap>
				<Track>
					<SourceTrackName>aac_audio</SourceTrackName>
					<NewTrackName>aac_audio</NewTrackName>
				</Track>
				<Track>
					<SourceTrackName>bypass_video</SourceTrackName>
					<NewTrackName>video_720</NewTrackName>
				</Track>
			</TrackMap>
		</SourceStream>
		<SourceStream>
			<Name>480</Name>
			<Url>stream://default/app/stream480</Url>
			<TrackMap>
				<Track>
					<SourceTrackName>aac_audio</SourceTrackName>
					<NewTrackName>aac_audio</NewTrackName>
				</Track>
				<Track>
					<SourceTrackName>bypass_video</SourceTrackName>
					<NewTrackName>video_480</NewTrackName>
				</Track>
			</TrackMap>
		</SourceStream>
	</SourceStreams>
	<Playlists>
		<Playlist>
			<Name>LLHLS ABR</Name>
			<FileName>playlist</FileName>
			<Options>
				<WebRtcAutoAbr>true</WebRtcAutoAbr>
				<HlsChunklistPathDepth>0</HlsChunklistPathDepth>
			</Options>
			<Rendition>
				<Name>720</Name>
				<Video>video_720</Video>
				<Audio>aac_audio</Audio>
			</Rendition>
			<Rendition>
				<Name>480</Name>
				<Video>video_480</Video>
				<Audio>aac_audio</Audio>
			</Rendition>
		</Playlist>
	</Playlists>
</Multiplex>

Expected behavior
When started streaming, redis db should have 3 stream including the multiplexed stream. But it shows two streams only
image

Logs
ovenmediaengine.log

Server (please complete the following information):

  • OS: Ububtu 22.04
  • OvenMediaEngine Version: 0.16.5
  • Branch: released version [https://github.com/AirenSoft/OvenMediaEngine/archive/v0.16.5.tar.gz]

Originally posted by @maruf-cs in #1489 (reply in thread)

@getroot getroot self-assigned this Apr 4, 2024
@getroot getroot added the investigating Being checked label Apr 4, 2024
Copy link

stale bot commented Jun 4, 2024

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 4, 2024
@getroot getroot removed the stale label Jun 4, 2024
Copy link

stale bot commented Aug 3, 2024

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 Aug 3, 2024
@getroot getroot removed the stale label Aug 3, 2024
@chakphanu
Copy link

chakphanu commented Aug 23, 2024

@getroot

Mux -> ovt_stream.cpp -> OvtStream::Start()

GetLinkedInputStream() is always nullptr when start from Mux.

when i'm test bypass checking IsFromOriginMapStore, it's work register to Redis.

bool OvtStream::Start()
{
	if(GetState() != Stream::State::CREATED)
	{
		return false;
	}
        // Add true ||  for bypass checking IsFromOriginMapStore
	if (  true || GetLinkedInputStream() != nullptr && GetLinkedInputStream()->IsFromOriginMapStore() == false)
	{
		auto result = ocst::Orchestrator::GetInstance()->RegisterStreamToOriginMapStore(GetApplicationInfo().GetVHostAppName(), GetName());
		if (result == CommonErrorCode::ERROR)
		{
			logtw("Failed to register stream to origin map store : %s/%s", GetApplicationName(), GetName().CStr());
			return false;
		}
	}

	if(!CreateStreamWorker(_worker_count))
	{
		return false;
	}

	logtd("OvtStream(%d) has been started", GetId());
	_packetizer = std::make_shared<OvtPacketizer>(OvtPacketizerInterface::GetSharedPtr());

	return Stream::Start();
}

@getroot
Copy link
Member

getroot commented Sep 24, 2024

I have resolved this issue and committed it to the master branch. Could you please check if your issue has been resolved as well?

@getroot getroot added bug Confirmed as bug patched Patch applied and removed investigating Being checked labels Sep 24, 2024
@maruf-cs
Copy link
Author

maruf-cs commented Sep 28, 2024

image

It Creates Muxed stream for all app that is configure inside origin, but I've created the muxed stream in "le" only. Also When I stop the stream, Muxed streams are not getting removed from redis, which is shown to below image.

image

@getroot
Copy link
Member

getroot commented Sep 28, 2024

Could you share your configuration files including Server.xml and xxx.mux files so that I can reproduce the problem.

@maruf-cs
Copy link
Author

maruf-cs commented Sep 29, 2024

Here is the mux file -

<?xml version="1.0"?>
<Multiplex>
        <OutputStream>
                <Name>b28ff6dc02dd4e299f9999b12e979e1f</Name>
        </OutputStream>
        <SourceStreams>
                <SourceStream>
                        <Name>720p</Name>
                        <Url>stream://default/le/b28ff6dc02dd4e299f9999b12e979e1f_720p</Url>
                        <TrackMap>
                                <Track>
                                        <SourceTrackName>aac_64_audio</SourceTrackName>
                                        <NewTrackName>aac_64_audio</NewTrackName>
                                </Track>
                                <Track>
                                        <SourceTrackName>bypass_video</SourceTrackName>
                                        <NewTrackName>bypass_video</NewTrackName>
                                </Track>
                        </TrackMap>
                </SourceStream>
                <SourceStream>
                        <Name>480p</Name>
                        <Url>stream://default/le/b28ff6dc02dd4e299f9999b12e979e1f_480p</Url>
                        <TrackMap>
                                <Track>
                                        <SourceTrackName>aac_32_audio</SourceTrackName>
                                        <NewTrackName>aac_32_audio</NewTrackName>
                                </Track>
                                <Track>
                                        <SourceTrackName>bypass_video</SourceTrackName>
                                        <NewTrackName>video_480</NewTrackName>
                                </Track>
                        </TrackMap>
                </SourceStream>
                <SourceStream>
                        <Name>360p</Name>
                        <Url>stream://default/le/b28ff6dc02dd4e299f9999b12e979e1f_360p</Url>
                        <TrackMap>
                                <Track>
                                        <SourceTrackName>aac_20_audio</SourceTrackName>
                                        <NewTrackName>aac_20_audio</NewTrackName>
                                </Track>
                                <Track>
                                        <SourceTrackName>bypass_video</SourceTrackName>
                                        <NewTrackName>video_360</NewTrackName>
                                </Track>
                        </TrackMap>
                </SourceStream>
        </SourceStreams>
        <Playlists>
                <Playlist>
                        <Name>playlist</Name>
                        <FileName>playlist</FileName>
                        <Options />
                        <Rendition>
                                <Name>720p</Name>
                                <Video>bypass_video</Video>
                                <Audio>aac_64_audio</Audio>
                        </Rendition>
                        <Rendition>
                                <Name>480p</Name>
                                <Video>video_480</Video>
                                <Audio>aac_32_audio</Audio>
                        </Rendition>
                        <Rendition>
                                <Name>360p</Name>
                                <Video>video_360</Video>
                                <Audio>aac_20_audio</Audio>
                        </Rendition>
                </Playlist>
                <Playlist>
                        <Name>playlist_ios</Name>
                        <FileName>playlist_ios</FileName>
                        <Options />
                        <Rendition>
                                <Name>360p</Name>
                                <Video>video_360</Video>
                                <Audio>aac_20_audio</Audio>
                        </Rendition>
                        <Rendition>
                                <Name>480p</Name>
                                <Video>video_480</Video>
                                <Audio>aac_32_audio</Audio>
                        </Rendition>
                        <Rendition>
                                <Name>720p</Name>
                                <Video>bypass_video</Video>
                                <Audio>aac_64_audio</Audio>
                        </Rendition>
                </Playlist>
        </Playlists>
</Multiplex>

@maruf-cs
Copy link
Author

Here is the config, but sensitive informations has been replaced

<?xml version="1.0" encoding="UTF-8"?>
<Server version="8">
        <Name>OvenMediaEngine</Name>
        <!-- Host type (origin/edge) -->
        <Type>origin</Type>
        <!-- Specify IP address to bind ("*" means all IPv4 IPs, "::" means all IPv6 IPs) -->
        <!-- Uncomment the line below to enable IPv6 -->
        <!-- <IP>::</IP> -->
        <IP>*</IP>
        <PrivacyProtection>false</PrivacyProtection>
        <!-- 
        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.ovenmediaengine.com:13478</StunServer>
  -->
        <StunServer>stun.ovenmediaengine.com:13478</StunServer>
        <Modules>
                <!-- 
                Currently OME only supports h2 like all browsers do. Therefore, HTTP/2 only works on TLS ports.
                -->
                <HTTP2>
                        <Enable>true</Enable>
                </HTTP2>
                <LLHLS>
                        <Enable>true</Enable>
                </LLHLS>
                <!-- P2P works only in WebRTC and is experiment feature -->
                <P2P>
                        <!-- disabled by default -->
                        <Enable>false</Enable>
                        <MaxClientPeersPerHostPeer>2</MaxClientPeersPerHostPeer>
                </P2P>
        </Modules>
        <!-- Settings for the ports to bind -->
        <Bind>
                <!-- Enable this configuration if you want to use API Server -->
                <!--
                <Managers>
                        <API>
                                <Port>8081</Port>
                                <TLSPort>8082</TLSPort>
                                <WorkerCount>1</WorkerCount>
                        </API>
                </Managers>
                -->
                <Managers>
                        <API>
                                <Port>8081</Port>
                                <TLSPort>8082</TLSPort>
                                <WorkerCount>1</WorkerCount>
                        </API>
                </Managers>
                <Providers>
                        <OVT>
                                <WorkerCount>1</WorkerCount>
                        </OVT>
                        <!-- Push providers -->
                        <RTMP>
                                <Port>1935</Port>
                                <WorkerCount>1</WorkerCount>
                        </RTMP>
                        <SRT>
                                <Port>9999</Port>
                                <WorkerCount>1</WorkerCount>
                        </SRT>
                </Providers>
                <Publishers>
                        <OVT>
                                <Port>9000</Port>
                                <WorkerCount>2</WorkerCount>
                        </OVT>
                        <LLHLS>
                                <!-- 
                                OME only supports h2, so LLHLS works over HTTP/1.1 on non-TLS ports. 
                                LLHLS works with higher performance over HTTP/2, 
                                so it is recommended to use a TLS port.
                                -->
                                <!-- <Port>3333</Port> -->
                                <!-- If you want to use TLS, specify the TLS port -->
                                <!-- <TLSPort>3334</TLSPort> -->
                                <!-- <WorkerCount>1</WorkerCount> -->
                                <Port>80</Port>
                                <TLSPort>443</TLSPort>
                        </LLHLS>
                </Publishers>
        </Bind>
        <!--
                Enable this configuration if you want to use API Server

                <AccessToken> is a token for authentication, and when you invoke the API, you must put "Basic base64encode(<AccessToken>)" in the "Authorization" header of HTTP request.
                For example, if you set <AccessToken> to "ome-access-token", you must set "Basic asdf==" in the "Authorization" header.
        -->
        <Managers>
                <Host>
                        <Names>
                                <Name>*</Name>
                        </Names>
                        <TLS>
                                <CertPath>/usr/share/ovenmediaengine/certs/team.pem</CertPath>
                                <KeyPath>/usr/share/ovenmediaengine/certs/team.key.pem</KeyPath>
                                <ChainCertPath>/usr/share/ovenmediaengine/certs/team.fullchain.pem</ChainCertPath>
                        </TLS>
                </Host>
                <API>
                        <AccessToken>test</AccessToken>
                        <CrossDomains>
                                <Url>*.airensoft.com</Url>
                                <Url>http://*.sub-domain.airensoft.com</Url>
                                <Url>http?://airensoft.*</Url>
                        </CrossDomains>
                </API>
        </Managers>
        <VirtualHosts>
                <!-- You can use wildcard like this to include multiple XMLs -->
                <VirtualHost include="VHost*.xml"/>
                <VirtualHost>
                        <Name>default</Name>
                        <!--Distribution is a value that can be used when grouping the same vhost distributed across multiple servers. This value is output to the events log, so you can use it to aggregate statistics. -->
                        <Distribution>ovenmediaengine.com</Distribution>
                        <!-- 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>/usr/share/ovenmediaengine/certs/team.pem</CertPath>
									<KeyPath>/usr/share/ovenmediaengine/certs/team.key.pem</KeyPath>
									<ChainCertPath>/usr/share/ovenmediaengine/certs/team.fullchain.pem</ChainCertPath>
								</TLS>
                        </Host>
                        <SignedPolicy>
                                <PolicyQueryKeyName>policy</PolicyQueryKeyName>
                                <SignatureQueryKeyName>signature</SignatureQueryKeyName>
                                <SecretKey>test</SecretKey>
                                <Enables>
                                        <Providers>rtmp,webrtc,srt</Providers>
                                        <!--<Publishers>webrtc,hls,llhls,dash,lldash</Publishers>-->
                                </Enables>
                        </SignedPolicy>
                        <OriginMapStore>
                                <RedisServer><Host>mydomain:6379</Host></RedisServer>
                                <OriginHostName>mydomain</OriginHostName>
                        </OriginMapStore>
                        <!-- Settings for applications -->
                        <Applications>
                                <Application>
                                        <Name>app</Name>
                                        <!-- Application type (live/vod) -->
                                        <Type>live</Type>
                                        <OutputProfiles>
                                                <!-- Enable this configuration if you want to hardware acceleration using GPU -->
                                                <HardwareAcceleration>false</HardwareAcceleration>
                                                <OutputProfile>
                                                        <Name>bypass_stream</Name>
                                                        <OutputStreamName>${OriginStreamName}</OutputStreamName>
                                                        <Playlist>
                                                                <Name>ios</Name>
                                                                <FileName>playlist_ios</FileName>
                                                                <Options>
                                                                        <WebRtcAutoAbr>true</WebRtcAutoAbr>
                                                                </Options>
                                                                <Rendition>
                                                                        <Name>240p</Name>
                                                                        <Video>video_240</Video>
                                                                        <Audio>aac_64_audio</Audio>
                                                                </Rendition>
                                                                <Rendition>
                                                                        <Name>360p</Name>
                                                                        <Video>video_360</Video>
                                                                        <Audio>aac_64_audio</Audio>
                                                                </Rendition>
                                                                <Rendition>
                                                                        <Name>bypass</Name>
                                                                        <Video>bypass_video</Video>
                                                                        <Audio>aac_64_audio</Audio>
                                                                </Rendition>
                                                        </Playlist>
                                                        <Playlist>
                                                                <Name>global</Name>
                                                                <FileName>playlist</FileName>
                                                                <Rendition>
                                                                        <Name>bypass</Name>
                                                                        <Video>bypass_video</Video>
                                                                        <Audio>aac_64_audio</Audio>
                                                                </Rendition>

                                                                <Rendition>
                                                                        <Name>360p</Name>
                                                                        <Video>video_360</Video>
                                                                        <Audio>aac_64_audio</Audio>
                                                                </Rendition>
                                                                <Rendition>
                                                                        <Name>240p</Name>
                                                                        <Video>video_240</Video>
                                                                        <Audio>aac_64_audio</Audio>
                                                                </Rendition>
                                                        </Playlist>
                                                        <Encodes>
                                                                <Video>
                                                                        <Name>bypass_video</Name>
                                                                        <Bypass>true</Bypass>
                                                                </Video>
                                                                <Video>
                                                                        <Name>video_1080</Name>
                                                                        <Codec>h264</Codec>
                                                                        <Bitrate>512000</Bitrate>
                                                                        <Width>1920</Width>
                                                                        <Height>1080</Height>
                                                                        <Framerate>30</Framerate>
                                                                        <Preset>slower</Preset>
                                                                </Video>
                                                                <Video>
                                                                        <Name>video_720</Name>
                                                                        <Codec>h264</Codec>
                                                                        <Bitrate>512000</Bitrate>
                                                                        <Width>1280</Width>
                                                                        <Height>720</Height>
                                                                        <Framerate>30</Framerate>
                                                                        <Preset>slower</Preset>
                                                                </Video>
                                                                <Video>
                                                                        <Name>video_480</Name>
                                                                        <Codec>h264</Codec>
                                                                        <Bitrate>300000</Bitrate>
                                                                        <Width>854</Width>
                                                                        <Height>480</Height>
                                                                        <Framerate>25</Framerate>
                                                                        <Preset>slower</Preset>
                                                                </Video>
                                                                <Video>
                                                                        <Name>video_360</Name>
                                                                        <Codec>h264</Codec>
                                                                        <Bitrate>200000</Bitrate>
                                                                        <Width>640</Width>
                                                                        <Height>360</Height>
                                                                        <Framerate>25</Framerate>
                                                                        <Preset>slower</Preset>
                                                                </Video>
                                                                <Video>
                                                                        <Name>video_240</Name>
                                                                        <Codec>h264</Codec>
                                                                        <Bitrate>128000</Bitrate>
                                                                        <Width>426</Width>
                                                                        <Height>240</Height>
                                                                        <Framerate>20</Framerate>
                                                                        <Preset>slower</Preset>
                                                                </Video>
                                                                <Audio>
                                                                        <Name>bypass_audio</Name>
                                                                        <Bypass>true</Bypass>
                                                                </Audio>
                                                                <Audio>
                                                                        <Name>aac_64_audio</Name>
                                                                        <Codec>aac</Codec>
                                                                        <Bitrate>64000</Bitrate>
                                                                        <Samplerate>44100</Samplerate>
                                                                        <Channel>2</Channel>
                                                                </Audio>
                                                                <Audio>
                                                                        <Name>aac_32_audio</Name>
                                                                        <Codec>aac</Codec>
                                                                        <Bitrate>32000</Bitrate>
                                                                        <Samplerate>22050</Samplerate>
                                                                        <Channel>2</Channel>
                                                                </Audio>
                                                                <Audio>
                                                                        <Name>aac_20_audio</Name>
                                                                        <Codec>aac</Codec>
                                                                        <Bitrate>20000</Bitrate>
                                                                        <Samplerate>16000</Samplerate>
                                                                        <Channel>2</Channel>
                                                                </Audio>
                                                        </Encodes>
                                                </OutputProfile>
                                        </OutputProfiles>
                                        <Providers>
                                                <OVT/>
                                                <RTMP/>
                                                <SRT/>
                                                <Multiplex>
                                                        <MuxFilesDir>.</MuxFilesDir>
                                                </Multiplex>
                                        </Providers>
                                        <Publishers>
                                                <AppWorkerCount>6</AppWorkerCount>
                                                <StreamWorkerCount>2</StreamWorkerCount>
                                                <OVT/>
                                                <LLHLS>
                                                        <ChunkDuration>0.5</ChunkDuration>
                                                        <!-- <PartHoldBack> SHOULD be at least three times the <ChunkDuration> -->
                                                        <PartHoldBack>1.5</PartHoldBack>
                                                        <SegmentDuration>4</SegmentDuration>
                                                        <SegmentCount>10</SegmentCount>
                                                        <DVR>
                                                                <Enable>false</Enable>
                                                                <TempStoragePath>/mnt/ome-storage/dvr</TempStoragePath>
                                                                <MaxDuration>3600</MaxDuration>
                                                        </DVR>
                                                        <CrossDomains>
                                                                <Url>*</Url>
                                                        </CrossDomains>
                                                </LLHLS>
                                                <FILE>
                                                        <RootPath>/mnt/ome-storage/recordings</RootPath>
                                                        <FilePath>/${StreamName}/${Id}_${StartTime:YYYYMMDDhhmmss}.mp4</FilePath>
                                                        <InfoPath>/${StreamName}_Info/${Id}_${StartTime:YYYYMMDDhhmmss}.xml</InfoPath>
                                                </FILE>
                                        </Publishers>
                                </Application>
                                <Application>
                                        <Name>se</Name>
                                        <!-- Application type (live/vod) -->
                                        <Type>live</Type>
                                        <OutputProfiles>
                                                <!-- Enable this configuration if you want to hardware acceleration using GPU -->
                                                <HardwareAcceleration>false</HardwareAcceleration>
                                                <OutputProfile>
                                                        <Name>bypass_stream</Name>
                                                        <OutputStreamName>${OriginStreamName}</OutputStreamName>
                                                        <Playlist>
                                                                <Name>ios</Name>
                                                                <FileName>playlist_ios</FileName>
                                                                <Options>
                                                                        <WebRtcAutoAbr>true</WebRtcAutoAbr>
                                                                </Options>
                                                                <Rendition>
                                                                        <Name>240p</Name>
                                                                        <Video>video_240</Video>
                                                                        <Audio>aac_64_audio</Audio>
                                                                </Rendition>
                                                                <Rendition>
                                                                        <Name>360p</Name>
                                                                        <Video>video_360</Video>
                                                                        <Audio>aac_64_audio</Audio>
                                                                </Rendition>
                                                                <Rendition>
                                                                        <Name>bypass</Name>
                                                                        <Video>bypass_video</Video>
                                                                        <Audio>aac_64_audio</Audio>
                                                                </Rendition>
                                                        </Playlist>
                                                        <Playlist>
                                                                <Name>global</Name>
                                                                <FileName>playlist</FileName>
                                                                <Rendition>
                                                                        <Name>bypass</Name>
                                                                        <Video>bypass_video</Video>
                                                                        <Audio>aac_64_audio</Audio>
                                                                </Rendition>
                                                                <Rendition>
                                                                        <Name>360p</Name>
                                                                        <Video>video_360</Video>
                                                                        <Audio>aac_64_audio</Audio>
                                                                </Rendition>
                                                                <Rendition>
                                                                        <Name>240p</Name>
                                                                        <Video>video_240</Video>
                                                                        <Audio>aac_64_audio</Audio>
                                                                </Rendition>
                                                        </Playlist>
                                                        <Encodes>
                                                                <Video>
                                                                        <Name>bypass_video</Name>
                                                                        <Bypass>true</Bypass>
                                                                </Video>
                                                                <Video>
                                                                        <Name>video_360</Name>
                                                                        <Codec>h264</Codec>
                                                                        <Bitrate>200000</Bitrate>
                                                                        <Width>640</Width>
                                                                        <Height>360</Height>
                                                                        <Framerate>25</Framerate>
                                                                        <Preset>slower</Preset>
                                                                </Video>
                                                                <Video>
                                                                        <Name>video_240</Name>
                                                                        <Codec>h264</Codec>
                                                                        <Bitrate>128000</Bitrate>
                                                                        <Width>426</Width>
                                                                        <Height>240</Height>
                                                                        <Framerate>20</Framerate>
                                                                        <Preset>slower</Preset>
                                                                </Video>
                                                                <Audio>
                                                                        <Name>bypass_audio</Name>
                                                                        <Bypass>true</Bypass>
                                                                </Audio>
                                                                <Audio>
                                                                        <Name>aac_64_audio</Name>
                                                                        <Codec>aac</Codec>
                                                                        <Bitrate>64000</Bitrate>
                                                                        <Samplerate>44100</Samplerate>
                                                                        <Channel>2</Channel>
                                                                </Audio>
                                                                <Audio>
                                                                        <Name>aac_32_audio</Name>
                                                                        <Codec>aac</Codec>
                                                                        <Bitrate>32000</Bitrate>
                                                                        <Samplerate>22050</Samplerate>
                                                                        <Channel>2</Channel>
                                                                </Audio>
                                                                <Audio>
                                                                        <Name>aac_20_audio</Name>
                                                                        <Codec>aac</Codec>
                                                                        <Bitrate>20000</Bitrate>
                                                                        <Samplerate>16000</Samplerate>
                                                                        <Channel>2</Channel>
                                                                </Audio>
                                                        </Encodes>
                                                </OutputProfile>
                                        </OutputProfiles>
                                        <Providers>
                                                <OVT/>
                                                <RTMP/>
                                                <SRT/>
                                                <Multiplex>
                                                        <MuxFilesDir>.</MuxFilesDir>
                                                </Multiplex>
                                        </Providers>
                                        <Publishers>
                                                <AppWorkerCount>6</AppWorkerCount>
                                                <StreamWorkerCount>2</StreamWorkerCount>
                                                <OVT/>
                                                <LLHLS>
                                                        <ChunkDuration>0.5</ChunkDuration>
                                                        <!-- <PartHoldBack> SHOULD be at least three times the <ChunkDuration> -->
                                                        <PartHoldBack>1.5</PartHoldBack>
                                                        <SegmentDuration>4</SegmentDuration>
                                                        <SegmentCount>10</SegmentCount>
                                                        <DVR>
                                                                <Enable>false</Enable>
                                                                <TempStoragePath>/mnt/ome-storage/dvr</TempStoragePath>
                                                                <MaxDuration>3600</MaxDuration>
                                                        </DVR>
                                                        <CrossDomains>
                                                                <Url>*</Url>
                                                        </CrossDomains>
                                                </LLHLS>
                                                <FILE>
                                                        <RootPath>/mnt/ome-storage/recordings</RootPath>
                                                        <FilePath>/${StreamName}/${Id}_${StartTime:YYYYMMDDhhmmss}.mp4</FilePath>
                                                        <InfoPath>/${StreamName}_Info/${Id}_${StartTime:YYYYMMDDhhmmss}.xml</InfoPath>
                                                </FILE>
                                        </Publishers>
                                </Application>
                                <Application>
                                        <Name>le</Name>
                                        <!-- Application type (live/vod) -->
                                        <Type>live</Type>
                                        <OutputProfiles>
                                                <!-- Enable this configuration if you want to hardware acceleration using GPU -->
                                                <HardwareAcceleration>false</HardwareAcceleration>
                                                <OutputProfile>
                                                        <Name>bypass_stream</Name>
                                                        <OutputStreamName>${OriginStreamName}</OutputStreamName>
                                                        <Playlist>
                                                                <Name>global</Name>
                                                                <FileName>playlist</FileName>
                                                                <Rendition>
                                                                        <Name>bypass</Name>
                                                                        <Video>bypass_video</Video>
                                                                        <Audio>aac_64_audio</Audio>
                                                                </Rendition>
                                                        </Playlist>
                                                        <Encodes>
                                                                <Video>
                                                                        <Name>bypass_video</Name>
                                                                        <Bypass>true</Bypass>
                                                                </Video>
                                                                <Audio>
                                                                        <Name>aac_64_audio</Name>
                                                                        <Codec>aac</Codec>
                                                                        <Bitrate>64000</Bitrate>
                                                                        <Samplerate>44100</Samplerate>
                                                                        <Channel>2</Channel>
                                                                </Audio>
                                                                <Audio>
                                                                        <Name>aac_20_audio</Name>
                                                                        <Codec>aac</Codec>
                                                                        <Bitrate>20000</Bitrate>
                                                                        <Samplerate>16000</Samplerate>
                                                                        <Channel>2</Channel>
                                                                </Audio>
                                                                <Audio>
                                                                        <Name>aac_32_audio</Name>
                                                                        <Codec>aac</Codec>
                                                                        <Bitrate>32000</Bitrate>
                                                                        <Samplerate>22050</Samplerate>
                                                                        <Channel>2</Channel>
                                                                </Audio>
                                                        </Encodes>
                                                </OutputProfile>
                                        </OutputProfiles>
                                        <Providers>
                                                <OVT/>
                                                <RTMP/>
                                                <SRT/>
                                                <Multiplex>
                                                        <MuxFilesDir>.</MuxFilesDir>
                                                </Multiplex>
                                        </Providers>
                                        <Publishers>
                                                <AppWorkerCount>6</AppWorkerCount>
                                                <StreamWorkerCount>2</StreamWorkerCount>
                                                <OVT/>
                                                <LLHLS>
                                                        <ChunkDuration>0.5</ChunkDuration>
                                                        <!-- <PartHoldBack> SHOULD be at least three times the <ChunkDuration> -->
                                                        <PartHoldBack>1.5</PartHoldBack>
                                                        <SegmentDuration>4</SegmentDuration>
                                                        <SegmentCount>10</SegmentCount>
                                                        <DVR>
                                                                <Enable>false</Enable>
                                                                <TempStoragePath>/mnt/ome-storage/dvr</TempStoragePath>
                                                                <MaxDuration>3600</MaxDuration>
                                                        </DVR>
                                                        <CrossDomains>
                                                                <Url>*</Url>
                                                        </CrossDomains>
                                                </LLHLS>
                                                <FILE>
                                                        <RootPath>/mnt/ome-storage/recordings</RootPath>
                                                        <FilePath>/${StreamName}/${Id}_${StartTime:YYYYMMDDhhmmss}.mp4</FilePath>
                                                        <InfoPath>/${StreamName}_Info/${Id}_${StartTime:YYYYMMDDhhmmss}.xml</InfoPath>
                                                </FILE>
                                        </Publishers>
                                </Application>
                        </Applications>
                </VirtualHost>
        </VirtualHosts>
</Server>

@getroot
Copy link
Member

getroot commented Oct 2, 2024

All mux providers in your app are looking at the same .mux path.

<Multiplex>
    <MuxFilesDir>.</MuxFilesDir>
</Multiplex>

So when you create a mux channel in a particular app, other apps will see that .mux file and create the same channel in their own apps.

Try creating different MuxFilesDirs for all apps.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Confirmed as bug patched Patch applied
Projects
None yet
Development

No branches or pull requests

3 participants