Home › Forums › General Banter › My answer to "What song is that?" during art streams in OBS:
- This topic has 15 replies, 6 voices, and was last updated 7 years, 5 months ago by
aFoxNamedMorris.
-
AuthorPosts
-
April 4, 2016 at 1:02 pm #67510
aFoxNamedMorris
MemberSo I do art streams. A lot of people like me have a media player running in the background so people can have something to listen to whilst we do our thing. Now, for whatever reason, people inevitably ask what song is playing, so instead of having to stop arting so we can answer the question, we opt to have the song info rendered on top of the stream using text sources in OBS.
Under Windows, it’s as easy as this:
https://www.youtube.com/watch?v=WbBB1_5DRvcBut under Linux, there was no such simple solution… So I said “FUCK IT”, did a table flip, and made this puppy: https://github.com/aFoxNamedMorris/grab-song/blob/master/grab-song.sh
Requires qdbus and ImageMagick to run.
Supports any MPRIS enabled media player.Must (for now) be run from the directory that it’s stored in.
WIP! There are a few bugs, and it is not entirely finished.Outputs the song title, artist, and album data, as well as the album art to the ‘Output’ subdirectory.
If no album art is found, a generic one is substituted in. The album art is always converted to a 500x500px AlbumArt.jpg so as to keep your OBS scene composition uniform between data updates.Usage:
Code:./grab-song.sh <player>Keep in mind that you must have your player of choice running or the script will produce errors.
Examples:
Code:./grab-song.sh pithos
./grab-song.sh audacious
./grab-song.sh clementine
./grab-song.sh vlc
./grab-song.sh NuvolaAppSpotifyThe script will remember the last player specified, so it can be run without having to specify the player each time.
A utility is included which will list the available players’ arguments, so you don’t have to guess. It can also be paired with the ‘watch -t’ command to give a real(ish)-time update, so as to avoid having to rerun the utility each time a new media player is started.
Usages:
Code:./check-media-players.sh
watch -t ./check-media-players.shIn OBS, add the necessary text and/or image sources, and point them to their respective files in the ‘Output’ subdirectory. OBS will automagically reload the sources each time grab-song.sh updates them.
There you have it! Hope this is useful to somebody out there.
SCREENSHOTS OR IT DIDN’T HAPPEN:
DOWNLOAD:
https://github.com/aFoxNamedMorris/grab-song/archive/master.zipConstructive criticism, bug reports, and testing on non-Ubuntu distros is much appreciated.
If you would like to contribute, please feel free to fork the project on GitHub. https://github.com/aFoxNamedMorris/grab-song
April 4, 2016 at 5:18 pm #76049strider
ParticipantThat’s really cool and way better looking than the Windows alternative! I’ll try it soon!
As for criticism, having this on Github would be way better than Google Drive :p
April 4, 2016 at 6:14 pm #76050aFoxNamedMorris
Memberstrider wrote:That’s really cool and way better looking than the Windows alternative! I’ll try it soon!As for criticism, having this on Github would be way better than Google Drive :p
I appreciate the compliment. However, it feels weird to me because it’s just a command line tool. The screenshots are of the final output of the script that has been customized with extra fonts and images in OBS.
The most fun and satisfying part for me is that unlike the Windows equivalent, my tool grabs the album art. Hehe.
You’re right, of course, about Github. But make no buts about it, I intended to host the scripts there from the start. I’d just rather wait until the thing is more polished before I share it. I need to make the verbosity optional, defaulting to false. I also need to make it possible to change the player selection while the script is still active. I also intend to either make a GUI frontend or find somebody willing to make one for me.
April 4, 2016 at 6:28 pm #76051strider
ParticipantaFoxNamedMorris wrote:I’d just rather wait until the thing is more polished before I share it.I tend to hear that a lot but IMO, there’s nothing wrong with having Github repos with early stage code. I even have repos that have little more than a README and a vague idea of what’s going on!
Take Icculus’ version of the Serious Engine for example. It’s far from usable right now but it’s been on Github since it was possible for him to legally share the code.
April 4, 2016 at 6:51 pm #76052Lord Drachenblut
MemberI really hope you will add this to the OBS plugin forum as there is a severe lack of plugins that support Linux currently on there
April 4, 2016 at 7:38 pm #76053aFoxNamedMorris
Memberstrider wrote:aFoxNamedMorris wrote:I’d just rather wait until the thing is more polished before I share it.I tend to hear that a lot but IMO, there’s nothing wrong with having Github repos with early stage code. I even have repos that have little more than a README and a vague idea of what’s going on!
Take Icculus’ version of the Serious Engine for example. It’s far from usable right now but it’s been on Github since it was possible for him to legally share the code.
You have a valid point. Besides, I could use all the help I can get.
Here, have a link:
https://github.com/aFoxNamedMorris/grab-songLord Drachenblut wrote:I really hope you will add this to the OBS plugin forum as there is a severe lack of plugins that support Linux currently on thereI agree, wholeheartedly.
As a matter of fact, the name of the directory I keep this project in on my machine is ‘OBS-Addon-NowPlaying’. I fully intend to present it for possible adoption at some point.April 4, 2016 at 8:11 pm #76054strider
ParticipantNeat! I’ll try out this and probably send some pull requests your way.
April 5, 2016 at 7:20 am #76059aFoxNamedMorris
MemberLooking forward to it, dude!
You do very impressive work.
April 5, 2016 at 10:09 am #76061MichaelP
MemberThis is why I like the Linux Community, two thumbs up.
April 5, 2016 at 11:39 am #76062aFoxNamedMorris
MemberMichaelP wrote:This is why I like the Linux Community, two thumbs up.Back at ya!
Glad you like my work.
April 5, 2016 at 12:49 pm #76063__eMpTy__
ParticipantaFoxNamedMorris wrote:So I do art streams.Just curious: an “art stream” is what exactly?
April 5, 2016 at 1:18 pm #76064Frojoe
Keymaster__eMpTy__ wrote:aFoxNamedMorris wrote:So I do art streams.Just curious: an “art stream” is what exactly?
Gonna hazard a guess here and say a stream where someone draws? That or someone actually drawing pictures in the snow with urine.
April 5, 2016 at 2:44 pm #76066aFoxNamedMorris
MemberFrojoe wrote:__eMpTy__ wrote:aFoxNamedMorris wrote:So I do art streams.Just curious: an “art stream” is what exactly?
Gonna hazard a guess here and say a stream where someone draws? That or someone actually drawing pictures in the snow with urine.
The former. I draw airships and fantasy characters and such while people watch and critique.
April 5, 2016 at 3:02 pm #76067__eMpTy__
ParticipantaFoxNamedMorris wrote:Frojoe wrote:__eMpTy__ wrote:Just curious: an “art stream” is what exactly?Gonna hazard a guess here and say a stream where someone draws? That or someone actually drawing pictures in the snow with urine.
The former. I draw airships and fantasy characters and such while people watch and critique.
That’s cool. I’ll have to check out one sometime.
April 5, 2016 at 3:32 pm #76068aFoxNamedMorris
MemberFor a few examples, check out https://picarto.tv/.
EDIT: Updated the original post with current links and info.
-
AuthorPosts
- You must be logged in to reply to this topic.