in media/transcoder/createJobWithPeriodicImagesSpritesheet.js [35:95]
async function createJobWithPeriodicImagesSpritesheet() {
// Construct request
const request = {
parent: transcoderServiceClient.locationPath(projectId, location),
job: {
inputUri: inputUri,
outputUri: outputUri,
config: {
elementaryStreams: [
{
key: 'video-stream0',
videoStream: {
h264: {
heightPixels: 360,
widthPixels: 640,
bitrateBps: 550000,
frameRate: 60,
},
},
},
{
key: 'audio-stream0',
audioStream: {
codec: 'aac',
bitrateBps: 64000,
},
},
],
muxStreams: [
{
key: 'sd',
container: 'mp4',
elementaryStreams: ['video-stream0', 'audio-stream0'],
},
],
spriteSheets: [
{
filePrefix: 'small-sprite-sheet',
spriteHeightPixels: 32,
spriteWidthPixels: 64,
interval: {
seconds: 7,
},
},
{
filePrefix: 'large-sprite-sheet',
spriteHeightPixels: 72,
spriteWidthPixels: 128,
interval: {
seconds: 7,
},
},
],
},
},
};
// Run request
const [response] = await transcoderServiceClient.createJob(request);
console.log(`Job: ${response.name}`);
}