YouTube.js icon indicating copy to clipboard operation
YouTube.js copied to clipboard

no update to video+audio for higher resolution?

Open ryznxx opened this issue 1 year ago • 3 comments

Question

High resolution and audio?

maybe i ask same question but im curious i already read docs


const info = await yt.getBasicInfo('somevideoid');

const url = info.streaming_data?.formats[0].decipher(yt.session.player);
console.info('Playback url:', url);

// or:
const format = info.chooseFormat({ type: 'video+audio', quality: 'best' });
const url = format?.decipher(yt.session.player);
console.info('Playback url:', url);

Other details

No response

Checklist

  • [X] I am running the latest version.
  • [X] I checked the documentation and found no answer.
  • [X] I have searched the existing issues and made sure this is not a duplicate.
  • [X] I have provided sufficient information.

ryznxx avatar Jun 11 '24 08:06 ryznxx

YouTube doesn't provide any streams like that, you will have to download an audio stream and a video stream from the adaptive_formats array and then combine them with a tool like ffmpeg.

absidue avatar Jun 11 '24 11:06 absidue

YouTube doesn't provide any streams like that, you will have to download an audio stream and a video stream from the adaptive_formats array and then combine them with a tool like ffmpeg.

i dont think it works when run it on vercel

ryznxx avatar Jun 12 '24 13:06 ryznxx

O YouTube não fornece nenhum fluxo desse tipo. Você terá que baixar um fluxo de áudio e um fluxo de vídeo do adaptive_formatsarray e então combiná-los com uma ferramenta como o ffmpeg.

não acho que funcione quando executado no vercel

Have you already tried doing this?

gmagreti avatar Jul 09 '24 22:07 gmagreti

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

github-actions[bot] avatar Sep 08 '24 02:09 github-actions[bot]