Resource icon

OBS Studio [Linux] [OSX] Essential Now Playing on Linux

char

New Member
#1
char submitted a new resource:

[Linux] [OSX] Essential Now Playing on Linux - Now playing output to a text file for streaming on Linux using Chrome

NOTE: This was tested solely on Ubuntu 17.10, so though this can work on OSX, you will have to work out those details.

I really like to show the current song that is playing on my stream. Most of the music I listen to is on YouTube, so I would like to display the title of the video I'm listening to in my stream. I also strictly use Chrome. There used to be a really nice plugin called Untamed Now Playing which used...
Read more about this resource...
 
#2
Okay, so really I like this idea. No lie, it's great to see these types of efforts. But there seems to be a few issues with your instructions, and I wasn't able to get it to work, either, because of an error message from the .js file.

First, to make it simpler, I would suggest you suggest a file name and location for the .js file and put it in the instructions, like "~/nowplaying.js". This will save a step further down as well, when telling the user to add their .js file name to the .json file. You can just change the file to have "~/nowplaying.js" included in the code. Also, you need to remind people to make the .js file executable as well.

Secondly, your "com.flyinglawnmower.obsnp.json." name is incorrect, as you added the sentence-ending period inside the quotation marks. Keep it outside for clarification and to avoid people adding it by mistake.

Finally, there's something wrong with the .js file (in my situation), because when I run it from the command line (in my home directory) it outputs:
Code:
bash: ./nowplaying.js: /usr/local/bin/node: bad interpreter: No such file or directory
I checked the path, and there is no node file in /usr/local/bin. I'm running Xubuntu 16.04, so I installed nodejs and npm with sudo apt install nodejs npm to install them. If this isn't the proper way to install the needed packages, then full nodejs and npm installation instructions probably need to be included in the tutorial.

I ended up using the instructions here to install nodejs and npm after I used the apt method. I then did a which node and found out it was /usr/bin/node, not /usr/local/bin/node. I changed the .json file's first line to the correct path, and ran it from the command line. It just hangs; I stopped it with a Ctrl-C. I stopped the Chrome plugin (I was testing from a YouTube video), went to a different video, and restarted the plugin. I finally saw the np.txt file for the first time. I have success, but I think you need to update the instructions a bit to make it clearer for unexperienced users.

In the end, I love what you've done with this, so kudos on the idea and making the code available to everybody!
 
Top