Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

methods: [.local] not return url include video and audio #65

Open
hoangnam714 opened this issue Dec 9, 2024 · 5 comments
Open

methods: [.local] not return url include video and audio #65

hoangnam714 opened this issue Dec 9, 2024 · 5 comments

Comments

@hoangnam714
Copy link

I am having a problem when using the local method, the returned result does not have any url containing both video and audio, but the remote method does, but its returned result takes too much time, from 8 -> 10 seconds or even longer, how to optimize this?

@yoondj98
Copy link

It doesn't work in my Test Project Too...!🥲🥲
This is the example video link which couldn't be extracted.

https://youtu.be/ZC0UPvURF9s?si=b_5EbKff0FwvL3H7

@hoangnam714
Copy link
Author

@yoondj98 Currently I am using ytdl to make a server that can get url from youtobe, it takes about 4s for 1 video, you can make your own server, and get meta data like a normal url request. This is my current solution

@alexeichhorn
Copy link
Owner

YouTube is slowly removing the video-audio combinations over time, unfortunately. It depends a bit on the location you are accessing it from, but for example, in my location, almost no video has video-audio streams anymore - neither local nor remote. So, don't rely too much on remote methods being able to get you the stream you want. (And BTW, I'm working on making it faster - it's just a lot of people using it currently, haha.)

@hoangnam714 The problem with your solution is that most often, getting an URL from a different IP than you are playing it from can lead to it being blocked. And also, ytdl has the same problem, that video-audio streams are getting way more rare.

So I'm working on a solution that combines the best video stream with the best audio stream live during playback. If you are interested, check out the branch feature/player-item. Unfortunately, it's still super slow until loaded due to how Apple handles this stream composition. You can check out sample code from here: #54 (comment)

@yoondj98
Copy link

@alexeichhorn
Then how about my case?

I need to get only the 'Audio' of Youtube media.
So, I am getting whole AudioOnly file from your URL.

However, I have encountered the same issue as @hoangnam714 .
Some kinds of Youtube Media's Audio(m4a) couldn't be downloaded.
(like https://youtu.be/ZC0UPvURF9s?si=b_5EbKff0FwvL3H7)

Will finding a solution for this also be quite difficult?

@hoangnam714
Copy link
Author

@alexeichhorn I got the idea from #54 (comment) but it's really slow. It takes almost 10s to get the only video and only audio links, and then another while to merge them together to play.
Before when i used your library, it only took 3s to get the only audio or only video urls, now i can't get any urls

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants