fix(server): select main stream according to bitrate (#18375)

* fix main stream

* update unit tests

---------

Co-authored-by: mertalev <101130780+mertalev@users.noreply.github.com>
This commit is contained in:
Daimolean
2025-05-20 05:33:28 +08:00
committed by GitHub
parent 00a77c2d6a
commit dc8962f2bc
5 changed files with 58 additions and 19 deletions

View File

@@ -209,7 +209,7 @@ export class MediaRepository {
index: stream.index,
codecType: stream.codec_type,
codecName: stream.codec_name,
frameCount: this.parseInt(options?.countFrames ? stream.nb_read_packets : stream.nb_frames),
bitrate: this.parseInt(stream.bit_rate),
})),
};
}