distubejs / ytdl-core

YouTube video downloader in javascript.
MIT License
286 stars 50 forks source link

only found 1 video with hashAudio true #82

Closed alands-offc closed 3 months ago

alands-offc commented 3 months ago

this us my code:

const videoInfo = await ytdl.getInfo(https://www.youtube.com/watch?v=${videoId}, { agent}); const formats = videoInfo.formats .filter(format => format.hasVideo && format.hasAudio) .map(format => ({ q: format.quality, mime: format.mimeType, codecs: format.codecs, type: format.container, quality: format.qualityLabel, url: format.url })); I only found 1 video with hashAudio true (because if there is no hasAudio the video is without sound)

ybd-project commented 3 months ago

As far as I know, the 720p format with audio has recently disappeared and only the 360p format is available. If you need high quality video and audio, I think the only way is to combine them using ffmpeg or something similar for each.

alands-offc commented 3 months ago

Sejauh pengetahuan saya, format 720p dengan audio baru-baru ini menghilang dan hanya format 360p yang tersedia. Jika Anda membutuhkan video dan audio berkualitas tinggi, menurut saya satu-satunya cara adalah menggabungkannya menggunakan ffmpeg atau yang serupa untuk masing-masing.

seriously there is no other way? even though I need it with ffmpeg it's quite heavy for my application because I have to save the results for video streaming in my application

skick1234 commented 3 months ago

It is how youtube encode their videos