Resource icon

OBS Lyrics 2.0.0

DCStrato

Member
It is certainly not doing the load it is supposed to do. I wonder if it is reacting badly with another source. Did you try it in a new scene with nothing except the text source for the Lyrics? Attached is my latest copy of the lyrics script that I am using. If I can get it to duplicate your issue here I can fix it pretty quickly. What did you mean by "clicking back and forth between text source and load source"? I am trying that to see if I can get it to crash. The script attached has some timer callback protections that might help that on your computer. I can also try some other guesses as to what it might be and add diagnostics to a new script to run on your computer.
 

Attachments

  • lyrics.zip
    7.1 KB · Views: 34

DCStrato

Member
So, here is what I'm doing. I have a scene called Normal with just the PTZ camera feed. I have a Scene called Prayer, which drops in a motion banner for 10 seconds and then fades out. All that works. I went into the Script and cleared all prepared songs. To set up a song, I duplicated my Normal scene and called it It is Well. I then added the Load Source and picked the correct song. It allowed me to pick it from the list. We don't normally use Studio mode, so I unchecked the Preview box. When I now select that scene, nothing happens on the screen. I still see the camera view, but no text. What am I doing wrong? By the way, I so appreciate both of you helping me with this. Our online following has grown significantly in the last few weeks and as everyone, we're trying to give them the best experience we can.
Also, if I use the Load Source, do I still need the text box source?
Thanks,
Yes you will still need the text box source. The script just loads song lyrics from the file and replaces the text in that text box with the selected lyrics. The "source" just gets focus like all the other sources in the scene when it loads, except that it simply causes the "load lyric" operation using the exact same function that the manual button would use in the script window. The basic rule of software is that there is ALWAYS one more bug, it just has not yet been discovered. Someday, something will change the environment to something different and software that has worked flawlessly for years will quit working. Those of us who love writing this stuff know we need to take every change we can find to track down issues. The puzzle is always "WHY". Why does it work here and not there. Why, Why , Why. So any an all feedback is greatly appreciated as we mentally try to think through what could be wrong.
DC

You can check out what we are doing with OBS and Lyrics on our Facebook Page. https://www.facebook.com/fumcgreeleyco/
 

DCStrato

Member
As a sample of the new markup in the script I attached, here is how I entered It Is Well with My Soul Lyrics for the first three verses.

#L:4
When peace, like a river, attendeth my way,
When sorrows like sea billows roll;
Whatever my lot, Thou hast taught me to say
It is well, it is well with my soul.
#R[
##B
It is well with my soul,
It is well, it is well with my soul.
##B
#R]
Though Satan should buffet, though trials should come,
Let this blest assurance control,
That Christ hath regarded my helpless estate,
And hath shed His own blood for my soul.
##R
My sin—oh, the bliss of this glorious thought!—
My sin, not in part but the whole,
Is nailed to the cross, and I bear it no more,
Praise the Lord, praise the Lord, O my soul!
##R
 

DCStrato

Member
Progress!! I installed and ran OBS and this script on a slower computer and it started behaving similar to how you describe including the crash if switching scenes to quickly. The code for one had not finished before it tried to call it again and it obviously does not like that. I will make adjustments and see if these issues are somehow related, although I don't think so. Issue is pointing to the very small LoadSong function in the script and some simple visibility settings, or one of the last three functions anyway. I will review those closely and send you an update to try within a few hours.
DC
 

DCStrato

Member
PastorDoug,

Thanks for your help in finding issues with the source option for lyrics. I had never thought that a script would need to be recursive safe. I had started to suspect timer callbacks were experiencing recursion problems on slower machines and was able to all but confirm this afternoon that OBS does no checking for recursive calls to user scripts. Attached is a try at solving some of these issues, a potential memory leak issue fix, and a possible visibility issue fix for your environment. Let me know how it goes if/when you get a chance at trying it. You may need to delete and recreate the PrepareLyric Source entries in scenes.

DC
 

Attachments

  • lyricsTest1.zip
    7.1 KB · Views: 23
So, I took the test script and put it in the correct folder. I removed the original script from OBS, then added the new script. I assume that is what I should have done. Then, I created a brand new scene. I then created a text box source and put the word Replace in it. I created a source to load the It is Well lyric. Now, when I select that scene, all I see is the word "Replace"; no text. One positive thing though is that I haven't been able to crash it by selecting the two sources one after the other. Even though it's not working yet, I do so appreciate you both working on this issue with me.
 
