For compressing video file - how to know if its only a video file OR audio + video file, before compressing

Which product is your request related to?

Encoding - VOD

Description

We are using Bitmovin to compress video files. Bitmovin has different configuration for video files that contain audio and video files without audio. Is there any way in Bitmovin to know if the video has audio /voice attachned to it. Currently we are assuming the video has audio and compress it, if it fails, we compress it by setting configuration as no audio and only video. We are using c# .net core 6.0 to call Bitmovin APIs. It would be great if you can share the link for code sample that showcase how to know if video file has audio or not.
Thanks in advance

I came across a similar issue and decided to use “conditions” to only add the stream if there are audio channels on the input stream.
I’m using the Javascript SDK but I assume it works similarly in C#.

.streams.create(
encoding.id,
{
codecConfigId: encodingPresets.audioCodecConfiguration.id,
inputStreams: [streamInput],
mode: “STANDARD”,
conditions:{
type: “CONDITION”,
attribute: “AUDIOSTREAMCOUNT”,
operator: “>”,
value: 0
}
})

Hi all,

Correct, in order to check input file first and apply a different encoding workflow based on that (eg: workflow 1 for inputs with only video, workflow 2 for inputs with video and audio) you’ll need to leverage Stream Conditions logic: Stream Conditions

As you can see, you can check AUDIOSTREAMCOUNT among other things.

More info here as well: Adapting Automatically to Different Source Files Using Stream Conditions

This topic was automatically closed 60 minutes after the last reply. New replies are no longer allowed.