Page 1 of 5

YOUTUBE TOP 100 MUSIC VIDEOS WEB RESOURCE

PostPosted: Sun Jun 03, 2012 12:15 am
by jhb50
NOTE: Youtube no longer generates its top100 playlist. Use this playlist link instead.
It has the Current Billboard Top 10 followed by previous top 10's.
http://gdata.youtube.com/feeds/api/play ... 70BA91BD6E

This Top100.groovy "web resource" will generate a folder with the Top 100 YouTube music videos for the current week using the dummy url "http://www.youtubetop100.com", or the daily Top 100 by adding the type option documented below.

The actual number of videos displayed will be limited by the console value "Max number of feed items to retrieve". Subsequent videos may be displayed with additional links by using the parameter ?start=nn

Alternatively with v13, the console value may be overridden by using the parameter for=nn This allows the console value to be set to a small value while allowing up to 100 of the Top100 videos to be displayed, or fewer than the console value to be displayed.

For example if the console value is 20, the url "http://www.youtubetop100.com?start=21" will display videos 21 to 40 and "http://www.youtubetop100.com?for=100" will display all 100 videos and "http://www.youtubetop100.com?start=11&for=15" will display videos 11 through 25.

Since YouTube provides multiple formats and resolutions for each video, the Serviio Console Quality options provide insufficient control. HIGH will display 1920x1080, MEDIUM 854x480 and LOW 400x240. There is no control over the video codecs, consequently Version 1 chose VP8 over h264(avc) which required transcoding to MPEG2VIDEO.

The default codec is h264(avc) (codec=264) however VP8 may be chosen by adding the parameter codec=8 . Similarly specific high and medium resolutions may be chosen which will override the console values by adding the parameter res=xxx where res = 1080 (1920x1080), 720 (1280x720), 480 (854x480), 360 (640x360) or 240 (400x240)

eg: "http://www.youtubetop100.com?start=21&res=720&codec=8"

The type option may be used to alter the Top100 list. Use type=xxxx option where xxxx may be daily or weekly. The default is weekly .
eg: "http://www.youtubetop100.com?type=daily&res=720"

The type option may also be used to get the Top100 list by genre. Use type=nnn where nnn is one of the following numbers specifying the genre. NOTE: The number of available selections may vary from 0 to 100.

474 Alternative, 455 Blues, 471 Comedy/Spoken, 453 Country, 454 Easy Listening, 466 Electronic, 456 Folk, 462 International, 460 Jazz, 476 K-Pop, 465 Latin, 475 Metal, 458 New Age, 472 Pop, 470 R&B, 451 Rap, 461 Reggae, 464 Religious, 473 Rock, 463 Stage & Screen, 459 Vocal

eg: "http://www.youtubetop100.com?type=472&res=720"

The nform=xbox option may be used to pad the title number to 3 digits
for correct ordering on xbox

Version 13: Fixed for changed YouTube format, added the "for" option and rewrote the above instructions.
Version 14: Fixed 'for' parameter error.
Version 15: Weekly listing removed per youtube change
Version 16: Weekly listing restored
Version 17: Support revised YouTube format
Version 18: Correct V17 thumbnail error
Version 19: Remove language dependency
Version 20: Honor YouTube Expiry Date
Version 21: Support revised YouTube format

Re: YOUTUBE TOP 100 VIDEO WEB RESOURCE

PostPosted: Sun Jun 03, 2012 2:47 am
by Xmantium
Hi jhb50, thanks for the plugin, ive not heard of this site, tried going to http://www.youtubetop100.com on my browser and says Not Found -The requested URL / was not found on this server. But the plugin works.

One issue im having, the video is getting transcoded to my Bravia as MPEG2 format and uses alot of my CPU which is leading to choppy buffering for Serviio to catch up. Zips YouTube plugin does not do this as the files are h264 and gets remuxed by Serviio to my Bravia as AVC format. Im not sure what these media are as i cant view this site on any browser.