I'm making progress. I went into the script box and pressed Reset Lyrics and they showed up. I don't if I need to do that when I switch songs. I haven't gotten that far yet, but it did lead to two questions. What do I need to do in the script box when setting things up for each scene to make it work? Is there a way to automatically begin the song at the beginning when I enter that Scene? When I select a different scene and then go back, it picks up in the lyric where I was at last. So, maybe this whole time it wasn't working because I was at the end of the lyric. Also, I added the PTZ camera back in as a source and set it to be the bottom in the list, but now I can't see the text box at all. I have to press Reset Lyrics again for them to show up.
 
Last edited:
When I add a second song the same way, nothing works until I reset the lyrics. Even then, the first song doesn't work now because it is not selected in the script box again.
 

DCStrato

Member
I'm making progress. I went into the script box and pressed Reset Lyrics and they showed up. I don't if I need to do that when I switch songs. I haven't gotten that far yet, but it did lead to two questions. What do I need to do in the script box when setting things up for each scene to make it work? Is there a way to automatically begin the song at the beginning when I enter that Scene? When I select a different scene and then go back, it picks up in the lyric where I was at last. So, maybe this whole time it wasn't working because I was at the end of the lyric. Also, I added the PTZ camera back in as a source and set it to be the bottom in the list, but now I can't see the text box at all. I have to press Reset Lyrics again for them to show up.
It does reset to the beginning of the song when I load a new scene. But that's me and not you. My goal is to get what works for me also working for you. But I still am looking for Why not you. It DOES sound like you were at the end of the lyric and that is why it was not showing. Now I can go look for why it may not be resetting back to the start of the new song. Baby steps but steps just the same.

I am curious when you add a second song, are you duplicating the scene? If you use the same PrepareLyrics source entry in a new scene by adding a reference (default of OBS), then when you change it in one scene it will change in the other scene. I added code to change the color of the entry to orange to let you know this was the case and alert you to that common source potential. Just delete one of them and use the + source to add a new one unique to that scene. It should stay in white and not turn orange.
 

DCStrato

Member
PastorDougC:

Here is a version that calls the exact same function for Home Lyrics as gets called when you push the Reset Lyrics button. I am curious if this works. Thanks again for all your help. I find that setting hot-keys for at least Next lyric, Previous lyric, and Reset Lyric very helpful for my tech team.
 

Attachments

  • lyricsTest2.zip
    7.1 KB · Views: 21
PastorDougC:

Here is a version that calls the exact same function for Home Lyrics as gets called when you push the Reset Lyrics button. I am curious if this works. Thanks again for all your help. I find that setting hot-keys for at least Next lyric, Previous lyric, and Reset Lyric very helpful for my tech team.
I had it working for a minute with It is Well. When I added Great are You Lord, it wouldn't load the proper file. So, I tried duplicating my It is Well scene and just changing what file it called, but then it messed up my It is Well song. So, I deleted the second script and now my It is Well shows, but the hotkeys don't advance the lyrics. I checked and the hotkeys are still there. They just don't work. Also, where do I find the hotkey area for Reset? I didn't see it in the list.
 
Last edited:

DCStrato

Member
Yes, when you "Duplicate" a scene in OBS, all the sources are not duplicated. Strange but true. The new scene only has sources that are referenced to the original sources. So when you change settings for a source in the duplicate you also change it in the original. They are essentially the same exact source used in two different scenes. The scenes are now sharing the same source rather than each having their own. There are times when this is good. Two scenes in a row with the same title for example so you only have to change the title of the text once! With Lyrics, you only get to select one text source to modify, so these all need to be shared. But the source to modify that text needs to be unique to each scene. Good practice if you duplicate a Lyric scene with a Prepare Lyric source is to delete the Prepare Lyric source and create a new one. Each of the Prepare Lyric source entries should have turned orange when you duplicated the scene to remind you they were actually the same source shared in different scenes. As for hot keys not working, I would delete and reset them since LyricTest2 is a new script. The RESET hot key has a different name (my bad) called Prepared Home.
 
We are getting very close. I did find one issue that may have affected some actions. When I tried to run OBS as Administrator, I got a warning that another OBS was already running. When I checked the Processes, there were about 10 processes running connected with OBS. I ended all those tasks and ran OBS as administrator again. My current setup is this. It is Well runs perfectly, starting at the beginning, resetting when needed, advancing and going back as needed. Perfect. However, my Great is the Lord scene isn't working. I created a brand new scene. created the appropriate text box. I created the appropriate Prepare Lyric source and linked it to the correct song. Now, when I select that scene all I see is my word Replace. It isn't loading the new lyric. The same is true for a third song created the same way. Only the word Replace is in the red box.
 

DCStrato

Member
Here is another LyricsTest3 if you want to try it. Yes, every time OBS crashes it often leaves a process running that has to be cleaned up manually. Hey, it's a free product right! This code mostly just attempts to eliminate any possible recursion. If the first song works, then your text object is getting changed as it should. If that is not also changing in the other scenes, then you can't have the same text object in each of the Lyric scenes. Lyrics can only change ONE text object, so they MUST all be the same. Delete the text object in the 2nd and 3rd songs where you put the word Replace. Copy the text object that is working in the first song and paste (replicate) it into each of the other songs and try again.
 

