Add InputTrack.number

This commit is contained in:
Vanilagy
2026-01-22 09:18:43 +01:00
parent e1e32c9505
commit e20f779ede
14 changed files with 118 additions and 13 deletions
+6 -4
View File
@@ -556,14 +556,16 @@ const output = new Output(...);
const conversion = await Conversion.init({
input,
output,
video: {
video: track => ({
width: 480,
bitrate: QUALITY_LOW,
},
audio: {
discard: track.number > 1, // Keep only the first video track
}),
audio: track => ({
numberOfChannels: 1,
bitrate: QUALITY_LOW,
},
discard: track.number > 1, // Keep only the first audio track
}),
trim: {
// Let's keep only the first 60 seconds
start: 0,