Jump to content

Recording ended early


iiiJoe
Go to solution Solved by Luke,

Recommended Posts

pwhodges

You can run as many servers with a Premiere licence as you like - but note that the count of clients using a licence is aggregated.

Paul

  • Thanks 1
Link to comment
Share on other sites

iiiJoe
On 12/28/2023 at 11:36 PM, joekingcool said:

yes put it next to  system, programdata, recordings. outside of it. make sure your recording folder is recordings. later i will make so user can use custom settings. this is only for the seek to start error so far and joining the files when it gets a chance. if you want to search for that other error then use that monitor.exe file i gave you.

ill put the most updated files below. with a read me doc that should explain everything.

Recording_Cleanup.exe 2.9 MB · 0 downloads Recording_Monitor.exe 2.91 MB · 0 downloads Recording_Joiner.exe 2.89 MB · 0 downloads

read me.rtf 25.71 MB · 2 downloads nssm.exe 323.5 kB · 0 downloads install_service.bat 53 B · 0 downloads Emby Server.url 69 B · 0 downloads ServiceSecurityEditor.exe 430.29 kB · 0 downloads

How’s this working? Have you made any tweaks?

Link to comment
Share on other sites

joekingcool
6 hours ago, iiiJoe said:

How’s this working? Have you made any tweaks?

yes a little. i decided to go without making emby a service. the best way to shutdown emby is by using the curl cmd, although you need an api key from emby which is easy. but i got to update the code and the read me doc. 

to be honest im not sure its good practice to even restart pc with emby running. because it might just be closing the process instead of telling emby to shutdown. the problem there is it leaves the database open, vs closing properly. since emby don't have any cmd lines parameters like emby shutdown. so there is curl cmds which interact with the web browser and tell it to shutdown that way. 

but if you haven't tested my scripts yet. just wait for my next post 

ive been mostly working on another script which adds strm files from an apollo tv account so you have all the video on demand in emby. and making sure it gets all the meta data for each title. and what is the best method 

Link to comment
Share on other sites

iiiJoe
On 1/6/2024 at 9:48 PM, joekingcool said:

Very nice. I think I’ll be installing recording monitor this week. Will let you know how it goes. 

Link to comment
Share on other sites

joekingcool

just clearing up the config file a little.

first i forgot to put port number field in there on 4th line. each line has a customization for your situation, followed by a comma. the part after the commas is not used except for a description. so just change the part before the comma. 

E:\Emby-Server,                           location of system & programdata folders of your recording server
E:\Emby-Server\recordings,                   where your recordings are stored
your api key,         api key of your recording server
8096,             port number of your recording server

the part before the comma don't have any  spaces

you can place the app and config file where you like 

 

im going to work on tring to fix the other http errors as well. for example emby will keep recording but just give looped video threwout. ill try to catch it shortly after it happens then restart emby and hopes that it will clear up the stream. so instead of having a recording that just loops threwout, you might just lose a minute or two of the video. im thinking since they extended the try on keeping the stream alive, might not be the best method cause it might be force bad streams it cant figure out to just record. hopefully im making sense :)

  • Thanks 1
Link to comment
Share on other sites

joekingcool

Record_Season.exeRecording_Monitor.exe

i updated the monitor.exe so it don't error if you don't use the joiner.exe. also i have move the old log files to subfolder called backup. so when it periodically reads the logs its faster. 

i made an app that allows you to set recordings by season. example  from cmd prompt Record_season.exe "Big Bang Theory" "10" . it would then update your recordings to record all episodes in the guide at that time that are season 10 to manually record. so you could run it as scheduled task thru windows and then set emby guide to refresh 15mins later threw emby.  its not a perfect solution but i though useful. when i had channeldvr they had that feature. i cant get it to determine what you have in the library already though. so it will record duplicates etc. and if you run the joiner on auto then it would also join them. so that why i figured i need to make the joiner app optional. 

