Share your code. npm Orgs help your team discover, share, and reuse code. Create a free org »

    s3-transcodepublic

    s3-transcode

    AWS transcoder client.

    Installation

    $ npm install s3-transcode
    

    Example

    var Client = require('s3-transcode');
     
    var client = new Client({
      key: "your aws key here",
      secret: "your aws secret here",
      region: "us-west-1"
    });
     
    client.pipelines(function(err, pipelines){
      if (err) throw err;
      console.log(pipelines);
    });

    API

    Client(options)

    Initialize a new Client with the given options:

    • key aws key
    • secret aws secret
    • region aws region

    Client.get(path:String)

    GET path.

    Client.post(path:String, body:Object)

    POST body to path.

    Client.pipelines(fn:Function)

    Get list of pipelines.

    Client.pipeline(id:String, fn:Function)

    Get pipeline id.

    Client.jobs(id:String, fn:Function)

    Get jobs by pipeline id.

    Client.jobsByStatus(fn:Function)

    Get jobs by status, where status is one of:

    • "Submitted"
    • "Progressing"
    • "Completed"
    • "Canceled"
    • "Error"

    Client.job(id:String, fn:Function)

    Get job by id and invoke fn(err, job).

    Client.createJob(job:Object, fn:Function)

    Create job and invoke fn(err, job).

    Example responses

    .createJob()

    { Id: '1368211442908-007920',
      Input:
       { AspectRatio: 'auto',
         Container: 'mov',
         FrameRate: 'auto',
         Interlaced: 'auto',
         Key: 'ibdwc36ngnJ.mov',
         Resolution: 'auto' },
      Output:
       { Key: 'ibdwc36ngnJ.mp4',
         PresetId: '1351620000000-100070',
         Rotate: 'auto',
         Status: 'Submitted',
         StatusDetail: null,
         ThumbnailPattern: 'ibdwc36ngnJ-{count}' },
      PipelineId: '1368117054847-aeb165' }
     

    .job()

    { Job:
       { Id: '1368211442908-007990',
         Input:
          { AspectRatio: 'auto',
            Container: 'mov',
            FrameRate: 'auto',
            Interlaced: 'auto',
            Key: 'ibdwc36ngnJ.mov',
            Resolution: 'auto' },
         Output:
          { Key: 'ibdwc36ngnJ-4.mp4',
            PresetId: '1351620000000-100070',
            Rotate: 'auto',
            Status: 'Error',
            StatusDetail: '3002 bdd0fac5-9318-48b0-8243-d1299dab9748: The specified object could not be saved in the specified bucket because an object by that name already exists: bucket=i.cloudup.com, key=ibdwc36ngnJ-00001.png.',
            ThumbnailPattern: 'ibdwc36ngnJ-{count}' },
         PipelineId: '1368117054847-aeb165' } }

    Links

    • Creating a job

    License

    MIT

    Keywords

    none

    install

    npm i s3-transcode

    Downloadsweekly downloads

    4

    version

    1.0.1

    license

    none

    repository

    githubgithub

    last publish

    collaborators

    • avatar