Product
Encoding - VOD
Question
I am trying to encode video through Azure blob storage, using the same for input and output.
Bitmovin was able to Create+Queue+Download+Analysis this encoding but failed at the encoding stage.
Below is the code I am using, I am not able to identify the exact error as there is no error description provided on dashboard.
Can you please suggest how I can resolve this issue and if there is any place I can see error logs for error details?
Encoding id: 8654a851-541f-4495-b0e4-232bc9df171a
const encoding = await bitmovinApi.encoding.encodings.create({
name: Encoding for ${cdnUrl}
});
const input = await bitmovinApi.encoding.inputs.azure.create({
name: 'Azure Input',
accountName: azureStorageAccountName,
container: azureContainerName,
accountKey: azureAccessKey,
host: cdnUrl
});
const output = await bitmovinApi.encoding.outputs.azure.create({
name: 'Azure Output',
accountName: azureStorageAccountName,
container: azureContainerName,
accountKey: azureAccessKey
});
// const output = await bitmovinApi.encoding.outputs.azure.get(
// 'ce3182a3-5ba6-4b8a-b7a3-f453097cb01b'
// );
const videoStreamPromises = bitrates.map(async bitrate => {
const videoConfig = await bitmovinApi.encoding.configurations.video.h264.create({
name: `H264 Configuration ${bitrate.name}`,
bitrate: bitrate.videoBitrate,
height: bitrate.height,
rate: 30.0,
profile: 'MAIN'
});
const videoStream = await bitmovinApi.encoding.encodings.streams.create(encoding.id, {
inputStreams: [{
inputId: input.id,
inputPath: cdnUrl,
selectionMode: 'AUTO'
}],
codecConfigId: videoConfig.id,
outputs: [{
outputId: output.id,
outputPath: `${bitrate.name}/video`,
acl: [{ permission: 'PUBLIC_READ' }]
}]
});
console.log(`Video stream created: ${videoStream.id}`);
});
const audioStreamPromises = bitrates.map(async bitrate => {
const audioConfig = await bitmovinApi.encoding.configurations.audio.aac.create({
name: `AAC Configuration ${bitrate.name}`,
bitrate: bitrate.audioBitrate,
rate: 48000
});
const audioStream = await bitmovinApi.encoding.encodings.streams.create(encoding.id, {
inputStreams: [{
inputId: input.id,
inputPath: cdnUrl,
selectionMode: 'AUTO'
}],
codecConfigId: audioConfig.id,
outputs: [{
outputId: output.id,
outputPath: `${bitrate.name}/audio`,
acl: [{ permission: 'PUBLIC_READ' }]
}]
});
console.log(`Audio stream created: ${audioStream.id}`);
});
await Promise.all([...videoStreamPromises, ...audioStreamPromises]);
await bitmovinApi.encoding.encodings.start(encoding.id);
await waitForEncodingToFinish(encoding.id);