Re: YOUTUBE TOP 100 VIDEO WEB RESOURCE

PostPosted: Sun Jun 03, 2012 3:33 am
by jhb50
http://www.youtubetop100.com is a dummy URL.
The actual list is at http://www.youtube.com/playlist?list=MCUS.yyyymmdd where yyyymmdd is the date of the last weekly list.

The groovy picks the first format provided by youtube for the requested quality, and in the case of high and medium, the format is VP8 which gets transcoded.

If you want to only use AVC, remove the 40's format from these lines:
String highFormats = "37, 46, 22, 45, 35, 44, 18, 34, 43, 6, 5"
String mediumFormats = "35, 44, 18, 34, 43, 6, 5"

Re: YOUTUBE TOP 100 VIDEO WEB RESOURCE

PostPosted: Sun Jun 03, 2012 3:55 am
by Xmantium
Didnt work. I did change it to
String highFormats = "37, 22, 35, 18, 34, 6, 5"
String mediumFormats = "35, 18, 34, 6, 5"
String lowFormats = "6, 5"

And still the videos are MPEG2 format on my Bravia :?
My Online content quality always set to "high", zips YouTube feeds still show AVC

Re: YOUTUBE TOP 100 VIDEO WEB RESOURCE

PostPosted: Sun Jun 03, 2012 5:18 pm
by jhb50
You must have not saved the changed groovy..here is what I get after removing the 40's with HIGH
  Code:
   Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p, 1920x1080
 5892 kb/s, 23.98 fps, 23.98 tbr, 48k tbn, 47.95 tbc
   Metadata:
     creation_time   : 1970-01-01 00:00:00
   Stream #0:1(und): Audio: aac (mp4a / 0x6134706D), 44100 Hz, stereo, s16, 144
kb/s

Re: YOUTUBE TOP 100 VIDEO WEB RESOURCE

PostPosted: Sun Jun 03, 2012 6:24 pm
by Xmantium
Ive saved and restarted, shutdown and restarted. Reloaded the content again and still all list as MPEG2

Can you PM your groovy to me but i have definitely edited and saved it correctly

Re: YOUTUBE TOP 100 MUSIC VIDEOS WEB RESOURCE

PostPosted: Tue Jun 05, 2012 12:59 am
by jhb50
See post #1 for version 2 of the groovy which can control over the video codec and resolution of the displayed youtube videos.

Re: YOUTUBE TOP 100 MUSIC VIDEOS WEB RESOURCE

PostPosted: Tue Jun 05, 2012 12:28 pm
by jhb50
See post #1 for version 3 of the groovy which corrects the cachekey to include the YouTube format code and fix the transcoding problem reported above. The video title now also includes the rank number in the top100.

Re: YOUTUBE TOP 100 MUSIC VIDEOS WEB RESOURCE

PostPosted: Wed Jun 06, 2012 7:55 pm
by Xmantium
Just tried it and AVC is working! :D Thanks, this is a wicked plugin!

But... :? ... for some reason on my Bravia TV the videos are playing as if they are live streams. This means i dont have control over forward, rewind, restart and even pause. Sometimes it doesnt start from the beginning

Re: YOUTUBE TOP 100 MUSIC VIDEOS WEB RESOURCE

PostPosted: Wed Jun 06, 2012 10:07 pm
by jhb50
the videos are playing as if they are live streams

Yes, that's what zip's YouTube plug-in plays YT videos as, so I have also set them as live.

Easy for you to change, just edit groovy and set live: false where it has live: true

Post back how it works.

Re: YOUTUBE TOP 100 MUSIC VIDEOS WEB RESOURCE

PostPosted: Wed Jun 06, 2012 11:34 pm
by Xmantium
Ok changed it to
  Code:
return new ContentURLContainer(fileType: MediaFileType.VIDEO, contentUrl: linkUrl, thumbnailUrl: thumbnailUrl, cacheKey: cacheKey, expiresImmediately: true, live: false)