so at least now if the recording is junk i most likely will have another good copy of it. usually only want the most recent season. and recording 15 seasons of something in hopes of get the full last season had my dvr on overtime. maybe emby will implement this feature in the future. 

  • Thanks 1
Link to comment
Share on other sites

iiiJoe
On 1/10/2024 at 10:18 PM, joekingcool said:

Record_Season.exe 2.9 MB · 0 downloads Recording_Monitor.exe 2.91 MB · 0 downloads

i updated the monitor.exe so it don't error if you don't use the joiner.exe. also i have move the old log files to subfolder called backup. so when it periodically reads the logs its faster. 

i made an app that allows you to set recordings by season. example  from cmd prompt Record_season.exe "Big Bang Theory" "10" . it would then update your recordings to record all episodes in the guide at that time that are season 10 to manually record. so you could run it as scheduled task thru windows and then set emby guide to refresh 15mins later threw emby.  its not a perfect solution but i though useful. when i had channeldvr they had that feature. i cant get it to determine what you have in the library already though. so it will record duplicates etc. and if you run the joiner on auto then it would also join them. so that why i figured i need to make the joiner app optional. 

so at least now if the recording is junk i most likely will have another good copy of it. usually only want the most recent season. and recording 15 seasons of something in hopes of get the full last season had my dvr on overtime. maybe emby will implement this feature in the future. 

Just installed and used this morning. Starting recording a channel I know to be unstable and it worked! I have a couple of questions: it looks like your program erases the log files, is this to ensure that only the latest potential error message is detected? Also, I have not installed the Recording Joiner, does this run automatically or can it be run manually? 

This is outstanding work!! Thank you!

Link to comment
Share on other sites

joekingcool
1 hour ago, iiiJoe said:

 I have a couple of questions: it looks like your program erases the log files, is this to ensure that only the latest potential error message is detected? Also, I have not installed the Recording Joiner, does this run automatically or can it be run manually?

it shouldn't erase the logs but place them in a subfolder so that it don't scan the ones it dont need too.  like fixed and backup....

the latest monitor.exe will run the joiner.exe automictically if it detected failed seek to start error. the joiner then patiently waits till all ffmpeg processes are not running and emby is running. i think if i remember correctly i had it wait for minutes of no ffmpeg traffic while emby was running. before joiner started. 

im glad to see it helped :)

Link to comment
Share on other sites

iiiJoe
2 hours ago, joekingcool said:

it shouldn't erase the logs but place them in a subfolder so that it don't scan the ones it dont need too.  like fixed and backup....

the latest monitor.exe will run the joiner.exe automictically if it detected failed seek to start error. the joiner then patiently waits till all ffmpeg processes are not running and emby is running. i think if i remember correctly i had it wait for minutes of no ffmpeg traffic while emby was running. before joiner started. 

im glad to see it helped :)

Found them. They were in back up. Now I'm just waiting for errors, lol.

Edited by iiiJoe
  • Like 1
Link to comment
Share on other sites

iiiJoe

Update: I've had two failed recordings that successfully restarted. Yeah!! I also had one that didn't restart but it failed when I was recording another program and that program continued on. Should it matter if I'm recording multiple programs? Should this affect restarts?

  • Thanks 1
Link to comment
Share on other sites

joekingcool

Restarting emby while any recordings, should restart after emby starts back up.... As far as ice witnessed.... because emby does a good job of knowing wither the recording was finished...... Except in the seek to start failed....for some reason when it gets that error, it is marked completed and don't pick back up....

 

So yes if monitor finds failed , then it shuts down emby and changes only that recording back to in progress..... Like the other recording that are in progress..... Then when emby starts back up it looks for recordings that have that field...  So it should ....  

Can you clarify a little more on the situation of recordings , and which had seek to start error? And which continued to record and which didn't?

Sounds like maybe some progress though hopefully:)

Link to comment
Share on other sites

iiiJoe
1 hour ago, joekingcool said:

Can you clarify a little more on the situation of recordings , and which had seek to start error? And which continued to record and which didn't?

Sounds like maybe some progress though hopefully:)

Yes, apologies for not being more clear. Both recordings without seek to start error were successfully restarted and fully recorded. As a side note, one restart actually continued on for an additional (2) hours beyond the scheduled end point. It was supposed to be a (2) hour basketball game and turned into a total of (4) hours ( 2hrs of the original game and 2hrs of the next game) Which I wasn’t disappointed with at all since it got all of the game I wanted to record. 
The two that didn’t restart had the seek to start error (think I’m gonna abbreviate to sts error) but they both failed as I was simultaneously recording another program. I’ll test today with single recordings. 
You think it may be possible to incorporate the sts error into the restart program?

  • Like 1
Link to comment
Share on other sites

joekingcool

Agreed sts error ;)

So 2 had sts error, while other recordings were continuing. But monitor didn't restart emby and try to fix? Check log in script dir... I put basic info of transactions in there... Hope that helped.

Link to comment
Share on other sites

BoomerGamer62

@joekingcool, I would like to try your fix, but I have a question first.  In your read-me doc, you said:

this will search the log files for "seek to start failed" error every 5 seconds. find the video name in the log file. wait 30 seconds then shutdown emby. then update the status of that recording so it will continue after emby starts back up. 

Does this mean that if I happen to be recording five shows, and one errors out, then this will shutdown emby -- which  means all 5 shows will restart?  This would mean there would be gaps in 4 other shows that didnt need to happen because emby shut down.  Am I right or missing something?

My thanks for trying to solve this problem.  I use Apollo TV as well, and this has been bugging me for a long time.

Edited by BoomerGamer62
  • Like 1
Link to comment
Share on other sites

joekingcool

@BoomerGamer62

you got it.. its unfortunate, but i haven't found a way to determine which ffmpeg process is associated with each recording. on the positive side the other recordings will pick back up automatically. but yes all recording at that time will have the 1 min gap. 

also you can use the joiner app as well or not. just place next to the monitor app. the joiner will auto merge each spilt recording together, shortly after there is no usage of ffmpeg on emby. 

and since you use apollo, i made an app that keeps the strm files for movies and shows updated in emby , if you like?

Link to comment
Share on other sites

iiiJoe

Hats off to @joekingcoolfor all of your hard work on this issue. Wanted to give an update: all of my failed recordings that don’t have the sts error have restarted, which is great! I have had a couple of recordings that restarted and then ran double or triple the length they were scheduled. This is however, something I can live with. I just watch the part I wanted then delete, easy peezy. Can the sts error somehow be added to your program for restarts? 

  • Like 1
Link to comment
Share on other sites

iiiJoe
5 hours ago, BoomerGamer62 said:

@joekingcool, I would like to try your fix, but I have a question first.  In your read-me doc, you said:

this will search the log files for "seek to start failed" error every 5 seconds. find the video name in the log file. wait 30 seconds then shutdown emby. then update the status of that recording so it will continue after emby starts back up. 

Does this mean that if I happen to be recording five shows, and one errors out, then this will shutdown emby -- which  means all 5 shows will restart?  This would mean there would be gaps in 4 other shows that didnt need to happen because emby shut down.  Am I right or missing something?

My thanks for trying to solve this problem.  I use Apollo TV as well, and this has been bugging me for a long time.

I’m plan on installing a second Emby server on same machine but different folder so I can schedule recording of a certain program that almost invariably fails without interrupting my others recordings or live streams. This will, in theory at least, allow me to continue operating my primary server as usual.  

  • Like 1
Link to comment
Share on other sites

BoomerGamer62
3 hours ago, joekingcool said:

@BoomerGamer62

and since you use apollo, i made an app that keeps the strm files for movies and shows updated in emby , if you like?

yes,  that would be great.   thanks!

  • Like 1
Link to comment
Share on other sites

joekingcool
1 hour ago, iiiJoe said:

Wanted to give an update: all of my failed recordings that don’t have the sts error have restarted, which is great!

do you mean it fixed/recovered the sts error ones? if so the logs of the ones fixed for sts error will be the subfolder fixed all other log files are in subfolder backup...

1 hour ago, iiiJoe said:

I have had a couple of recordings that restarted and then ran double or triple the length they were scheduled.

i ran into this once... i seem to think its the timing of when the recording is interupted... say if its at the end but takes a min to restart the recording the recording might be over but the program already told it is in progress when it starts back up... i would need some logs / examples to look into further. but this is not to high on my list at the moment.. like you said i could live with that..

 

1 hour ago, iiiJoe said:

Can the sts error somehow be added to your program for restarts? 

im not sure what you mean.. cause that is what the monitor.exe is doing... it only restarts emby when it finds that error in any current recording. the other recordings that are recovering is up to emby and ffmpeg.. i haven't found any other recordings that failed so i could troubleshoot .. if you have other recordings failling maybe i can look at the logs and see what happened, and maybe program monitor.exe to catch those errors as well.. i did find errors in recordings that caused bad recordings but those recordings did finish and continue..  this is my next target though to catch those and sts errors and restart recordings.. 

i do put a shortcut in startup folder of windows for the monitor.exe so that it runs with emby. 

1 hour ago, iiiJoe said:

I’m plan on installing a second Emby server on same machine but different folder so I can schedule recording of a certain program that almost invariably fails without interrupting my others recordings or live streams.

i agree that's a good idea. just make sure you use a different port for that server. put that port number in the config file. and get the api key for that server and put in config file as well.  a second server should be as simple as copy and paste, for the most part. emby-server and emby-server2 next to each other. also remember the latest files i put up. can all be placed in there own folder and put where ever you want, just update the config file to locations of things for you setup. i know i need to explain more and eventually ill create a gui with all the apps and a settings tab to make more straight forward but it might be while for i get some extra time. 

 

1 hour ago, iiiJoe said:

Hats off to @joekingcoolfor all of your hard work on this issue.

im just glad to help :) and see some others benefit from it too not just me lol 

Link to comment
Share on other sites

joekingcool
24 minutes ago, BoomerGamer62 said:

yes,  that would be great.   thanks!

apollo.execonfig.apollo.txt

i didnt have time to sign app so it might throw warning from antivirus as not popular.. 

you put your user and password in config plus the locations of folders.

this will find a show or movies id based off what you type in search box. it will only give you the top result. which is it 90 percent of the time. if you put name of show plus the year, its always been right for me. once its selected you can download movie, 1 season , all seasons etc. the other part i talked about it updating streams. all you do is set the config and press the button to update movies or the button for shows.

let me know how it goes

edit: this one you just run and it updates both movies and shows based off the config file. no gui.

apollo.strm.exe

Edited by joekingcool
update file
Link to comment
Share on other sites

iiiJoe

Here' s a recording that failed last night with sts error. I didn't see that it tried to restart. I've attached the recording log, @joekingcoolyou see anything I need to possibly change? Also wondering if there's a way to trigger the restart process to watch the program do its thing? Or a way to look through recordings and logs to see which ones failed and then restarted. Also, I'm running windows 11, don't know if that matters

recording-conversion-74a0c4ff-9b51-426f-892b-b2be3e74bb60_1.txt

Edited by iiiJoe
attach file
Link to comment
Share on other sites

iiiJoe
4 hours ago, iiiJoe said:

Here' s a recording that failed last night with sts error. I didn't see that it tried to restart. I've attached the recording log, @joekingcoolyou see anything I need to possibly change? Also wondering if there's a way to trigger the restart process to watch the program do its thing? Or a way to look through recordings and logs to see which ones failed and then restarted. Also, I'm running windows 11, don't know if that matters

recording-conversion-74a0c4ff-9b51-426f-892b-b2be3e74bb60_1.txt 279.38 kB · 1 download

Another update: I’m only using the “record monitor.exe” and “config”  file. Does that one check for sts error, or is it another one?

Edited by iiiJoe
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...