0

I'm a bit confused. I'm setting up a lambda for transcoding an MP4 into a MPEG-Dash for adaptive steaming.

There are 4 presents for this

MPEG-DASH Video 600 k  1351620000001-500050
MPEG-DASH Video 1200 k 1351620000001-500040
MPEG-DASH Video 2400 k 1351620000001-500030
MPEG-DASH Video 4800 k 1351620000001-500020

I was following this example, where the author appears to create 4 outputs and a playlist via the pipeline.

I'm trying to work out how to set this up in the createJob function.

transcoder.createJob({
     PipelineId: process.env.PIPELINE_ID,
     Input: {
      Key: srcKey,
      FrameRate: 'auto',
      Resolution: 'auto',
      AspectRatio: 'auto',
      Interlaced: 'auto',
      Container: 'auto'
     },
     Output: {
      Key: id + '_4m.mpd',
      ThumbnailPattern: '',
      PresetId: '1351620000001-500020',
      Rotate: 'auto'
     }
    }, function(err, data){
        if(err){
            console.log('Something went wrong:',err)
        }else{
            console.log('Converting is done');
        }
     callback(err, data);
    });
};

Here there is only one output and no playlist.

Can someone explain what I need for adaptive streaming, i.e. I assume all the outputs and the playlist file?

marc_s
  • 732,580
  • 175
  • 1,330
  • 1,459
beek
  • 3,522
  • 8
  • 33
  • 86

1 Answers1

0

This seems to work

Outputs: 
[
    {
        Key: 'dash/' + id + '_audio.fmp4',
        PresetId: '1351620000001-500060',
        SegmentDuration: '3',
        Watermarks: [],
        Composition: [],
    }, 
    {
        Key: 'dash/' + id + '_600k.fmp4',
        PresetId: '1351620000001-500050',
        SegmentDuration: '3',
        Watermarks: [],
        Composition: [],
    }, 
    {
        Key: 'dash/' + id + '_1200k.fmp4',
        PresetId: '1351620000001-500040',
        SegmentDuration: '3',
        Watermarks: [],
        Composition: [],
    }, 
    {
        Key: 'dash/' + id + '_2400k.fmp4',
        PresetId: '1351620000001-500030',
        SegmentDuration: '3',
        Watermarks: [],
        Composition: [],
    }, 
    {
        Key: 'dash/' + id + '_4800k.fmp4',
        PresetId: '1351620000001-500020',
        SegmentDuration: '3',
        Watermarks: [],
        Composition: [],
    }, 
],
Playlists: 
[
    {
        Name: 'dash/' + id,
        Format: 'MPEG-DASH',
        OutputKeys: [
            'dash/' + id + '_audio.fmp4',
            'dash/' + id + '_600k.fmp4',
            'dash/' + id + '_1200k.fmp4',
            'dash/' + id + '_2400k.fmp4',
            'dash/' + id + '_4800k.fmp4'
        ],
    }, 
],
beek
  • 3,522
  • 8
  • 33
  • 86