NextPVR Forums
  • ______
  • Home
  • New Posts
  • Wiki
  • Members
  • Help
  • Search
  • Register
  • Login
  • Home
  • Wiki
  • Members
  • Help
  • Search
NextPVR Forums Public NextPVR Support Windows v
« Previous 1 … 28 29 30 31 32 … 102 Next »
Batch file for live TV

 
  • 0 Vote(s) - 0 Average
Batch file for live TV
fla
Offline

Posting Freak

Posts: 886
Threads: 46
Joined: Mar 2006
#1
2023-04-21, 01:52 AM
Are there batch files like ParallelProcessing.bat PostProcessing.bat PostCancel.bat for Live TV (or a config.xml setting to get those to be called for live TV)? I want to prevent hibernation when Live TV starts and re-enable it minutes (not milliseconds) after Live TV stops. I had the NextPVR server hibernate on a kodi reminder automatic channel change today.
sub
Offline

Administrator

NextPVR HQ, New Zealand
Posts: 106,789
Threads: 769
Joined: Nov 2003
#2
2023-04-21, 03:03 AM
Sorry, no there isnt.
fla
Offline

Posting Freak

Posts: 886
Threads: 46
Joined: Mar 2006
#3
2023-04-21, 03:22 AM
Understandable, it's kind of an uncommon user request. Thanks for the reply
sub
Offline

Administrator

NextPVR HQ, New Zealand
Posts: 106,789
Threads: 769
Joined: Nov 2003
#4
2023-04-21, 04:09 AM
Ultimately, it shouldn’t go to sleep while you’re streaming anyway.
mvallevand
Online

Posting Freak

Ontario Canada
Posts: 53,112
Threads: 957
Joined: May 2006
#5
2023-04-21, 12:44 PM
I'd be curious to see the NextPVR logs for this.

Martin
fla
Offline

Posting Freak

Posts: 886
Threads: 46
Joined: Mar 2006
#6
2023-04-21, 01:02 PM
I think Martin in this thread understood what is happening. The server does stay awake during streaming live TV due to the powercfg request made by NextPVRServer.exe. During a channel change (briefly not streaming) the powercfg request must be cleared and setup again for the next channel. On a fast enough PC, that window of opportunity can be enough for the sleep/hibernate to trigger before the 2nd channel begins to stream.

Using kodi reminder automatic channel change, the window of opportunity is short enough that it stays awake 19 times out of 20.
mvallevand
Online

Posting Freak

Ontario Canada
Posts: 53,112
Threads: 957
Joined: May 2006
#7
2023-04-21, 01:17 PM
I understand what is happening too, but I would still like to see the logs. I can think of one situation where I think there might be a flaw, at least looking at my Linux logs

Martin
fla
Offline

Posting Freak

Posts: 886
Threads: 46
Joined: Mar 2006
#8
2023-04-21, 01:27 PM
(2023-04-21, 12:44 PM)mvallevand Wrote: I'd be curious to see the NextPVR logs for this.

Martin

Sorry I didn't see this post. I'll try to get some logs.

To reproduce, play live TV remotely in kodi for longer than your server's sleep timeout and then press stop. Wait for a few seconds for the server to sleep (actually hibernate in my setup to save more power). Play another live TV channel in kodi. It doesn't work because the server is sleeping.

BTW the feature in the nextPVR kodi addon that wakes up the server on kodi startup like X-NEWA used to do is cool!  Cool
mvallevand
Online

Posting Freak

Ontario Canada
Posts: 53,112
Threads: 957
Joined: May 2006
#9
2023-04-21, 01:43 PM
There might be a difference in how sub handles hibernate vs hybrid too. I don't know how much power you actually save in hibernate anymore.

The power management in pvr.nextpvr is better, it can send a WOL when you resume the client from sleep too. In a pinch if you didn't want to walk to the PC, you could sleep the client and see what happens.

Martin
fla
Offline

Posting Freak

Posts: 886
Threads: 46
Joined: Mar 2006
#10
2023-04-24, 02:34 AM
Attached the full log file. Here are the highlights (all live TV from kodi):
  1. Play one channel at 19:22
  2. Play a second channel at 19:33 without pressing stop
  3. Use a kodi reminder to autoplay third channel at 20:00
  4. Press stop at 20:02 and attempt to play a fourth channel (server sleeps)
  5. Wake up the NextPVR server 20:06

