Black screen broadcasting to AWS Media Live

Hello, i have implemented an application using openvidu pro and am using the rtmp broadcast module, i can stream fine to twitch or amazon ivs but when streaming to a media live channel i am only getting a black screen. Anyone have ideas or tips? Thank you.

The channel configuration is as follows:

{
  "inputAttachments": [
    {
      "inputId": "92084",
      "inputAttachmentName": "teste-opv-1",
      "inputSettings": {
        "sourceEndBehavior": "CONTINUE",
        "inputFilter": "AUTO",
        "filterStrength": 1,
        "deblockFilter": "DISABLED",
        "denoiseFilter": "DISABLED",
        "smpte2038DataPreference": "IGNORE",
        "audioSelectors": [],
        "captionSelectors": []
      }
    }
  ],
  "state": "IDLE",
  "pipelinesRunningCount": 0,
  "destinations": [
    {
      "id": "kvd3bh",
      "settings": [],
      "mediaPackageSettings": [
        {
          "channelId": "teste-opv-1"
        }
      ]
    }
  ],
  "egressEndpoints": [
    {
      "sourceIp": ""
    }
  ],
  "encoderSettings": {
    "audioDescriptions": [
      {
        "audioSelectorName": "Default",
        "codecSettings": {
          "aacSettings": {
            "inputType": "NORMAL",
            "bitrate": 192000,
            "codingMode": "CODING_MODE_2_0",
            "rawFormat": "NONE",
            "spec": "MPEG4",
            "profile": "LC",
            "rateControlMode": "CBR",
            "sampleRate": 48000
          }
        },
        "audioTypeControl": "FOLLOW_INPUT",
        "languageCodeControl": "FOLLOW_INPUT",
        "name": "audio_2"
      }
    ],
    "captionDescriptions": [],
    "outputGroups": [
      {
        "outputGroupSettings": {
          "mediaPackageGroupSettings": {
            "destination": {
              "destinationRefId": "kvd3bh"
            }
          }
        },
        "name": "HD",
        "outputs": [
          {
            "outputSettings": {
              "mediaPackageOutputSettings": {}
            },
            "outputName": "720p30",
            "videoDescriptionName": "video_720p30",
            "audioDescriptionNames": [
              "audio_2"
            ],
            "captionDescriptionNames": []
          }
        ]
      }
    ],
    "timecodeConfig": {
      "source": "EMBEDDED"
    },
    "videoDescriptions": [
      {
        "codecSettings": {
          "h264Settings": {
            "afdSignaling": "NONE",
            "colorMetadata": "INSERT",
            "adaptiveQuantization": "HIGH",
            "bitrate": 3000000,
            "entropyEncoding": "CABAC",
            "flickerAq": "ENABLED",
            "forceFieldPictures": "DISABLED",
            "framerateControl": "SPECIFIED",
            "framerateNumerator": 30,
            "framerateDenominator": 1,
            "gopBReference": "ENABLED",
            "gopClosedCadence": 1,
            "gopNumBFrames": 3,
            "gopSize": 60,
            "gopSizeUnits": "FRAMES",
            "subgopLength": "FIXED",
            "scanType": "PROGRESSIVE",
            "level": "H264_LEVEL_AUTO",
            "lookAheadRateControl": "HIGH",
            "numRefFrames": 3,
            "parControl": "SPECIFIED",
            "profile": "HIGH",
            "rateControlMode": "CBR",
            "syntax": "DEFAULT",
            "sceneChangeDetect": "ENABLED",
            "slices": 1,
            "spatialAq": "ENABLED",
            "temporalAq": "ENABLED",
            "timecodeInsertion": "DISABLED"
          }
        },
        "height": 720,
        "name": "video_720p30",
        "respondToAfd": "NONE",
        "sharpness": 100,
        "scalingBehavior": "DEFAULT",
        "width": 1280
      }
    ]
  },
  "inputSpecification": {
    "codec": "AVC",
    "resolution": "HD",
    "maximumBitrate": "MAX_20_MBPS"
  },
  "logLevel": "DISABLED",
  "tags": {},
  "channelClass": "SINGLE_PIPELINE",
  "pipelineDetails": [],
  "maintenanceWindow": "TUESDAY_1800",
  "maintenanceStatus": "",
  "maintenance": {
    "maintenanceDay": "TUESDAY",
    "maintenanceStartTime": "18:00"
  }
}

Hello @EvandroDC,

OpenVidu PRO uses ffmpeg internally con broadcast to an RTMP server.

AWS has a post series to help users to configure AWS Media Services to receive media from an ffmpeg command: Connecting FFmpeg Using RTP to AWS Media Services in the Cloud | AWS Media Blog

Can you check this series of posts to see if you have to configure AWS Media Services in some specific way?

We will take a look ourselves in the following days.

Best regards

Thank you for your answer @micael.gallego, is there a way to see all the configurations that are used when ffmpeg is transcoding from webrtc to the rtmp signal and if needed alter them?

The updated case that i am experiencing is that when i configure a media live channel to do an rtmp push to twitch and to elemental media package, i have two cases in this scenario.

  1. When i start the stream with the start broadcast http request in openvidu the stream won`t start in twitch or the media package
  2. If i start the stream using OBS and at some time close OBS and start streaming with the start broadcast http request i get sound but the image gets a replicated from the last image i sent using OBS and some pixelation starts to appear.

Again thank you for your time and tell me if i can provide any information that could help to determine the cause of this.

Update: When using the x11grab the video don`t seem to get decoded properly on the Elemental Media Live, if using the following command the video gets streamed correctly, is there an alternative to the x11grab and is possible to customize the ffmpeg command?

ffmpeg ./azion.mkv -y -progress pipe:1 -f alsa -i pulse -f v4l2 -i "/dev/video0" -draw_mouse 0 -framerate 25 -video_size 1280x720 -c:a aac -c:v libx264 -preset ultrafast -tune zerolatency -copyts -f flv rtmp://rmtp_url

Again thank you for your time.

@EvandroDC

1 Like

@EvandroDC Maybe version 2.27.0 fix your problem.

Check release notes: OpenVidu 2.27.0. NEW FEATURES | by OpenVidu | May, 2023 | Medium

1 Like