Hexer10 / youtube_explode_dart

Dart library to interact with many Youtube APIs
https://pub.dev/packages/youtube_explode_dart
BSD 3-Clause "New" or "Revised" License
299 stars 122 forks source link

[BUG] Can't retrieve 720p quality in any video #278

Closed Joseph-Nathan closed 2 months ago

Joseph-Nathan commented 2 months ago

720p quality dropped from 2days .

awnigharbia commented 2 months ago

Me too, I tried all versions.

Any solution?

shijinthottiyil commented 2 months ago

Me too , In a project I'm not using youtube_explode_dart but an underlying package use this (pod_player) now that player can't stream 720p youtube videos

muhamedRadwan commented 2 months ago

any update on this ?

Muhammed-Ramadan512 commented 2 months ago

Me too,

Any solution?

robisaks commented 2 months ago

According to the original repo this is ported from, muxed streams may be going away.

https://github.com/Tyrrrz/YoutubeExplode/issues/797

Hexer10 commented 2 months ago

Hello, unfortunately I have no control on how youtube provides the muxed streams, you should consider to use the video-only streams (which should always have high quality steams) and merge/syncronize it with the audio-only track.

salar-dev commented 2 months ago

Hello, unfortunately I have no control on how youtube provides the muxed streams, you should consider to use the video-only streams (which should always have high quality steams) and merge/syncronize it with the audio-only track.

How We can merge/syncronize with the audio-only track do you have any Do you have any ideas? Because when audio and video are played separately, even if they are at the same time, there is a delay in one of them due to the downloading process sometimes or any other reason.

OmarYehiaDev commented 2 months ago

Hello, unfortunately I have no control on how youtube provides the muxed streams, you should consider to use the video-only streams (which should always have high quality steams) and merge/syncronize it with the audio-only track.

How We can merge/syncronize with the audio-only track do you have any Do you have any ideas? Because when audio and video are played separately, even if they are at the same time, there is a delay in one of them due to the downloading process sometimes or any other reason.

I agree, especially when you're handling lecture videos in an LMS app for example :"(

Hexer10 commented 2 months ago

The process synchronicing the video and audio tracks depends on which library you are using, here is a simple example with media_kit:

              final manifest =
                  await yt.videos.streams.getManifest(videoId);
              final bestVideo = manifest.videoOnly.withHighestBitrate().url;
              final bestAudio = manifest.audioOnly.withHighestBitrate().url;

              controller.player.open(Media(bestVideo.toString())); // Automatically plays
              controller.player
                  .setAudioTrack(AudioTrack.uri(bestAudio.toString()));

If you want to merge the video instead you can use first download separately the video and audio and then use a library like https://pub.dev/packages/ffmpeg_kit_flutter to merge the tracks, for example executing: -i videotrack.mp4 -i audiotrack.mp4 -c copy output.mp4.

I'm closing this since there is nothing I can do to improve the issue since it's caused directly by Youtube.