Code:
2023-04-23 19:21:56.982 [DEBUG][33] StartStream(7256:RDS2HD)
2023-04-23 19:22:08.175 [DEBUG][9] PowerManagement StayAwake
2023-04-23 19:22:08.175 [DEBUG][9] Active...staying awake

2023-04-23 19:33:07.194 [DEBUG][63] Got request [192.168.0.33]: /service (channel.stream.stop)
2023-04-23 19:33:08.014 [DEBUG][60] StartStream(7184:SNEHD)

2023-04-23 20:00:08.561 [DEBUG][47] Got request [192.168.0.33]: /service (channel.stream.stop)
2023-04-23 20:00:09.556 [DEBUG][56] StartStream(7180:APTNHD)
2023-04-23 20:00:09.751 [DEBUG][9] PowerManagement AllowSleep
2023-04-23 20:00:09.751 [DEBUG][9] No longer active
2023-04-23 20:00:20.023 [DEBUG][9] PowerManagement StayAwake
2023-04-23 20:00:20.024 [DEBUG][9] Active...staying awake

2023-04-23 20:02:07.047 [DEBUG][75] Got request [192.168.0.33]: /service (channel.stream.stop)
2023-04-23 20:02:13.103 [DEBUG][9] PowerManagement AllowSleep
2023-04-23 20:02:13.103 [DEBUG][9] No longer active
2023-04-23 20:02:16.311 [DEBUG][35] [Suspend]
2023-04-23 20:02:16.311 [DEBUG][35] OnSleep...
2023-04-23 20:02:16.311 [DEBUG][35] stopping device process

2023-04-23 20:06:10.193 [DEBUG][49] [Resume]
2023-04-23 20:06:10.194 [DEBUG][49] OnResume...
2023-04-23 20:06:10.198 [DEBUG][67] [Resume]
2023-04-23 20:06:10.198 [DEBUG][67] OnResume...

One strange observation is that in step 3, the AllowSleep happens after the StartStream for the third channel being streamed. A StayAwake follows 11 seconds later but that's a window of opportunity for an unwanted sleep which I have seen happen a couple times on kodi reminder auto-channel-changes.

On step 4 after pressing stop, NextPVR is allowing sleep within 6 seconds and the server suspends 3 seconds after that. Hardly enough time to consult the guide to choose and play the next channel.

Couldn't NextPVR read the Windows setting "Sleep unattended idle timeout" and wait that amount of time after streaming stops before withdrawing the power request and allowing sleep?


Attached Files
.zip   nrecord.zip (Size: 70.39 KB / Downloads: 1)
« Next Oldest | Next Newest »

Users browsing this thread: 1 Guest(s)

Pages (3): 1 2 3 Next »


Possibly Related Threads…
Thread Author Replies Views Last Post
  YouTube TV Live Not Working on One TV WilliamJMedina 0 60 2025-07-03, 02:58 PM
Last Post: WilliamJMedina
  Not picking unused tuner to record while watching live tv dlindyds 5 263 2025-06-21, 10:34 PM
Last Post: dlindyds
  Live TV stopping every few minutes Schtele Bunzorz 3 183 2025-06-17, 11:53 PM
Last Post: mvallevand
  Micro stutter live and recorded TV dallascowboy23 10 667 2025-05-31, 06:39 AM
Last Post: three6zerocool
  Unable to delete recording. File may be in use. seattlefog 24 1,230 2025-04-13, 01:08 AM
Last Post: sub
  Cant watch live TV Bobbybear 3 423 2025-03-23, 03:49 PM
Last Post: Bobbybear
  Fail To start Live TV PeterK2003 2 393 2024-12-15, 10:30 PM
Last Post: PeterK2003
  How to Import Recordings from Prior Install Without any Export Recordings FIle jw1 32 2,462 2024-11-18, 11:41 AM
Last Post: jw1
  V7 Resume now always Plays from File Start peter t 2 442 2024-11-16, 03:53 AM
Last Post: sub
  Random freeze while watching Live TV. three6zerocool 11 1,459 2024-08-25, 01:47 PM
Last Post: mvallevand

  • View a Printable Version
  • Subscribe to this thread
Forum Jump:

© Designed by D&D, modified by NextPVR - Powered by MyBB

Linear Mode
Threaded Mode