Keep screen on while streaming internet radio |
This is NOT a tech support forum.
Tech support questions go to foobar2000 Tech Support forum instead.
See also: Hydrogenaudio Terms of Service.
![]() ![]() |
Keep screen on while streaming internet radio |
Jul 26 2012, 00:05
Post
#1
|
|
|
Group: Members Posts: 18 Joined: 8-May 11 Member No.: 90460 |
I am running fb2k on a windows 7 machine, and I want to have the screen stay on while an internet radio stream is playing. This is distinct from keeping the computer awake, which is not an issue. The setup is that the PC is hooked up to both a monitor and a TV. When the screen is off (according to windows, the power status of the monitor is irrelevant), the TV reports as no signal, and audio is also disabled. So, to play music through the TV's sound system, the TV needs an active video feed from the PC. The power settings in windows are to prevent idling to sleep while streaming media, but this has no effect.
I could alter the settings for the time until windows shuts the screen off, but I would like to retain the current settings for other reasons. Any suggestions for how to accomplish this within fb2k? I tried foo_upnp after seeing similar questions from searching, but the audio stream in particular doesn't seem compatible, as it just links to an mp3 without a port. The url for the stream is http://stream1.opb.org/opbmusic_hbr.mp3; the station offers it as streamable from their own web player or as an m3u/pls for media players. |
|
|
|
Jul 26 2012, 04:14
Post
#2
|
|
|
Group: Members Posts: 18 Joined: 8-May 11 Member No.: 90460 |
Hmmm, apparently vlc player does this. Not sure if it's a directly implemented aspect of the program, or just because it launches a tray notification popup for new songs, which seems like it counts as activity. Would be nice to see it work in fb2k but not like I'm too picky about which program is handling the music in the background.
|
|
|
|
Jul 26 2012, 13:01
Post
#3
|
|
![]() Group: Members Posts: 3282 Joined: 27-January 05 From: England Member No.: 19379 |
you could create a batch file to change the monitor timeout when you launch foobar. it will then reset when foobar is closed.
open notepad... and copy/paste this CODE powercfg - monitor-timeout-ac 0 path\to\foobar2000.exe powercfg - monitor-timeout-ac 15 save it with a .cmd file extension. you may need to right click it and "run as administrator". i'm not on windows 7 at the moment so i can't test. the only downside is the command prompt window will be active on the taskbar while foobar is running but you should be able to modify it's properties so it launches minimised. |
|
|
|
Jul 26 2012, 16:08
Post
#4
|
|
|
Group: Members Posts: 18 Joined: 8-May 11 Member No.: 90460 |
Thanks, trying that now. The command window promptly vanishes on its own when I launch it (normal or as administrator) without any additional steps on my part. Not a reason to suspect that it's not working correctly, right? Is there any place I can check to see that this is active, somewhere in task manager maybe? Running it now to see how it goes. (Edit: d'oh, just blindly copied and pasted it without filling in the path. Re-try imminent)
Also, VLC turned out to not be a workaround. I was going off of the observation that I left the stream open and later that evening the monitor was still on, but the computer is also hooked up to an IR receiver and I've noticed before that occasionally the universal remote manages to wake it up with certain commands not intended for it, even if they don't map to any valid actions. I think watching a little tv just woke it up and I didn't notice. When I got up this morning, vlc was still streaming but the monitor was off as intended. This post has been edited by JoeSyr: Jul 26 2012, 16:09 |
|
|
|
Jul 26 2012, 16:48
Post
#5
|
|
|
Group: Super Moderator Posts: 4340 Joined: 23-June 06 Member No.: 32180 |
Won’t that instantaneously change the screensaver time, launch foobar2000, and then revert the screensaver time, i.e. while foobar2000 is still active?
Granted, I don’t know what W7’s shell is like compared to XP’s cmd.exe, which I almost all of my Windows command-line experience with – but I suspect, due to the window disappearing straight away, either it is running all three commands in rapid succession and thus defeating the point, or something else is amiss. Try adding another line with PAUSE to the end, to see what is happening. I suspect you might have to categorically tell Windows to wait for foobar2000’s exit before reverting the screensaver, otherwise the change would be pointless: CODE start /wait C:\path\to\foobar2000.exe Of course, I may be wrong! As I said, my command-line knowledge is rather rusty. |
|
|
|
Jul 27 2012, 02:47
Post
#6
|
|
|
Group: Members Posts: 18 Joined: 8-May 11 Member No.: 90460 |
Got it working. Had to modify marc2003's commands slightly:
CODE powercfg -x monitor-timeout-ac 0 "C:\Program Files (x86)\foobar2000\foobar2000.exe" powercfg -x monitor-timeout-ac 30 The missing -x was what was causing it to not work correctly, found it by /?'ing powercfg (needed for any changes being set). Also set the end timer to 30 min as that's what my setting was originally. And this works just fine with halting after line 2 until fb2k is closed, at which point the last line runs and finishes. In a truly bizarre case of unexpected tech support stories, the exact second that I ran the modified version this morning, the wall plug for the surge protector the computer was on basically exploded. My first thought was "good god what did marc just have me do?", the timing was just that (im)perfect. In the following moments, I pieced together that this is what the weird smell that started yesterday afternoon was, and the thing was basically a ticking timebomb. Had to replace the outlet and everything; the plug was good and melted/charred and the socket destroyed. Doesn't even look like the circuit was overloaded, just that something must have made contact somewhere, driving the resistance right at the socket way up. Probably could have started a fire if it had happened when I wasn't sitting right there; it didn't blow the fuse and the plugs were still sparking in the aftermath. Thanks for the help! |
|
|
|
![]() ![]() |
|
Lo-Fi Version | Time is now: 21st May 2013 - 23:58 |