Autoplay music when XBMC idle
#16
Now everything is fine.
Works perfectly,I apologize to the first post.
Reply
#17
Glad to see more people are using it =)
Reply
#18
Yes
Service is extra, thanks for that. I think many people do not know, that there is this service.
I'm at Xperience page all time I will promote your servis.
Best Regards
Reply
#19
(2013-04-13, 16:08)Bstrdsmkr Wrote: Oops! Misplaced a set of ''. Should be fixed on github now

Very very nice this is exactly what I was searching for! Like you I used the autoexec.py script to play nonstop radiostream in XBMC (heres my script: http://pastebin.com/hJzauKn1 ) but this is a better solution - will try it out, thanks! Rofl
Reply
#20
I love this add-on. It's very useful, but I have one issue. The volume doesn't reset to the previous level when starting a video. (This refers to XMBC's internal volume, not system volume.) I usually have XBMC's volume turned up to 100% when playing videos, and I prefer to have the idle music at a low volume, but when I set the volume low in the service's config settings, the volume stays at that low level when a video starts, and I have to turn it back up manually. The only other option is to leave the service's volume setting at 100%, and try to catch the system volume when the idle music starts before it blows my head off.

Any chance of an update, or instructions for how to modify the script to do that? I'm not a python coder.
Reply
#21
The trouble is there isn't a signal to say when a playlist has stopped. We get notified when an item in a playlist finishes or is stopped, but I haven't found a way to deterine that the whole playlist is finished. If we knew when the whole thing stopped, we could return the volume appropriately
Reply
#22
Maybe the service could apply a volume transform to the stream, instead of changing XBMC's master volume?
Reply
#23
(2013-05-23, 19:40)Bstrdsmkr Wrote: The trouble is there isn't a signal to say when a playlist has stopped. We get notified when an item in a playlist finishes or is stopped, but I haven't found a way to deterine that the whole playlist is finished. If we knew when the whole thing stopped, we could return the volume appropriately
i didnt try this, but maybe
check the time between "stop of the previous item" and "start of the next item" (i guess: not more than 2 secs)
then create a script which capture onPlayBackStopped event, wait some time and check if isPlaying is false
after that you know the playlist is finished
Reply
#24
(2013-05-22, 20:05)Dare Wrote: I love this add-on. It's very useful, but I have one issue. The volume doesn't reset to the previous level when starting a video. (This refers to XMBC's internal volume, not system volume.) I usually have XBMC's volume turned up to 100% when playing videos, and I prefer to have the idle music at a low volume, but when I set the volume low in the service's config settings, the volume stays at that low level when a video starts, and I have to turn it back up manually. The only other option is to leave the service's volume setting at 100%, and try to catch the system volume when the idle music starts before it blows my head off.

Any chance of an update, or instructions for how to modify the script to do that? I'm not a python coder.

+1 ! I love this addon!
Reply
#25
Ok, I think I got this working.
1. If playback is stopped manually, restore the volume
2. If playback stops by itself and the current playlist position is the last position, restore the volume

Grab it from github and let me know how it works
Reply
#26
I'm going to throw a bunch of stuff at you at once, so bear with me. Smile

The service's behavior confused me at first, but I think I made sense of it. When anything stops playing, including videos, the volume gets reset to the level that the service captured when it previously started playing the background music. Say XBMC's volume is set to 75%, and the background music is set to play at 25%. Manually stopping the music returns the volume to 75%. Then I turn the volume up to 100% and start a video. When that video stops, the volume is reset to 75%. In order for the volume to stay at 100% after playing a video, the background music service has to actually start with the volume set at 100%.

Also, if I start a video directly while the background music is still playing, the video starts at the background music's level, 25%. When I stop the video, the volume returns to the level before the background music started.

Is it very difficult to apply a volume transform to the background music stream, to simply make it quieter? It seems to me that that would be a magic bullet to elegantly fix all of these problems, instead of trying to define a series of conditions and scenarios to decide where to set XBMC's global volume level. But I'm not a programmer, and I know nothing about how XBMC works under the hood, so for all I know you might be doing it the only possible way. So of course I would defer to your judgment.

A nice ergonomic feature might be for the service to remember the volume when an item stopped playing, instead of before it started. For example, if I set the volume to 50% while playing a video, that becomes XBMC's global default volume, and the background music could always reset to that when it stopped. Then if I change the volume while the background music is playing, say from 25% to 75%, the background music would always start at 75%, until I changed it again. That could give me direct and intuitive control over the volume without even having to mess around with config dialogs.

I think I identified another problem. I believe the service globally changes Playlist:Repeat to All, and doesn't change it back to whatever it was before. I generally don't want videos to automatically repeat when they are finished, so I set Playlist:Repeat to Off, but it's constantly being reset to All. I thought maybe XBMC was doing this by itself because of an internal bug, but I'm starting to suspect this service as the culprit.

One nice-to-have would be to be able to set the idle time before the music starts to zero, so the background music starts instantly after a video stops, instead of having to wait for it.

Thanks for working on this service. You're adding a really nice feature to XBMC.
Reply
#27
We can only get and set the current volume globally, so we need to know when to set it back. Can't do anything about starting a video while it's still playing as there's no signal to know whether you started it or it's part of the playlist.

New version:
- Only change the volume if we're going into or coming out of idle
- Added option to not change Repeat state
- When the next item in the playlist is queued, if the volume has been changed, set that as the new idle volume

Let me know how this one works
Reply
#28
Ah, that one works in a much more predictable way. I like that it remembers what the video volume should be. Too bad it forgets the background music volume when you change it, but that's not a huge deal. You can always set that in the config I suppose. I also like that the repeat state can be set to no change. Turns out that was the culprit after all.

It's a shame it can't restore the video volume back to what it should be if you manually start a video while the background music is playing, because that's probably the most common usage scenario. If that can't be fixed, I'm afraid the whole volume changing effort may be for naught, because I would just have to leave the background music at 100% and go back to turning the system volume up and down the way I was using it before.
Reply
#29
Xbmc doesn't have a "video" volume and etc, just the global volume. It will save the current volume as the volume to switch to when posting background music when it queues the next item on the playlist.
I should have it save when playback is stopped as well.

I have an idea about the starting playback while already playing thing, but in the mean time, if you hit stop before starting the video, it should do what you expect
Reply
#30
New Version 0.0.5:
- Should restore the pre-idle volume when a user starts playback manually
- When a playlist item stops or is queued, remember the current volume for idle playback in the future
Reply

Logout Mark Read Team Forum Stats Members Help
Autoplay music when XBMC idle2