How do I determine the video file size on youtube in Java?

Posted by user1753343 on Stack Overflow See other posts from Stack Overflow or by user1753343
Published on 2012-11-06T22:32:44Z Indexed on 2012/11/06 23:00 UTC
Read the original article Hit count: 142

Filed under:
|
|
|

I am using the youtube-API to gather different information about videos. The only missing attribute until now is size. The API itself doesn't provide any functionality. I googled, but didn't found any solution.

Indirect way My next idea was to get the path to the video-file itself and make a get-request. In the response-headers I could check for the file size. So I searched for "video / download / youtube / java". Some time ago youtube used get_video_info but this doesn't work today. I also found an application called JavaYoutubeDownloader but it seems VERY complicated for just getting the file size and it doesn't work either (just prints finish, without downloading anything).

So is there a way to get the filesize of a video on youtube by using Java? If not, what would be a practical solution for this problem (a list of video_ids exists)?

© Stack Overflow or respective owner

Related posts about java

Related posts about video