Since upgrading to v0.4 retrieving streams has become very slow.
What used to take a few seconds, now usually takes 20~60 seconds to complete.
From my understanding it seems to be because of descrambling and deciphering the SignatureCipher, especially since there are so many URL streams to decipher.
Is there anyway to speed this process up?
I've tried filtering the streams, but since the filter is applied after the decipher takes place (if I understand everything correctly) it doesn't affect the slow loading.
I'm currently using the following code;
let stream = try await YouTube(videoID: id).streams
.filterVideoAndAudio()
.filter { $0.isNativelyPlayable }
.highestResolutionStream()
If there is any way to speed the extraction of streams up, I would love to know.
Otherwise, maybe it would be possible to implement a feature to only decipher urls from specific chosen iTags?
In my case, I am mostly interested in for example the following iTags : 18, 140, 135, 136, 134, 133, so a way to not even try to decipher other itags would probably speed things up.
Thank you all for a very useful library!
And I apologize if the slow loading is caused by my lack of understanding rather than a problem with the library.
Since upgrading to v0.4 retrieving streams has become very slow.
What used to take a few seconds, now usually takes 20~60 seconds to complete.
From my understanding it seems to be because of descrambling and deciphering the SignatureCipher, especially since there are so many URL streams to decipher.
Is there anyway to speed this process up?
I've tried filtering the streams, but since the filter is applied after the decipher takes place (if I understand everything correctly) it doesn't affect the slow loading.
I'm currently using the following code;
If there is any way to speed the extraction of streams up, I would love to know.
Otherwise, maybe it would be possible to implement a feature to only decipher urls from specific chosen iTags?
In my case, I am mostly interested in for example the following iTags : 18, 140, 135, 136, 134, 133, so a way to not even try to decipher other itags would probably speed things up.
Thank you all for a very useful library!
And I apologize if the slow loading is caused by my lack of understanding rather than a problem with the library.