Closed naticio closed 1 year ago
Hello @naticio, could you please provide us the video you are trying to play?
Thanks!
I'm experiencing the same problem. I'm attaching console log & html object from Extraction.swift:67
Video example: https://www.youtube.com/watch?v=aayzIpzTmn0
applying descrambler
finding initial function name
Failed to decode object from given start point: The data couldn’t be read because it isn’t in the correct format.
pattern (ytplayer\.config\s*=\s*) failed: The operation couldn’t be completed. (YouTubeKit.YouTubeKitError error 1.)
signature found, skip decipher
signature found, skip decipher
signature found, skip decipher
signature found, skip decipher
signature found, skip decipher
signature found, skip decipher
signature found, skip decipher
signature found, skip decipher
signature found, skip decipher
signature found, skip decipher
signature found, skip decipher
signature found, skip decipher
signature found, skip decipher
signature found, skip decipher
Hello @kubacizek,
Unfortunately I'm not able to reproduce. I've tried with the testSampleVideo2
and it works with the id aayzIpzTmn0
.
Could you please provide us your code?
Hello @waliid,
Oh, I can see the problem now. I have this filter in my code
let video = YouTube(videoID: entity.id)
let streams = try await video.streams
let stream = streams.filter { stream in
stream.includesAudioTrack && stream.includesVideoTrack
}.highestResolutionStream()
The problem is that there are no streams which includes both audio and video track. This wasn't the problem before. I tried more videos but the result is always the same. Is this even fixable from your side?
Hi @kubacizek,
Could you please try something like this:
let stream = streams.filter { stream in
stream.includesVideoTrack && stream.subtype == "mp4"
}.highestResolutionStream()
or this:
let stream = streams.filter { stream in
stream.includesAudioTrack
}.highestAudioBitrateStream()
Thanks!
Hi @waliid,
Yes this works. But previously there was a stream that contained both video and audio. Anyway I think that I can merge this two streams into one in the code and achieve the result I need.
Thank you anyway!
it works!, thank you !!
Maybe I',m new but I cannot reproduce the video in my app.....has anybody experienced the same issue?