IPB

Welcome Guest ( Log In | Register )

3 Pages V   1 2 3 >  
Reply to this topicStart new topic
Foobar Youtube Radio, Youtube Radio(based on recommendation)
mire777
post Mar 23 2014, 21:10
Post #1





Group: Members
Posts: 372
Joined: 9-June 12
Member No.: 100550



This is my first attempt to make Youtube Radio (based on youtube recommendation). It uses foo_youtube
(Script is only for testing, you should be careful, for me works fine, but who knows, so backup your foobar before you go..).
*Thanks to Marc..



How this work:

When you play video from youtube, it search recommended video from this page(example): http://www.youtube.com/watch?v=oYwL-FzFDKQ
Then select random video from this list(on right), and send one(recommended) video to your playlist.
When first track is finished, foobar open new clip(this recommended video), trigger new, and so on..
You can specify in which playlist 'recommended videos' to be send. You can do this in: ''preferences>shell integration>always send new files to playlist''
If this field is uncheck, all files will be send in your active playlist.

You have option to:
-turn [on/off] ''Youtube Radio''(if you set 'off' you can manualy click on button and select: ''Get Next Video'' or ''Get All Videos'').

''Get All Videos''- will send all recommended videos to your playlist.
''Get Next Video'' - will send one random video to your playlist.
''Search Video'' - will open ''youtube source window'' where you can search for videos..


How to install:
You should first install Wsh plugin 1.5.6. ,
then download youtube buttons: https://www.mediafire.com/?x4n40mh48lpn183
put 'image' folder in foobar profile folder.
After that open new wsh panel and paste this script: http://pastebin.com/xadsrCdB

I would like to know if this is useful for you, i found many new artist with this script...

This post has been edited by mire777: Mar 23 2014, 21:28
Go to the top of the page
+Quote Post
musikomaniak
post Mar 23 2014, 22:57
Post #2





Group: Members
Posts: 132
Joined: 5-June 13
From: France
Member No.: 108507



QUOTE (mire777 @ Mar 23 2014, 20:58) *
QUOTE (musikomaniak @ Mar 23 2014, 20:10) *
I had a complete crash of Foobar. Just after click on "Next videos", foobar freezed, mouse blocked and I had to restart Windows (7).
Opening foobar, all configuration was lost. Opening again, everything came back!
It happened on portable foobar.


It doesn't happen to me. What video you last played, when you click ''get next''?
This can be caused by url. Or for some reason foobar can't open that clip, and it stuck..

You can open: 3dydfy://www.youtube.com/ , 3dydfy://youtube.com/ , www.youtube.com/ , youtube.com/ , http://www.youtube.com/ .

Foo_youtube, changes some url's when adding clips, so this can be reason.
When script looks in the url and cant open, it stuck..

I don't remember which video was on. I had made a search, using your script, then I listened to one and clicked to next and...crash! All logs and history have disappeared.
I just made a search again and anything went ok.

I did not understand what happens when YouTube radio is checked.

This post has been edited by musikomaniak: Mar 23 2014, 22:58
Go to the top of the page
+Quote Post
mire777
post Mar 24 2014, 09:54
Post #3





Group: Members
Posts: 372
Joined: 9-June 12
Member No.: 100550



QUOTE (musikomaniak @ Mar 23 2014, 22:57) *
QUOTE (mire777 @ Mar 23 2014, 20:58) *
QUOTE (musikomaniak @ Mar 23 2014, 20:10) *
I had a complete crash of Foobar. Just after click on "Next videos", foobar freezed, mouse blocked and I had to restart Windows (7).
Opening foobar, all configuration was lost. Opening again, everything came back!
It happened on portable foobar.


It doesn't happen to me. What video you last played, when you click ''get next''?
This can be caused by url. Or for some reason foobar can't open that clip, and it stuck..

You can open: 3dydfy://www.youtube.com/ , 3dydfy://youtube.com/ , www.youtube.com/ , youtube.com/ , http://www.youtube.com/ .

Foo_youtube, changes some url's when adding clips, so this can be reason.
When script looks in the url and cant open, it stuck..

I don't remember which video was on. I had made a search, using your script, then I listened to one and clicked to next and...crash! All logs and history have disappeared.
I just made a search again and anything went ok.

I did not understand what happens when YouTube radio is checked.


I repeat all you done, search for video, open in playlist>click 'Get Next'.. All ok.
If i don't know what happen in that point, then i can't fix this.
You should have saved ''crash report'' somewhere in foobar folder...
In console script saves message what video is open: Youtube Radio: <video url>.

