0xced / XCDYouTubeKit

YouTube video player for iOS, tvOS and macOS
MIT License
2.92k stars 627 forks source link

Wrong download with *.m4a(itag = 140) files. Duration of the download audio twice the one of the youtube video. #325

Closed hodalgun closed 6 years ago

hodalgun commented 7 years ago

For some reason on Youtube, the extract audio will have a duration twice the one on youtube. So for example I download a 3:30 minutes video, the audio will be 7 minutes. Does someone have the same problem? Thanks

patrickjquinn commented 7 years ago

If you can, divide the duration of your track / 2 and display it as such, then have a timer run a scheduled update which checks if progress is duration - 0.5 in order to move to the next track (if you need that functionality). That timer should run every 0.4 seconds and on a GCD thread.

Good luck! (This is all 'what if' stuff, Google dont allow audio extraction / description in their TOS)