But No content is displayed, tried also deleting ", live: false" and still no content, changed it back to live: true and re-appeared again
Zips plugin does not play live stream on my devices

Is there a way to change it Number=track to [Number] - track
Example
1=Linking Park - Numb to [1] Linking Park - Numb

Re: YOUTUBE TOP 100 MUSIC VIDEOS WEB RESOURCE

PostPosted: Thu Jun 07, 2012 9:25 pm
by jhb50
UR right. YouTube should not be live so I've posted V4 which treats them as files. You will have to mod the groovy if you want to customize the numbering format.

Re: YOUTUBE TOP 100 MUSIC VIDEOS WEB RESOURCE

PostPosted: Fri Jun 08, 2012 5:21 pm
by Xmantium
V4 Working perfectly now!! Thanks!! Way better than any music TV out there!! :D

For those user who used a previous build and videos not showing up, delete the "Cache" folder in "Library" and restart Serviio

Re: YOUTUBE TOP 100 MUSIC VIDEOS WEB RESOURCE

PostPosted: Wed Jun 13, 2012 11:01 pm
by grolschie
Thanks for the plugin jhb50.

I have downloaded v4 and added this web resource:
http://www.youtubetop100.com?start=21&res=720

I have set my max # of feed items to 30. When I view this resource (using MediaBrowser for now), this videos appear. However, the number starts at " 21="... rather than "1="... i.e. I get videos 20 to 50 in my list rather than 1 to 30. They are also different videos to the ones listed here:
http://www.youtube.com/playlist?list=MCUS.yyyymmdd

Thanks.

Re: YOUTUBE TOP 100 MUSIC VIDEOS WEB RESOURCE

PostPosted: Wed Jun 13, 2012 11:12 pm
by dd10986
Working great on samsung D5500. Thanks for the post.

Re: YOUTUBE TOP 100 MUSIC VIDEOS WEB RESOURCE

PostPosted: Thu Jun 14, 2012 2:04 am
by jhb50
grolschie wrote:Thanks for the plugin jhb50.

I have downloaded v4 and added this web resource:
http://www.youtubetop100.com?start=21&res=720

I have set my max # of feed items to 30. When I view this resource (using MediaBrowser for now), this videos appear. However, the number starts at " 21="... rather than "1="... i.e. I get videos 20 to 50 in my list rather than 1 to 30. They are also different videos to the ones listed here:
http://www.youtube.com/playlist?list=MCUS.yyyymmdd

Thanks.


You asked to start at video 21 and it did.
The groovy provides the last weekly list; the link you used ignores the yyyymmdd and gives the current days list.

Re: YOUTUBE TOP 100 MUSIC VIDEOS WEB RESOURCE

PostPosted: Thu Jun 14, 2012 2:05 am
by jhb50
I've posted an update to V5. See first post.

Re: YOUTUBE TOP 100 MUSIC VIDEOS WEB RESOURCE

PostPosted: Thu Jun 14, 2012 7:44 pm
by Xmantium
Excellent! This plugin is now used everyday in my household.
The quality is amazing. The best part the content is always different and varied.
Thanks

Re: YOUTUBE TOP 100 MUSIC VIDEOS WEB RESOURCE

PostPosted: Thu Jun 14, 2012 10:27 pm
by grolschie
jhb50 wrote:You asked to start at video 21 and it did.
The groovy provides the last weekly list; the link you used ignores the yyyymmdd and gives the current days list.


Arrgghh!!! I am very sorry about that. I just cut'n'pasted the URL without looking too closely. Thanks! :-)

Re: YOUTUBE TOP 100 MUSIC VIDEOS WEB RESOURCE

PostPosted: Fri Jun 15, 2012 1:42 am
by jhb50
Updated to Version 6, which provides an option to play the Daily Top 100 Music Videos, rather than the Weekly list. See post #1 viewtopic.php?f=20&t=6331#p45777