This post has been edited by mire777: Mar 24 2014, 09:57
Go to the top of the page
+Quote Post
musikomaniak
post Mar 24 2014, 10:32
Post #4





Group: Members
Posts: 132
Joined: 5-June 13
From: France
Member No.: 108507



QUOTE (mire777 @ Mar 24 2014, 09:54) *
I repeat all you done, search for video, open in playlist>click 'Get Next'.. All ok.
If i don't know what happen in that point, then i can't fix this.
You should have saved ''crash report'' somewhere in foobar folder...
In console script saves message what video is open: Youtube Radio: <video url>.


I'll do next time. I hope, never smile.gif
Go to the top of the page
+Quote Post
Robertina
post Mar 24 2014, 13:35
Post #5





Group: Members
Posts: 1306
Joined: 4-January 09
Member No.: 65169



FWIW: crash reports are stored automatically into a fb2k subdirectory.

You wouldn't have to wait for a program crash's reoccurring if you want to analyze the past one.
Go to the top of the page
+Quote Post
mire777
post Mar 24 2014, 14:37
Post #6





Group: Members
Posts: 372
Joined: 9-June 12
Member No.: 100550



New version 0.0.3. Now you have possibility to stop when clicking on ''Get All Videos''. Just click: ''Abort''.
It adds 20 - 100 tracks in playlist, so be patient until it finish.
http://pastebin.com/ZMZgDU0v

This post has been edited by mire777: Mar 24 2014, 14:37
Go to the top of the page
+Quote Post
musikomaniak
post Mar 24 2014, 15:40
Post #7





Group: Members
Posts: 132
Joined: 5-June 13
From: France
Member No.: 108507



I'll try your new version.
10 minutes ago I had the message "Aw, crashed :-(" while installing the script on my Foobar installed in program files.
CODE
Scripting Engine Initialization Failed (Youtube Radio by Mire777, CODE: 0x80020101)

CODE
Error: WSH Panel Mod (Youtube Radio by Mire777): Erreur d'exécution Microsoft JScript:
Un composant ActiveX ne peut pas créer un objet
File: <main>
Ln: 1483, Col: 13
<source text only available at compile time>
Error: WSH Panel Mod (Youtube Radio by Mire777): Erreur d'exécution Microsoft JScript:
Un composant ActiveX ne peut pas créer un objet
File: <main>
Ln: 1483, Col: 13
<source text only available at compile time>
Podcatcher: Auto-archiving old un-downloaded casts.


EDIT
Same error with last script
CODE
Error: WSH Panel Mod (Youtube Radio by Mire777): Erreur d'exécution Microsoft JScript:
Un composant ActiveX ne peut pas créer un objet
File: <main>
Ln: 1483, Col: 13
<source text only available at compile time>


This post has been edited by musikomaniak: Mar 24 2014, 15:50
Go to the top of the page
+Quote Post
musikomaniak
post Mar 24 2014, 17:12
Post #8





Group: Members
Posts: 132
Joined: 5-June 13
From: France
Member No.: 108507



I found where the error came! Safe Mode was checked!
Go to the top of the page
+Quote Post
mire777
post Mar 24 2014, 17:42
Post #9





Group: Members
Posts: 372
Joined: 9-June 12
Member No.: 100550



QUOTE (musikomaniak @ Mar 24 2014, 17:12) *
I found where the error came! Safe Mode was checked!


Yes, uncheck safe mode.
Go to the top of the page
+Quote Post
musikomaniak
post Mar 24 2014, 18:13
Post #10





Group: Members
Posts: 132
Joined: 5-June 13
From: France
Member No.: 108507



Here it is smile.gif I discover a lot of music!


When I make a search, all the Youtube videos present in my Youtube Tab disappear. How would it possible to keep them? I mean video previously added using Add YouTube URL's
Go to the top of the page
+Quote Post
mire777
post Mar 24 2014, 18:51
Post #11





Group: Members
Posts: 372
Joined: 9-June 12
Member No.: 100550



QUOTE (musikomaniak @ Mar 24 2014, 18:13) *
Here it is smile.gif I discover a lot of music!


When I make a search, all the Youtube videos present in my Youtube Tab disappear. How would it possible to keep them? I mean video previously added using Add YouTube URL's


I'm glad that it is useful for you smile.gif ..

Don't know what you exactly mean. You must configure search tab well, right click>hold ctrl key>add to current playlist and play.
If you don't select this, then all your playlist entry will be deleted, when adding new file..

This post has been edited by mire777: Mar 24 2014, 19:07
Go to the top of the page
+Quote Post
musikomaniak
post Mar 24 2014, 20:42
Post #12





