AirenSoft / OvenMediaEngine

OvenMediaEngine (OME) is a Sub-Second Latency Live Streaming Server with Large-Scale and High-Definition. #WebRTC #LLHLS
https://OvenMediaEngine.com/ome
GNU Affero General Public License v3.0
2.48k stars 1.05k forks source link

Multiplexed stream is not present in OriginMapStore Redis db #1577

Open maruf-cs opened 3 months ago

maruf-cs commented 3 months ago

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>
  2. With Encoder OBS Studio 30.0.02 64bit
  3. 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"
        }
      ]
    }
    ]
    }
  4. 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):

Originally posted by @maruf-cs in https://github.com/AirenSoft/OvenMediaEngine/discussions/1489#discussioncomment-8969206

stale[bot] commented 1 month ago

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.