VLC NowPlaying

Non-OBS Script VLC NowPlaying 1.7.0

Tipher88

New Member
Tipher88 submitted a new resource:

VLC NowPlaying - Script that allows you to create a NowPlaying.txt file to display song information from VLC.

This is a Python script I put together in order to display information from VLC on my stream. The setup that I know this script will work on is Windows 7 with Python v2.7.8 and VLC v2.2.1, but it should be cross platform though cannot guarantee that.

The README.txt contained within the zip should contain all the directions required to get this script up and running, but for ease of access and understanding I will include it here as well.

VLC NowPlaying Script
Version:...

Read more about this resource...
 
Last edited:

Isaiahmag

Member
I am trying to make it work but it does not sign into the status.xml and I have put in the right password...
 

Tipher88

New Member
I am trying to make it work but it does not sign into the status.xml and I have put in the right password...

What OS and VLC version are you running?

You already went into VLC, went to Tools->Preferences, clicked the radio button to Show All Settings, expanded the Main interfaces item, clicked Lua and set the password in the Lua HTTP group?

Did you also check and make sure that source directory points to a location similar to "C:\Program Files (x86)\VideoLAN\VLC\lua\http" for your OS? I also have the Directory index option checked, but I believe that is checked by default.

After that you should be able to go to http://localhost:8080/requests/status.xml and type in your password (leaving the username field blank) and it should work just fine.
 

Isaiahmag

Member
It worked on my Linux Mint 17.2 Xcfe but not on my Windows 8.1 so I might by missing something from python.
 

Tipher88

New Member
I do state in the README.txt that Requests is a Python dependency for this script. Did you happen to install that on your Windows 8.1 computer? The Requests library may be included or have been previously downloaded on your Linux box.
 

SilverDeoxys563

New Member
I'm very confused by these "Python" steps... Can you tell me how to install this, assuming I've never heard of Python before? Thank you!

My OS is Windows 8.1 by the way.

EDIT: I did as much as I could via LOTS of Googling, but I can't seem to get past this: http://puu.sh/kN0kT.png

As far as I know, the simple password is the same in VLC ( http://puu.sh/kN0J6.png ) as it is in NowPlaying.py ( http://puu.sh/kN0s7.png ). What am I missing?

Pretty sure I was able to use Pip to install "requests," as grueling as figuring it out was. It installed to C:\Python35\Lib\site-packages\pip\_vendor\requests , but is that actually the right spot? Like, I don't even know if it can access that, uh, thingy from there. Can it?

I'm so lost... :C
 
Last edited:

Tipher88

New Member
I'm very confused by these "Python" steps... Can you tell me how to install this, assuming I've never heard of Python before? Thank you!

My OS is Windows 8.1 by the way.

EDIT: I did as much as I could via LOTS of Googling, but I can't seem to get past this: http://puu.sh/kN0kT.png

As far as I know, the simple password is the same in VLC ( http://puu.sh/kN0J6.png ) as it is in NowPlaying.py ( http://puu.sh/kN0s7.png ). What am I missing?

Pretty sure I was able to use Pip to install "requests," as grueling as figuring it out was. It installed to C:\Python35\Lib\site-packages\pip\_vendor\requests , but is that actually the right spot? Like, I don't even know if it can access that, uh, thingy from there. Can it?

I'm so lost... :C

Hi SilverDeoxys563, thank you for trying out my script!

Pic #1: The biggest issue I can see from your post (thanks for all the info) is that you are using Python 3.5 and I used Python 2.7.8 to develop the script. I updated the script to work for Python 3.x (I used Python 3.2 to test) and will be releasing that as an update here shortly. So try using the updated script before anything else.

Pic #2 & #3: As long as the two passwords match you should be fine. So whatever you enter in the Lua HTTP password box needs to be the same as what you put in the script.

As far as where pip installed the requests library, there should also be a requests folder here: C:\Python35\Lib\site-packages\requests
 

Etuldan

Member
I made a patch to handle stream from VLC "<info name="now_playing"></info>" and to write the text only when VLC is on "playing" state
 

Attachments

  • NowPlaying.py.txt
    4.1 KB · Views: 169

Tipher88

New Member
I made a patch to handle stream from VLC "<info name="now_playing"></info>" and to write the text only when VLC is on "playing" state

Etuldan,

Thanks for using my script enough to want to make a patch for it! I will take a look at your patch and test it this weekend and probably end up adding your contribution in a release this weekend as well.
 

Andrew Fabri

New Member
Hi there!

I managed to get this working, but I would like to know whether it's possible for the text file not to overwrite the current song each time the song changes. Ideally I would like to know whether it is possible to find a text file with all the songs played whilst VLC was running. Would that be possible?

Thanks!
 

Tipher88

New Member
Hi there!

I managed to get this working, but I would like to know whether it's possible for the text file not to overwrite the current song each time the song changes. Ideally I would like to know whether it is possible to find a text file with all the songs played whilst VLC was running. Would that be possible?

Thanks!

Andrew,

Glad you got it working and have a feature request for me :-) I hope v1.3.0 does what you are looking for. If you are on Windows you may need to view the new NowPlaying_History.txt file in an editor other than Windows' Notepad because of a newline issue that I am not sure I can fix. Notepad++ or Wordpad should work just fine.
 
Last edited:

renfri

New Member
B5HYK7Y.png
This is great, just is there a way to prevent what I showed in the image from happening, its not just & that can cause something like that.
 

Tipher88

New Member
B5HYK7Y.png
This is great, just is there a way to prevent what I showed in the image from happening, its not just & that can cause something like that.

Hello renfri,

Thanks for using my script! I have yet to run into any escaped characters showing up, but I threw in some code for v1.4.0 that may fix what you are experiencing.
 
Top