Group: Members
Posts: 132
Joined: 5-June 13
From: France
Member No.: 108507



QUOTE (mire777 @ Mar 24 2014, 18:51) *
Don't know what you exactly mean. You must configure search tab well, right click>hold ctrl key>add to current playlist and play.
If you don't select this, then all your playlist entry will be deleted, when adding new file..


I did not about right click>hold ctrl key. Thanks smile.gif
I suppose everybody knows!
I did so, but the video go always to default tab, so I drag it on Youtube tab.
Go to the top of the page
+Quote Post
mire777
post Mar 24 2014, 21:31
Post #13





Group: Members
Posts: 372
Joined: 9-June 12
Member No.: 100550



QUOTE (musikomaniak @ Mar 24 2014, 20:42) *
QUOTE (mire777 @ Mar 24 2014, 18:51) *
Don't know what you exactly mean. You must configure search tab well, right click>hold ctrl key>add to current playlist and play.
If you don't select this, then all your playlist entry will be deleted, when adding new file..


I did not about right click>hold ctrl key. Thanks smile.gif
I suppose everybody knows!
I did so, but the video go always to default tab, so I drag it on Youtube tab.


If you talk about script, then.. preferences>shell integration>always send new files to playlist.
Enter your playlist there.. Or Uncheck that, so script will use your active playlist..
If ''youtube tab'' is active all files from 'script search' go there..
For other don't now..
Go to the top of the page
+Quote Post
musikomaniak
post Mar 28 2014, 13:19
Post #14





Group: Members
Posts: 132
Joined: 5-June 13
From: France
Member No.: 108507



Mire777, if you have time, could you make your YT images for white background?
I'm using it on a new skin (Lure) with white backround.
Go to the top of the page
+Quote Post
mire777
post Mar 28 2014, 18:42
Post #15





Group: Members
Posts: 372
Joined: 9-June 12
Member No.: 100550



QUOTE (musikomaniak @ Mar 28 2014, 13:19) *
Mire777, if you have time, could you make your YT images for white background?
I'm using it on a new skin (Lure) with white backround.



Well.. Don't know what you like? Something like this? :







This post has been edited by mire777: Mar 28 2014, 18:56
Go to the top of the page
+Quote Post
musikomaniak
post Mar 28 2014, 20:13
Post #16





Group: Members
Posts: 132
Joined: 5-June 13
From: France
Member No.: 108507



Yes. Thank you smile.gif
I cannot try now because I did not become more clever from last days. I made something wrong adding the script in the wrong place, so I loosed the volume image existing! I'm installing again the new skin...

Fortunately on the stable foobar I have a bigger Youtube image with colours.

This post has been edited by musikomaniak: Mar 28 2014, 20:14
Go to the top of the page
+Quote Post
WilB
post Mar 29 2014, 12:26
Post #17





Group: Members
Posts: 309
Joined: 20-July 06
Member No.: 33113



I have now been using the script for about a week and find it useful and that it mostly works well. I suppose the search algorithm may be improved, e.g. sometimes it gets mostly stuck on finding tracks by the same artist or rotating a few and sometimes returns full albums rather than individual tracks - I was thinking in terms of the variety that foo_lastfm_radio used to offer. In fact I originally thought you were going to use lastfm recommendations.
Go to the top of the page
+Quote Post
mire777
post Mar 29 2014, 21:21
Post #18





Group: Members
Posts: 372
Joined: 9-June 12
Member No.: 100550



QUOTE (WilB @ Mar 29 2014, 12:26) *
I have now been using the script for about a week and find it useful and that it mostly works well. I suppose the search algorithm may be improved, e.g. sometimes it gets mostly stuck on finding tracks by the same artist or rotating a few and sometimes returns full albums rather than individual tracks - I was thinking in terms of the variety that foo_lastfm_radio used to offer. In fact I originally thought you were going to use lastfm recommendations.


Well, i've already made last.fm radio(separately from this script), and it works..
But this is not perfect..

I'v previously wanted to have last.fm recommendation metod in youtube radio.
But there are certain problems with that.
Last.fm site doesn't have 'static html' response(as i previously think), when my script open last.fm radio page, i don't have nothing i can use as recommendation.
I don't have even a <title>.

If u want to have recommendation from there, you must have open browser, log in there, and start radio, then script can use recommendation.
This is how works..
Last.fm radio must stay open in browser for that..
But there you also have problem, you can't get next track, untill previous track is not finished.
Also if you have last.fm scrobbler, you must turn it off or set that looks only for tracks in library..

