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

Enhancement: track.getSimilar #36

Open
nichtmax opened this issue Apr 3, 2013 · 5 comments
Open

Enhancement: track.getSimilar #36

nichtmax opened this issue Apr 3, 2013 · 5 comments

Comments

@nichtmax
Copy link

nichtmax commented Apr 3, 2013

Hi hakko,

first of all: thank you for your work, musiccabinet is awesome!

I got one suggestion: what about track.getSimilar? That feature would be really great at parties and could be integrated into the playlist. I have no experience at all with last.fm and java, so unfortunately I can't program this myself. But maybe you like the idea?

Another thing: The downsampling command in the transcoding section only works with mp3 files, all other files are just piped. Any chance to change that behavior? ffmpeg doesn't care for the input (downsampling can be done with ffmpeg instead of lame).

//edit: this is set in https://github.com/hakko/subsonic/blob/master/subsonic-main/src/main/java/net/sourceforge/subsonic/service/TranscodingService.java in line 438. I guess just removing that check should do the trick.

Regards,
Moritz

@hakko
Copy link
Owner

hakko commented Apr 3, 2013

I used track.getSimilar in an early release of MusicCabinet but gave up on it. Reasons: generated playlists quickly became predictable, I had to invoke getSimilar "live" which made playlist generation take 5 sec or more (that's forever) and doing it for all tracks in advance isn't feasible. So I don't know.. I don't think it's the best approach.

How is downsampling used in Subsonic? I don't use that myself so I can't really tell for sure what the implications are. If you give me a good explanation on possible issues, I'll be more likely to remove the check. :)

Regards

@nichtmax
Copy link
Author

nichtmax commented Apr 4, 2013

Regarding the downsampling: This is mainly used for external apps in cellular networks. Here's a screenshot from iSub..

I think Sindre realized this with lame in the first place. That is why lame is included in the package. Lame doesn't take anything else than MP3 (and wav..) as input, therefore the restriction. There is no reason not to do this with ffmpeg though, the main advantage would be that the input file could be M4A for instance. As ffmpeg is in the package as well there is no disadvantage.

The line for the downsampling would be

ffmpeg -i %s -ab %bk -v 0 -f mp3 -

@aaronk6
Copy link

aaronk6 commented Apr 4, 2013

Hi hakko,

why do you think it's a problem when it takes 5 secs to generate a playlist?

Amarok 1.4 had this feature (I don't know about 2.x though) and it worked quite well. IIRC, there were two different ways to listen to similar tracks:

  • Create a dynamic playlist based on the currently playing track. This playlist contains 100 songs which last.fm consideres to be similar. If the currently playing song is over, a new one gets added to the end of the list. In fact, the playlist is endless.
  • Pick a similar song from the sidebar—there was a panel that always listed about 10 similar songs when you started listening to a song.

I'm not sure how this can be integrated into Subsonic/MusicCabinet. I would love this feature though.

Thanks for the good work!

@hakko
Copy link
Owner

hakko commented Apr 6, 2013

Thanks for the explanation wernermo! That makes sense to me. So I'll remove the restriction.

IceSheep: To me, using track.getSimilar just meant more repetitive playlists than the current artist radio implementation, and with slower generation, so they didn't really have any advantages. It would definitely be interesting to analyze tracks in your library and find similar ones, but I'd think that something like Echo Nest would be more useful for that.

@nichtmax
Copy link
Author

nichtmax commented Apr 7, 2013

Awesome! If you need me to test it drop me a mail.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants