Jump to content

Should Emby Server wake to record TV


emg456

Recommended Posts

emg456

Hi all.

 

New to Emby.

 

Server running under Win 10 pro. I don't want to have it running 24/7 due to noise issues, power consumption etc.

 

I was under the impression that scheduled recordings would put a scheduled task in to wake the computer 5 minutes before any recordings were due to start but this is not happening on my setup.

 

Recordings happen fine as long as the computer is up and running before they are due. Server is headless and user is logged in under rdp with the session disconnected - not sure if that has any bearing here.

 

Where should I start looking to fix?

 

 

Link to comment
Share on other sites

maegibbons

Hi all.

 

New to Emby.

 

Server running under Win 10 pro. I don't want to have it running 24/7 due to noise issues, power consumption etc.

 

I was under the impression that scheduled recordings would put a scheduled task in to wake the computer 5 minutes before any recordings were due to start but this is not happening on my setup.

 

Recordings happen fine as long as the computer is up and running before they are due. Server is headless and user is logged in under rdp with the session disconnected - not sure if that has any bearing here.

 

Where should I start looking to fix?

How are you suspending the computer?

 

I.e emby should wake the computer up from hibernation or sleep using task scheduler. How are you putting it to sleep?

 

Are you seeing jobs created in task scheduler?

 

krs

 

Mark

 

A 'like' is always appreciated!

Link to comment
Share on other sites

It's supported on Windows, yes, but not when running as a service. The login under RDP might be causing a problem.

  • Like 1
Link to comment
Share on other sites

emg456

How are you suspending the computer?

 

I.e emby should wake the computer up from hibernation or sleep using task scheduler. How are you putting it to sleep?

 

Are you seeing jobs created in task scheduler?

 

krs

 

Mark

 

A 'like' is always appreciated!

 

Thanks for your response.

 

I see no jobs in task scheduler. No difference whether computer sleep generated automatically (after 2 hours) or Start/ Shutdown/ Sleep.

 

 

It's supported on Windows, yes, but not when running as a service. The login under RDP might be causing a problem.

 

I wondered this...

 

Rdp uses credentials for admin user on that computer so permissions should be ok but yes...

 

I'll connect up a screen/ keyboard and see if that makes a difference.

 

Thanks.

Link to comment
Share on other sites

maegibbons

Sounds to me that the problem is that the tasks are not being created.

 

I think RDP is a red herring. When the server is asleep there is no connection! Unless its at task creation.

 

I would schedule some recordings and check under what conditions that the tasks are created.

 

Krs

 

Mark

 

A 'like' is always appreciated!

  • Like 1
Link to comment
Share on other sites

emg456

Ok I logged in *locally* yesterday and set a couple of recordings.

 

Emby recording tasks appeared in the task list - so far so good.

 

The server woke up at the allocated time but no recordings were made.

 

I later checked that I could see those tasks under an RDP login and I could so I set a couple of recordings whilst logged in over RDP.

 

Again, the tasks appeared and the server woke up to record but again no recordings.

 

I have completely shut the server down and will test further later on today.

Link to comment
Share on other sites

maegibbons

Ok I logged in *locally* yesterday and set a couple of recordings.

 

Emby recording tasks appeared in the task list - so far so good.

 

The server woke up at the allocated time but no recordings were made.

 

I later checked that I could see those tasks under an RDP login and I could so I set a couple of recordings whilst logged in over RDP.

 

Again, the tasks appeared and the server woke up to record but again no recordings.

 

I have completely shut the server down and will test further later on today.

Hmm. On the wake up was emby running? Because after wakeup from sleep, its emby that starts the recording from its internal schedule.

 

So have you got the logs throughout this period?

 

Krs

 

Mark

 

A 'like' is always appreciated!

Link to comment
Share on other sites

emg456

Hmm. On the wake up was emby running? Because after wakeup from sleep, its emby that starts the recording from its internal schedule.

 

So have you got the logs throughout this period?

 

Krs

 

Mark

 

A 'like' is always appreciated!

 

After some more testing and digging around, it appears that the wake tasks are now being created whether I am logged in locally or remotely so that's good. I think.They don't appear in the list immediately which may have been throwing me earlier.

 

Looking through the Windows/system logs in Event Viewer, what is happening is the computer is waking up but then going back to sleep again before the recording starts.

 

So tonight I set it to record the movie "Fargo" at 22:00.

 

Event viewer starts logging a change to the system time (from the time it went to sleep to current) at 21:52:29

at 21:52:38, it reports that the system has resumed from a low power state.

At 21:53:00 the Emby wake for record task runs and if finishes at 21:53:05 marked as successful

at 21:54:50 the event viewer reports the system entering sleep - reason system idle.

 

I have a two minute padding set at the start of the recording and I believe Emby is meant to start up 5 minutes before program start so that ties in with 21:53:00 for a 22:00:00 programme start.

 

So it seems that something in Windows is deciding that the computer is idle after just 2 minutes when the sleep timer is set for 1 hour.

 

I have the logs - although just standard - not set to debug- if they will help.

 

I think I may have seen a thread about this on the forum somewhere so off to look for it now.

Link to comment
Share on other sites

maegibbons

Yes sounds as though windows is shutting back down before the recording starts.

 

Logs little use as this sounds like windows sleep timeout issue.

 

Keep digging.

 

Krs

 

Mark

 

A 'like' is always appreciated!

Link to comment
Share on other sites

muzicman0

You might check this out:

 

https://www.tenforums.com/tutorials/72133-add-system-unattended-sleep-timeout-power-options-windows.html

 

See if you can lengthen the unattended sleep timeout. As I understand it, this is a different setting than the normal sleep.

 

EDIT: I followed the tutorial, and my unattended sleep timeout is 2 minutes.  My PC never goes to sleep, so this isn't an issue for me, but it is probably what is causing your issue.

Edited by muzicman0
Link to comment
Share on other sites

emg456

You might check this out:

 

https://www.tenforums.com/tutorials/72133-add-system-unattended-sleep-timeout-power-options-windows.html

 

See if you can lengthen the unattended sleep timeout. As I understand it, this is a different setting than the normal sleep.

 

EDIT: I followed the tutorial, and my unattended sleep timeout is 2 minutes.  My PC never goes to sleep, so this isn't an issue for me, but it is probably what is causing your issue.

 

Thanks for that- I was actually already diving down that particular rabbit warren! You're correct it seems to be set to two minutes as standard. I extended it to 30 min but what happens then is that the server still goes back to sleep after thirty minutes so Emby starts its recording and then is rudely interrupted by the server going back to sleep!

 

So it seems that if the computer has been woken by some procedural method - timer or wake on Lan, say- but there is no interaction to suggest human intervention- mouse movement or keyboard input- it will simply go back to sleep after the unattended sleep timer has completed.

 

I am gradually getting to the bottom of this so that's good but there are still some mysteries, one being that the Emby wake task I mentioned above to record the Movie "Fargo" actually woke the computer *again* last night - 24 hours after it first ran! I'll be watching to see if it does it again tonight.

Link to comment
Share on other sites

  • 2 weeks later...
emg456

OK, so I lost the will to live over this for a while but am now ready to proceed with more testing.

 

I amended the unattended sleep time out and also changed the display timeout so that the display never switches off. Between all the tinkering I have done, the computer now seems to reliably wake from sleep to perform an emby recording. It also stays awake for at least the duration required for the recording. This is regardless of whether I have set the recordings from a local or remote desktop login so yes, it seems the RDP issue was a red herring.

 

Problem now is that whilst all this goes according to plan, Emby does not make the recording. I am sitting beside the computer just now having set it to record a movie which is on just now. Emby server shows the movie in the live tv screen with a red dot signifying that it is set to record but there is no disk activity and nothing really happening.

 

I ran some test recordings during the week using the Hauppauge Win TV 8.5 app and all were recorded flawlessly so the problem seems to be with Emby.

 

Is Emby generally reliable at this or should I just accept recording using Win TV?

Link to comment
Share on other sites

maegibbons

Hi

 

I record from HD Homerun and IPTV using emby and it is very reliable.

 

Something still not quite right with your setup but you need help from Haupagge users really.

 

krs

 

Mark

Link to comment
Share on other sites

PenkethBoy

Hauppauge tuners work fine with emby - i have three usb dual channel tuners

 

wintv 8.5 needs to be on the same pc as the emby server - but i suspect it is or you would not have been able to detect them

 

when doing a recording look in your recording directory for the movie or episode and go into the appropriate folder and you should see the ts file increasing in size over time

 

wintv has its own temp directory so the transcoding-temp directory is not used

 

go to (while recording) C:\Users\Public\Videos\Pause Buffer and you will see ts files being created - these go away after the recording finishes

 

if you still dont get recordings then you need to post logs from the time of the recordings so the devs can see what the issue might be

Link to comment
Share on other sites

emg456

Ok thanks - I'll try that. And yes, WinTV and Emby server on the same pc.

 

Hauppauge tuners work fine with emby - i have three usb dual channel tuners

 

wintv 8.5 needs to be on the same pc as the emby server - but i suspect it is or you would not have been able to detect them

 

when doing a recording look in your recording directory for the movie or episode and go into the appropriate folder and you should see the ts file increasing in size over time

 

wintv has its own temp directory so the transcoding-temp directory is not used

 

go to (while recording) C:\Users\Public\Videos\Pause Buffer and you will see ts files being created - these go away after the recording finishes

 

if you still dont get recordings then you need to post logs from the time of the recordings so the devs can see what the issue might be

Link to comment
Share on other sites

emg456

Ok thanks to all who have chipped in on this so far.

 

Computers can be infuriating things. I have made no changes to the setup of the system since the end of April but apart from one hiccough at the start, the computer has woken every time to record scheduled programmes and has remained awake and executed the recording succesfully. 

 

Each time however, the recording has missed about 5 minutes at the start of the programme. Looking at the Emby server logs it would appear that Emby is restarting itself for some reason. That closes one log file. At the start of the next log file, Emby makes the recording but we've already missed the start of the show.

 

How do I post the logs here so that someone can have a look at them?

Link to comment
Share on other sites

emg456

Oh- one other thing I forgot to mention is it seems to sometimes wake up again 24 hours after a scheduled recording - the same task is quoted as the source for the wakeup, even although it was for the previous day.

Link to comment
Share on other sites

emg456

RTFM lol! Here are the logs.

 

This was to record the movie "Hidden Figures" yesterday (4th May) at 21:00. I have a 2 minute start buffer set. The Wake process started on the computer at just after 20:52 so the pc was fully woken before 20:53

 

embyserver-63724223057.txt This is the log with the restart at the end.

 

embyserver-63724233600.txt This is the log after the restart where the recording actually took place.

 

 

Link to comment
Share on other sites

  • 1 month later...
emg456

Still having trouble with this.

The pc now wakes from sleep for recordings but Emby does not make the recording. PC goes back to sleep after unattended idle time- I have it set for 30 minutes atm.

Next time the pc starts, Emby tries to make the recording but of course, the program has ended.

This file had a recording set for "The Chase" at 17:00. The pc woke up for the recording at 16:58 and was awake till 17:46. Emby tried to run the recording when I started up the pc at 22:07.

embyserver.txt

Link to comment
Share on other sites

Check something for me.  This will sound dumb but please check anyway.

Set a test recording and let the computer go to sleep.  As soon as it wakes up:

1 Check the date/time of the computer in windows.  It should be correct but I've seen a problem before with this.

2. Log in to the admin console and start watching the show/movie that is set to record.

Let me know what happens.

Carlo

Link to comment
Share on other sites

emg456

Thanks Carlo for responding.

The computer shows the correct time. Just about the first log in event viewer on wakeup is the system time being reset using the real time clock so that seems good.

I could watch the show which was being recorded but the timer for that show didn't fire up till I started watching it so the recorded version missed the first few minutes. 

Also, the Embyserver log entries start at the exact time the show should have started- not when the PC woke up about 7 minutes earlier- seems odd to me.

I think I'm going to uninstall Emby, purge it from the registry and run a fresh install. Now that my power settings are better optimised for the sleep/wake/sleep cycle, we'll see how it goes from there.

Link to comment
Share on other sites

emg456

Thanks.Uninstalled and re-installed accepting most of the defaults.

Have tried 7 scheduled recordings so far. PC woke on time for each one and stayed awake long enough to let Emby start doing its thing.

First show - missed the start, recorded to the end.

2nd show didn't record

third/fourth (two consecutive news shows) Didn't record.

Fourth - no viable file recorded - ie error generated on playback

Fifth, Sixth, both recorded with about the first 20 minutes missing - these two were showing simultaneously on two different channels.

Today, the pc woke up for the timer to record the 2nd show above- ie 24 hours and about 15 minutes late.

As I say, the pc was awake in time for each recording.

Will try and have it on, waiting for the scheduled recordings this evening to see how that goes.

Machine is i7 7700, 16Gb Ram, 512Gb ssd system drive - should be more than up to the task.

What logs will I need and do I need to enable more detailed logging?

Link to comment
Share on other sites

Can you do this again and provide logs for @Luke to take a look at?

 

Thanks,

Carlo

Link to comment
Share on other sites

emg456

Ok - the machine has broadly behaved itself since I last posted but here's the first failure.

A recording timer was set for the movie "Almost Famous" at 00:40 this morning.

The server was running at the time playing back the movie "Earthfall" to the Amazon FireTV client.

When I looked just now, Almost Famous was shown in recent recordings but when clicked to play gives the Error "No compatible Streams are currently available"

Server log file is attached.

embyserver.txt

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...