I applied this to youtube radio (merge 2 script), tested and this work, but, as i said this is not perfect..

Alternative metod is to use this page as recommendation: http://www.last.fm/music/Madonna/_/Like+a+Prayer/+similar
When YT tracks is open in foobar it look's for simmilar songs..
Problem is that YT clips doesn't always have tags in format: %artist% - %title%. Somethimes it doesnt have nothing. In that case this can't be used..
And radio will stop..

For now, my idea is that you have box, vere you type: %artist% - %title% , then script can play simmilar tracks based on what you gave as start point.
Then looks at this page: http://www.last.fm/music/Madonna/_/Like+a+Prayer/+similar , select random tracks from there: .. open new, and so on..
But this isn't youtube radio, rather this is some hibrid..

The fact is that YouTube recommendation method is not perfect(this is what my script use), and i must find something other..
Think to apply this youtube radio I'v already made, but..

If you have any suggestions they are welcome..

This post has been edited by mire777: Mar 29 2014, 22:05
Go to the top of the page
+Quote Post
WilB
post Mar 30 2014, 01:09
Post #19





Group: Members
Posts: 309
Joined: 20-July 06
Member No.: 33113



One possibility that came to mind is echonest. It looks like you can get lists of similar artists and their songs according to hotness. There is also API: Similar artist radio – generate a playlist of songs by similar artists. These would need to be set up so that they return all music, i.e. not restricted to music in media library. So a list or playlist or something could be generated, then pick artist-title from that, with bias towards more popular songs if wish, for youtube searching. I presume this could be done in wsh panel mod since other echonest searches can be. There is already an echonest plug-in, http://www.hydrogenaudio.org/forums/index....st&p=855224, but I think this is restricted to generating playlists of music in media library like softplaylists does with lastfm.

HTH or at least provides something to think about.
Go to the top of the page
+Quote Post
mire777
post Mar 30 2014, 04:21
Post #20





Group: Members
Posts: 372
Joined: 9-June 12
Member No.: 100550



QUOTE (WilB @ Mar 30 2014, 01:09) *
One possibility that came to mind is echonest. It looks like you can get lists of similar artists and their songs according to hotness. There is also API: Similar artist radio – generate a playlist of songs by similar artists. These would need to be set up so that they return all music, i.e. not restricted to music in media library. So a list or playlist or something could be generated, then pick artist-title from that, with bias towards more popular songs if wish, for youtube searching. I presume this could be done in wsh panel mod since other echonest searches can be. There is already an echonest plug-in, http://www.hydrogenaudio.org/forums/index....st&p=855224, but I think this is restricted to generating playlists of music in media library like softplaylists does with lastfm.

HTH or at least provides something to think about.


I will try echonest..
But think that i can do this with last.fm..
Make some search box, where you type artist.
Ex. ''Florence + the Machine'' > http://www.last.fm/music/Florence+%252B+the+Machine/+similar
Then pick some random artist from there, and search for tracks > http://www.last.fm/music/Ellie+Goulding/+tracks
Pick random track > search youtube video, and open in foobar..

Stay on that page, or:

Open another page > http://www.last.fm/music/Ellie+Goulding/+similar
Pick random artist, and search for tracks > http://www.last.fm/music/Lorde/+tracks
Pick random track > search youtube video, and open in foobar..

Only thing, don't know if this will work as last.fm radio..
And it's little tricky to open multiple pages in same time.

Anyway i will do something with this..

This post has been edited by mire777: Mar 30 2014, 04:22
Go to the top of the page
+Quote Post
mire777
post Mar 30 2014, 07:30
Post #21





Group: Members
Posts: 372
Joined: 9-June 12
Member No.: 100550



New version: http://pastebin.com/LwdynFk8

Added menu option:

-Open Artist+Title (good if you want to start radio from selected 'artist' in playlist)
-Open In Browser (will search 'artist+title' in browser on youtube)

This post has been edited by mire777: Mar 30 2014, 07:38
Go to the top of the page
+Quote Post
mire777
post Mar 31 2014, 22:56
Post #22





Group: Members
Posts: 372
Joined: 9-June 12
Member No.: 100550



I Made quick test to implement last.fm recommendation in 'youtube'.
For now everything works fine. Seems it works identical as last.fm radio on web.
Except one.. It's little slower, because script opens 3 web pages(these pages can't be open in same time)..
So next track is available after 30sec playing first track.

It uses metod i described in previous post..
You type artist and script play simmilar artist and songs..
It use random metod.

------------------------------------------------------------------
I have some erors too(if someone can help me)...

