Code Monkey home page Code Monkey logo

Comments (6)

jgraup avatar jgraup commented on May 13, 2024 1

The final working template looks closer to this, where [[PLACEHOLDERS]] are replaced, and the template was created from scratch in the web interface.

{
  "JobTemplate": "[[JOB TEMPLATE]]",
  "UserMetadata": {
  },
  "Role": "[[ROLE]]",
  "Settings":{
    "OutputGroups": [
      {
        "CustomName": "Custom File Group Name",
        "Name": "File Group",
        "Outputs": [
        ],
        "OutputGroupSettings": {
          "Type": "FILE_GROUP_SETTINGS",
          "FileGroupSettings": {
            "Destination": "[[DESTINATION]]"
          }
        }
      }
    ],
    "Inputs": [
      {
        "AudioSelectors": {
          "Audio Selector 1": {
            "Offset": 0,
            "DefaultSelection": "DEFAULT",
            "ProgramSelection": 1
          }
        },
        "VideoSelector": {
          "ColorSpace": "FOLLOW"
        },
        "FilterEnable": "AUTO",
        "PsiControl": "USE_PSI",
        "FilterStrength": 0,
        "DeblockFilter": "DISABLED",
        "DenoiseFilter": "DISABLED",
        "TimecodeSource": "EMBEDDED",
        "FileInput": "[[FILE_INPUT]]"
      }
    ]
  }
}

from aws-doc-sdk-examples.

jgraup avatar jgraup commented on May 13, 2024 1

Just to follow up; this is what I use in my lambdas now. If you're working in a single region then it probably makes more sense to configure this early on rather than when you instantiate a new MediaConvert instance.

AWS.config.update({
  mediaconvert: {
    apiVersion: '2017-08-29',
    endpoint: customEndpoint
  }
})

It should be noted that describeEndpoints() is an expensive process, counts against your request per second, and should be avoided when doing batch jobs. The endpoint will be pretty much permanent for each region, so grab it in your console under AWS Elemental MediaConvert > Account and set it in your environmental vars. See the docs.

from aws-doc-sdk-examples.

jschwarzwalder avatar jschwarzwalder commented on May 13, 2024

Does the Code Sample need to be updated?

from aws-doc-sdk-examples.

jgraup avatar jgraup commented on May 13, 2024

@jschwarzwalder - I would say yes.

My code doesn't want to run without OutputGroups specified in Settings as well as a modification to the Inputs to remove SelectorType and Tracks (which cause another error).

Error { BadRequestException: /inputs/0/audioSelectors/Audio Selector 1: Should match all dependencies: See other errors for more details /inputs/0/audioSelectors/Audio Selector 1/languageCode: Unexpected property "languageCode" found /inputs/0/audioSelectors/Audio Selector 1/selectorType: Must be LANGUAGE_CODE
Error { BadRequestException: /inputs/0/audioSelectors/Audio Selector 1: Should match all dependencies: See other errors for more details /inputs/0/audioSelectors/Audio Selector 1/selectorType: Must be TRACK

from aws-doc-sdk-examples.

SaulGarza avatar SaulGarza commented on May 13, 2024

For anyone still coming across this trouble with Media Convert, user @spouzols provided the proper way to handle a createJob() request with his GitHub issue, where he declares the endpoint in the actual class call.

new MediaConvert({ endpoint: [[ENDPOINT]] ]})

Sorry if this is clearly stated elsewhere, but I just spent a few hours trying to get the endpoint working. If not, then I believe the documentation should be changed to reflect this, as its a much prettier and more clear implementation anyways. Especially when using it in the callback of the describeEndpoints() method.

Thanks for keeping my hair intact @spouzols

reference:
aws/aws-sdk-js#2208

from aws-doc-sdk-examples.

paulincai avatar paulincai commented on May 13, 2024

@jgraup pfff... it looks that some of the other params are also mandatory (although they are set in the Job Template) and of course they may change at any time :). AWS is so inconsistent in all these examples. The minimum accepted data for the HLS group is :

"HlsGroupSettings": {
            "Destination":  "[s3://bucket/destination]",
            "MinSegmentLength": Integer,
            "SegmentLength": Integer
          }

from aws-doc-sdk-examples.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.