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

Index out of range when trying to download #17

Closed
nikooo777 opened this issue May 27, 2019 · 9 comments
Closed

Index out of range when trying to download #17

nikooo777 opened this issue May 27, 2019 · 9 comments
Assignees
Labels

Comments

@nikooo777
Copy link

Hello, I am trying to download a video through your library and I'm getting the following:

[niko:~/Downloads] 2s $ youtubedr https://www.youtube.com/watch?v=FHpvI8oGsuQ
2019/05/27 21:28:09 [https://www.youtube.com/watch?v=FHpvI8oGsuQ]
2019/05/27 21:28:09 download to dir= /home/niko/Downloads
2019/05/27 21:28:09 Found video id: 'FHpvI8oGsuQ'
2019/05/27 21:28:09 url: http://youtube.com/get_video_info?video_id=FHpvI8oGsuQ
panic: runtime error: index out of range

goroutine 1 [running]:
github.com/kkdai/youtube.(*Youtube).StartDownload(0xc42001c4e0, 0xc4200d2960, 0x14, 0x7949c0, 0xc42018ebf0)
        /home/niko/go/src/github.com/kkdai/youtube/youtube.go:59 +0x3b6
main.main()
        /home/niko/go/src/github.com/kkdai/youtube/youtubedr/main.go:20 +0x29a

Any clues?

@kkdai kkdai self-assigned this May 28, 2019
@kkdai
Copy link
Owner

kkdai commented May 28, 2019

Did you get the latest version of the code?
This video cannot be downloaded.

@nikooo777
Copy link
Author

yes I used the latest version. It will work fine if you use youtube-dl, I believe working around this issue requires understanding what is going on.

@kkdai
Copy link
Owner

kkdai commented Jun 2, 2019

I could not download video success via youtube-dl

image

@nikooo777
Copy link
Author

I believe you need to install ffmpeg using sudo apt install ffmpeg first, then it works.
https://scrn.storni.info/2019-06-02_19-23-17-706556246.png

@kkdai
Copy link
Owner

kkdai commented Jun 2, 2019

Thank you, I will install ffmpeg and check again.

@kkdai
Copy link
Owner

kkdai commented Aug 3, 2019

Index out of range fixed in 77f6ae3
But because signature change, so currently it block by #18

@kkdai
Copy link
Owner

kkdai commented Aug 5, 2019

Fixed program error by adding more error handle of video info parsing.
705abb9

Next step will add MKV video downloading.

@G-Bruin
Copy link

G-Bruin commented Nov 7, 2019

image
could resolve your problem

@Julian-Chu Julian-Chu mentioned this issue Apr 19, 2020
@kkdai
Copy link
Owner

kkdai commented Apr 20, 2020

Fixed by #27

@kkdai kkdai closed this as completed Apr 20, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants