Switch vp9 to avc

This commit is contained in:
bingus_violet 2024-09-15 14:49:35 -05:00
parent 89fac8e35f
commit 6970f4a718
2 changed files with 3 additions and 2 deletions

View file

@ -43,7 +43,8 @@ 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() && (format.videoCodec.includes("vp9") || format.codecs.includes("vp9"))) {
if (format.hasVideo && !format.hasAudio && format.height && format.height.toString() == qualityLabel.toString() && (format.videoCodec.includes("avc1") || format.codecs.includes("avc1"))) {
// console.log(format.videoCodec)
videoFormat = format
continue
}