Force vp9 encoder (Very good)

This commit is contained in:
bingus_violet 2024-09-15 02:03:26 -05:00
parent ab9ef8f46e
commit ceb9403b32

View file

@ -43,7 +43,7 @@ expressManager.app.get("/download", async (req, res) => {
while (videoFormat == undefined) {
for (let i = 0; i < info.formats.length; i++) {
const format = info.formats[i];
if (format.hasVideo && !format.hasAudio && format.height && format.height.toString() == qualityLabel.toString()) {
if (format.hasVideo && !format.hasAudio && format.height && format.height.toString() == qualityLabel.toString() && (format.videoCodec.includes("vp9") || format.codecs.includes("vp9"))) {
videoFormat = format
continue
}