Attachments

  • lyricsTest3.zip
    7.2 KB · Views: 24
I am going to say, tentatively, VICTORY! I couldn't get anything to work with the Test3 script, so I went back to Test2. I think the key was the copy/paste reference. I have successfully created three songs which all operate perfectly. Now, to figure out the best way to break the lines of each song in the text file, so they look the way I want on the screen. That's easy. Thanks so much for working on this so diligently for me. We're getting over 60 families watching our livestream each week and this will take our effectiveness up a nice notch.
 

DCStrato

Member
So, I am not sure if you are still interested in testing this stuff, but I made a few more changes to try and figure out what is going on. I loaded the test code I wrote for you on our production computer and it had a few issues when I was not using hotkeys, but trying to use the buttons in the script. The source prepares a song, but the script was not aware of that. It is now and won't undo what the source has already done. The only issue will be the typical OBS deal where if your first scene has a source that tries to load a song, you have to go out of the scene and back into it for the active or show calls to work. I will look at possible trying to examine the current scene on startup and if it has a Preset Source then doing the load and not depend on the OBS callback in that one case. Let me know how it goes.
 

Attachments

  • lyricsTest 4.zip
    7.2 KB · Views: 22

DCStrato

Member
I am going to say, tentatively, VICTORY! I couldn't get anything to work with the Test3 script, so I went back to Test2. I think the key was the copy/paste reference. I have successfully created three songs which all operate perfectly. Now, to figure out the best way to break the lines of each song in the text file, so they look the way I want on the screen. That's easy. Thanks so much for working on this so diligently for me. We're getting over 60 families watching our livestream each week and this will take our effectiveness up a nice notch.
Great! Congratulations on the updated viewers. We have less now that we are accepting up to 50 people in person, but a lot are still more comfortable watching the stream. I think these last changes will apply if you exit the Lyrics Script setup/control screen and go back into it. The Test 2 script could still fail to use the buttons correctly if that happens. Now I need to document these changes (which turned out pretty minor) and get them pushed to Amirchev to test and maybe post another update. FYI, I have gone back and updated our songs with some of the new markups for blank lines and repeated refrains and it seems to help them read more like a song book and it saves some cut/paste editing. Thanks again for all YOUR help testing! No software solutions can survive without great feedback.

Between this and the Python script I wrote to automatically download bible verses, scrape them, format them by width and lines, and page through the text like Lyrics, our setup time went from 3 hours down to less than one to prepare for a service!

DC
 
Great! Congratulations on the updated viewers. We have less now that we are accepting up to 50 people in person, but a lot are still more comfortable watching the stream. I think these last changes will apply if you exit the Lyrics Script setup/control screen and go back into it. The Test 2 script could still fail to use the buttons correctly if that happens. Now I need to document these changes (which turned out pretty minor) and get them pushed to Amirchev to test and maybe post another update. FYI, I have gone back and updated our songs with some of the new markups for blank lines and repeated refrains and it seems to help them read more like a song book and it saves some cut/paste editing. Thanks again for all YOUR help testing! No software solutions can survive without great feedback.

Between this and the Python script I wrote to automatically download bible verses, scrape them, format them by width and lines, and page through the text like Lyrics, our setup time went from 3 hours down to less than one to prepare for a service!

DC
I switched to the Test3 and at first I couldn't get anything to work again, but I did find one song that began to work, so I did the copy/paste reference again with the other two songs and everything is fine now. Next project is to be able to do this same thing with our Scripture text for the week.
 
Great! Congratulations on the updated viewers. We have less now that we are accepting up to 50 people in person, but a lot are still more comfortable watching the stream. I think these last changes will apply if you exit the Lyrics Script setup/control screen and go back into it. The Test 2 script could still fail to use the buttons correctly if that happens. Now I need to document these changes (which turned out pretty minor) and get them pushed to Amirchev to test and maybe post another update. FYI, I have gone back and updated our songs with some of the new markups for blank lines and repeated refrains and it seems to help them read more like a song book and it saves some cut/paste editing. Thanks again for all YOUR help testing! No software solutions can survive without great feedback.

Between this and the Python script I wrote to automatically download bible verses, scrape them, format them by width and lines, and page through the text like Lyrics, our setup time went from 3 hours down to less than one to prepare for a service!

DC
I switched to the Test3 and at first I couldn't get anything to work again, but I did find one song that began to work, so I did the copy/paste reference again with the other two songs and everything is fine now. Next project is to be able to do this same thing with our Scripture text for the week.
 
Top