Html is in format:

CODE
<div>
      <a href: ''/music/madonna''


But also have some unaceptable strings:
example:

CODE
<div>
      <a href: ''/music/http://www.cbs.interactive.com''

or:

<div>
       <li>
           <a href: ''/music/ramones/+images(+videos, +events, +wiki... etc..)


I have replace these strings with ('' ''). But in that case, i recieve:

/music/

Whitch refers me to nothing, and as result i have HTTP: error 404.(not found).
When script not found next track, it plays previous again. This is problem.

I use '/music/' to identify which tags to read, i can not know whether after this is be something that is not artist.
These tags must be skipped completly, from read, to avoid 404..
I apreciate if someone can help, and has solution for this, to skip these tags completly..


Pages i use are:
http://www.last.fm/music/Ramones/+similar
http://www.last.fm/music/Ramones/+tracks


*Edit:
Going more deeply seems that these tags are before ''artist'' tags, so i assume i can ignore them with specify random numbers from max-min.

This post has been edited by mire777: Mar 31 2014, 23:06
Go to the top of the page
+Quote Post
WilB
post Apr 1 2014, 17:10
Post #23





Group: Members
Posts: 309
Joined: 20-July 06
Member No.: 33113



It seems you solved your issue above.

But I was wondering why you don't use the Similar Artist Radio functionality of echonest? It already seems to return what you want, e.g. see here http://developer.echonest.com/raw_tutorial...api/static.html and here http://developer.echonest.com/raw_tutorial...pi/dynamic.html. I tested it and it works in wsh panel mod. It will be considerably faster than how you are trying to do it with much the same result. All you need to do is to process the json array, and search youtube for the resulting artist – title combinations. Job done! I think your script already has the json_parse functions in it.

HTH

This post has been edited by WilB: Apr 1 2014, 17:36
Go to the top of the page
+Quote Post
musikomaniak
post Apr 1 2014, 19:40
Post #24





Group: Members
Posts: 132
Joined: 5-June 13
From: France
Member No.: 108507



For me its works ok. I do not use Last.fm and cannot tell you more about technical details.
When I click on open 'Artist + Title', the same video appears (normal ?)

I don't know why on a portable install with a skin from russian foobar in search I cannot type two words. The space bar does not work. For example 'english song'. But it's not really a problem. I don't speak russian and cannot ask them smile.gif
Go to the top of the page
+Quote Post
mire777
post Apr 1 2014, 22:53
Post #25





Group: Members
Posts: 372
Joined: 9-June 12
Member No.: 100550



QUOTE (WilB @ Apr 1 2014, 17:10) *
It seems you solved your issue above.

But I was wondering why you don't use the Similar Artist Radio functionality of echonest? It already seems to return what you want, e.g. see here http://developer.echonest.com/raw_tutorial...api/static.html and here http://developer.echonest.com/raw_tutorial...pi/dynamic.html. I tested it and it works in wsh panel mod. It will be considerably faster than how you are trying to do it with much the same result. All you need to do is to process the json array, and search youtube for the resulting artist – title combinations. Job done! I think your script already has the json_parse functions in it.

HTH


Don't know about echonest? I was trying this demo: http://static.echonest.com/demo/dynamic/dynamic.html

Type 'madonna' there, and it returns me the same artist again and again. Last.fm doesn't do this.
It going more deeply. It has 17 pages of diferent artist, maybe more..
Same artist never repeat, or at least, this happen very rarely..

I never try echonest api, this code you see is previously left from (marc2003 script- modified by me), i used this as a start.
So if i want to do this, then i must to learn first how to use json.
With html is easy..


If you have working code, then all you have to do is to merge these 2 scripts, and your done.
I can do this if you have script..

But my experiance with this demo is bad.
If this work like this, then even youtube recommendation is much better than this..

------------------------------------------------------------------------------------------------
Musikomaniak:

'Open Artist+Title' > will open the same video in your playlist.
If you ex. have song in mp3 format in normal playlist, you can click on this and you will receive video > from where you can start radio for that artist.
It is better than type in search box for same artist..
Or if you listen radio stream, you can also click on this, and you will receive video for that song, which you can downlad later as mp3 smile.gif
This is because it is added.

This post has been edited by mire777: Apr 1 2014, 23:26
Go to the top of the page
+Quote Post

3 Pages V   1 2 3 >
Reply to this topicStart new topic
2 User(s) are reading this topic (2 Guests and 0 Anonymous Users)
0 Members:

 



RSS Lo-Fi Version Time is now: 23rd September 2014 - 11:47