Stream not starting when sending OpenVidu rtmp to medialive/mediapackage

0

Hello i created a medialive/mediapackage stack using the worflow wizard as an rtmp push to push a stream from an OpenVidu application to the mediapackage channel, but when i start the stream i only get the preview, that one minute video in the mediapackage channel. From the logs of the server is used the following ffmpeg command to send the stream:

{
  "Image": "openvidu/openvidu-recording:2.26.0",
  "name": "broadcast_SessionABC",
  "Env": [
    "DEBUG_MODE=false",
    "CONTAINER_WORKING_MODE=BROADCAST",
    "BROADCAST_URL=MEDIA_LIVE_INPUT_URL",
    "ONLY_VIDEO=false",
    "RESOLUTION=640x360",
    "FRAMERATE=30",
    "BROADCAST_COMMAND=ffmpeg <./stop -y -progress pipe:1 -f alsa -i pulse -f x11grab -draw_mouse 0 -framerate $FRAMERATE -video_size $RESOLUTION -i :$DISPLAY_NUM -c:a aac -c:v libx264 -preset ultrafast -tune zerolatency -copyts -f flv $BROADCAST_URL"
  ],
  "HostConfig": {
    "AutoRemove": false,
    "networkMode": "host",
    "Binds": [
      "/opt/openvidu/recordings/:/recordings"
    ],
    "Ulimits": [
      {
        "Name": "core",
        "Soft": -1,
        "Hard": -1
      }
    ],
    "RestartPolicy": {
      "Name": "no"
    }
  }
}

The channel acts as if the rtmp signal never started, but if i send the same signal to Twitch for example it displays normal.

This are the medialive channel settings:

{
  "name": "teste-opv-2",
  "inputAttachments": [
    {
      "inputId": "3280994",
      "inputAttachmentName": "teste-opv-2",
      "inputSettings": {
        "sourceEndBehavior": "CONTINUE",
        "inputFilter": "AUTO",
        "filterStrength": 1,
        "deblockFilter": "DISABLED",
        "denoiseFilter": "DISABLED",
        "smpte2038DataPreference": "IGNORE",
        "audioSelectors": [],
        "captionSelectors": []
      }
    }
  ],
  "state": "RUNNING",
  "pipelinesRunningCount": 1,
  "destinations": [
    {
      "id": "mediapackage-destination",
      "settings": [],
      "mediaPackageSettings": [
        {
          "channelId": "teste-opv-2"
        }
      ]
    }
  ],
  "egressEndpoints": [
    {
      "sourceIp": "source"
    }
  ],
  "encoderSettings": {
    "audioDescriptions": [
      {
        "codecSettings": {
          "aacSettings": {
            "inputType": "NORMAL",
            "bitrate": 64000,
            "codingMode": "CODING_MODE_2_0",
            "rawFormat": "NONE",
            "spec": "MPEG4",
            "profile": "HEV2",
            "rateControlMode": "CBR",
            "sampleRate": 44100
          }
        },
        "audioTypeControl": "FOLLOW_INPUT",
        "languageCodeControl": "USE_CONFIGURED",
        "languageCode": "pt",
        "name": "audio_2k0ok",
        "streamName": "portuguese"
      }
    ],
    "captionDescriptions": [],
    "outputGroups": [
      {
        "outputGroupSettings": {
          "mediaPackageGroupSettings": {
            "destination": {
              "destinationRefId": "mediapackage-destination"
            }
          }
        },
        "name": "mediapackage",
        "outputs": [
          {
            "outputSettings": {
              "mediaPackageOutputSettings": {}
            },
            "outputName": "emp_360p30",
            "videoDescriptionName": "video_640x360",
            "audioDescriptionNames": [
              "audio_2k0ok"
            ],
            "captionDescriptionNames": []
          }
        ]
      }
    ],
    "timecodeConfig": {
      "source": "EMBEDDED"
    },
    "videoDescriptions": [
      {
        "codecSettings": {
          "h264Settings": {
            "afdSignaling": "NONE",
            "colorMetadata": "INSERT",
            "adaptiveQuantization": "AUTO",
            "bitrate": 600000,
            "bufSize": 750000,
            "bufFillPct": 90,
            "entropyEncoding": "CABAC",
            "flickerAq": "ENABLED",
            "forceFieldPictures": "DISABLED",
            "framerateControl": "SPECIFIED",
            "framerateNumerator": 25,
            "framerateDenominator": 1,
            "gopBReference": "ENABLED",
            "gopClosedCadence": 1,
            "gopNumBFrames": 2,
            "gopSize": 1,
            "gopSizeUnits": "SECONDS",
            "subgopLength": "FIXED",
            "scanType": "PROGRESSIVE",
            "level": "H264_LEVEL_AUTO",
            "lookAheadRateControl": "MEDIUM",
            "maxBitrate": 1500000,
            "numRefFrames": 3,
            "parControl": "SPECIFIED",
            "profile": "HIGH",
            "rateControlMode": "QVBR",
            "qvbrQualityLevel": 7,
            "syntax": "DEFAULT",
            "sceneChangeDetect": "ENABLED",
            "slices": 1,
            "spatialAq": "ENABLED",
            "temporalAq": "ENABLED",
            "timecodeInsertion": "PIC_TIMING_SEI"
          }
        },
        "height": 360,
        "name": "video_640x360",
        "respondToAfd": "NONE",
        "sharpness": 50,
        "scalingBehavior": "STRETCH_TO_OUTPUT",
        "width": 640
      }
    ]
  },
  "inputSpecification": {
    "codec": "AVC",
    "resolution": "HD",
    "maximumBitrate": "MAX_20_MBPS"
  },
  "logLevel": "DISABLED",
  "tags": {
    "MediaLive-Workflow": "teste-opv-2",
    "MSAM-Diagram": "teste-opv-2",
    "aws:cloudformation:stack-name": "teste-opv-2",
    "aws:cloudformation:logical-id": "MediaLiveChannel",
    "MSAM-Tile": "teste-opv-2",
  },
  "channelClass": "SINGLE_PIPELINE",
  "pipelineDetails": [
    {
      "pipelineId": "0",
      "activeInputAttachmentName": "",
      "activeInputSwitchActionName": "",
      "activeMotionGraphicsUri": "",
      "activeMotionGraphicsActionName": ""
    }
  ],
  "maintenanceWindow": "THURSDAY_0700",
  "maintenanceStatus": "",
  "maintenance": {
    "maintenanceDay": "THURSDAY",
    "maintenanceStartTime": "07:00"
  }
}

I would like to know if there are some possible causes to this or if i am configuring the service wrong, thank you.

질문됨 일 년 전292회 조회
1개 답변
0

Once the AWS MediaLive channel has been started, you can view status, Health information and Alerts from the AWS MediaLive channel console. First, confirm that the Pipelines running are green. Next review the Alerts tab to see if there are any indication of input source issues. Then validate in Health tab that the input bitrates are as expected and consistent. Several minutes of running channel will be needed to see proper status.

Once the MediaLive channel is determined to be running properly, you can go to the MediaPackage channel in the AWS Console. Select the endpoint your are looking to use (HLS, DASH, CMAF) and copy the CloudFront URL into a player(s) for viewing the stream. The Preview function in MediaPackage may only run for a short time and you should use another player to view the stream.

AWS
Mike-ME
답변함 일 년 전

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