Jump to content

How to manage transcoding-temp file size?


Go to solution Solved by Carlo,

Recommended Posts

eveready1010
Posted

I have a Roku Ultra (4660R), HDHomeRun CONNECT QUATRO (HDHR5-4US) and Emby Server on the latest version (4.4.2.0), and Emby keeps trans-coding after all streams have ended.  I stopped watching channel 55.4 H&I at approximately 2:00PM EST, and the files keeps accumulating in the temp folder.  To see if it was the Roku doing this, I loaded my HDHomeRun built in web page and the status did show that Channel 55.4 was still being used on Tuner #1.  So I unplugged the Roku and then rechecked the HDHR page and it still was being used and the files were still accumulating.  Hopefully the two log files are enough, if not let me know.

 

This seems to happen no matter what Live Channel I watch and how I end watching on the Roku...  I can press the back button on the remote, the home button, but it does seem to be primarily when I watch on the Roku.  Haven't tested mush with streaming to a browser as that is not my main method of watching.

 

Any help or suggestions would be appreciated.

 

Thank you.

post-281075-0-11297600-1586631810_thumb.png

post-281075-0-70171900-1586631817_thumb.png

ffmpeg-directstream-7161eb97-dc1a-486d-938d-e1873d17b643_1.txt

embyserver.txt

Posted

I have a Roku Ultra (4660R), HDHomeRun CONNECT QUATRO (HDHR5-4US) and Emby Server on the latest version (4.4.2.0), and Emby keeps trans-coding after all streams have ended.  I stopped watching channel 55.4 H&I at approximately 2:00PM EST, and the files keeps accumulating in the temp folder.  To see if it was the Roku doing this, I loaded my HDHomeRun built in web page and the status did show that Channel 55.4 was still being used on Tuner #1.  So I unplugged the Roku and then rechecked the HDHR page and it still was being used and the files were still accumulating.  Hopefully the two log files are enough, if not let me know.

 

This seems to happen no matter what Live Channel I watch and how I end watching on the Roku...  I can press the back button on the remote, the home button, but it does seem to be primarily when I watch on the Roku.  Haven't tested mush with streaming to a browser as that is not my main method of watching.

 

Any help or suggestions would be appreciated.

 

Thank you.

 

We're looking into this. Thanks.

Posted (edited)

Hopefully it will be sooner than

https://emby.media/community/index.php?/topic/57071-hisense-smart-tv/?hl=hisense

 

currently 3 years and counting

 

I gave up waiting for that one, bought a Roku, only to be plagued by the tanscoding-temp folder size issue

 

eveready1010 why not use the roku HDHomerun app for live tv and bypass using Emby

Your HDHomerun tuner seems to be on the supported list

Edited by waughd
Posted

Hopefully it will be sooner than

https://emby.media/community/index.php?/topic/57071-hisense-smart-tv/?hl=hisense

 

currently 3 years and counting

 

I gave up waiting for that one, bought a Roku, only to be plagued by the tanscoding-temp folder size issue

 

eveready1010 why not use the roku HDHomerun app for live tv and bypass using Emby

Your HDHomerun tuner seems to be on the supported list

 

Hi, we're happy to help. Can you please go over an example? Thanks.

Posted

Luke has already mentioned that this is something that will be addressed in an upcoming release and there will be better management of this directory which could even allow it to run on large ram discs or small SSD drives (when updated).

 

Is there any chance we could use multiple locations? Like a primary location on ram disk with a fallback to ssd / hdd?

Posted

Is there any chance we could use multiple locations? Like a primary location on ram disk with a fallback to ssd / hdd?

That's always possible, yes, but it there is an issue of things not getting cleaned up, then we'd like to look at that first.

  • Like 1
Posted (edited)

Hi, we're happy to help. Can you please go over an example? Thanks.

Ok after a reboot of the win server 2019  running Emby the folder had 150GB cleared out

it stayed this way until yesterday I watched 5 secs of one livetv channel through Emby from my HDHomerun tuner

I exited Emby using Roku control

since then the .ts file in transcoding-temp folder has continued to grow it is currently at 78GB

I have opened  Emby and exited again to no avail

what more info do you need?

 

Also played livetv from a browser through Emby when finished there is a residual .ts file that grows each time I play and stop viewing livetv

Edited by waughd
Posted

Ok after a reboot of the win server 2019  running Emby the folder had 150GB cleared out

it stayed this way until yesterday I watched 5 secs of one livetv channel through Emby from my HDHomerun tuner

I exited Emby using Roku control

since then the .ts file in transcoding-temp folder has continued to grow it is currently at 78GB

I have opened  Emby and exited again to no avail

what more info do you need?

 

Also played livetv from a browser through Emby when finished there is a residual .ts file that grows each time I play and stop viewing livetv

How did you stop playing exactly?

Posted

How did you stop playing exactly?

In browser I simply went back with arrow at top left of emby screen (not browser back button)

all the small .ts files and .ts.tmp as well as .m4u8 are all removed at that point

 

However as of this morning after another Emby shutdown and restart all seems to work fine, all files are cleaned for Roku as well as browser livetv

Posted

In browser I simply went back with arrow at top left of emby screen (not browser back button)

all the small .ts files and .ts.tmp as well as .m4u8 are all removed at that point

 

However as of this morning after another Emby shutdown and restart all seems to work fine, all files are cleaned for Roku as well as browser livetv

Ok, if it happens again, please attach the emby server log from when you did that. thanks.

Posted

Thanks will do 

So far so good

  • 1 month later...
flexage
Posted

Just wanted to drop a note here to say that I've just noticed some similar behaviour.

 

The other day I picked up a HDHomerun 4 Tuner box for use in the UK, and briefly played a few channels to test.

 

Haven't really used it since until today. Played around 20 mins of live tv across a couple of channels to test timeshifting.

 

In general, I'm extremely pleased with how well the HDHR works with Emby: the guide is fully populated, and packed with metadata/icons.

 

The tuning speed and playback/timeshifting responsiveness is great, much better than the TVHeadend with DVB-S card playback experience I was getting with Emby, which would fail all over the place.

 

It's really great!

 

That being said, I just noticed that over the last 4 days since I added the HDHR to Emby, my transcoding-temp directory has grown to ~350GB in size... all Live TV stuff with the file dates covering the same 4 day period.

 

A quick restart of the Emby server app cleared out the temp directory, and it restarted so fast, it didn't even drop the playback on the transcoded stream that the wife was watching in bed. *phew*

 

As the situation in which all this happened wasn't very controlled, and because I wasn't initially looking for it, I can't provide any useful logs on this occasion, but if it continues to happen I'll attempt to grab some decent logs.

  • 3 months later...
Guest CodeCat5
Posted

I started seeing this a few weeks ago and added a scheduled task as suggested by someone else thinking that would resolve things, but I guess that doesn't help so much if a stream gets stuck or something? I just noticed my 500GB drive was nearly full and it looks like there's a 150gb and a 190gb file in the transoding-temp folder.

The oldest file was created on 9/8 at 9:43pm, so I started downloading logs that were timestamped a little before then which are all included in the attached .zip. I also just realized both files are still growing and my HDHomeRun status page shows 2 tuners currently in use, but there definitely hasn't been anyone watching live TV within the last few hours. Restarting the Emby server seems to have released the 2 tuners and deleted the files.

My Emby server is running on a Windows 10 PC and I'm pretty sure I would have been watching live TV on an Nvidia Shield when both of those files were created. It's possible the Sheild was put into sleep mode or I switched to a different app once I was done watching TV, but I've also used the Emby app to watch recorded files and other live TV channels since then.

Is there anything else that can be done to prevent this? Maybe a scheduled task to restart Emby every morning or something? I thought I'd be ok with the scheduled task to clear this folder and 500gb drive, but I guess it fills up pretty quick when 2 streams get stuck.

152gb.JPG

191gb.JPG

Emby-logs.zip

Happy2Play
Posted
5 minutes ago, CodeCat5 said:

I started seeing this a few weeks ago and added a scheduled task as suggested by someone else thinking that would resolve things, but I guess that doesn't help so much if a stream gets stuck or something? I just noticed my 500GB drive was nearly full and it looks like there's a 150gb and a 190gb file in the transoding-temp folder.

The oldest file was created on 9/8 at 9:43pm, so I started downloading logs that were timestamped a little before then which are all included in the attached .zip. I also just realized both files are still growing and my HDHomeRun status page shows 2 tuners currently in use, but there definitely hasn't been anyone watching live TV within the last few hours. Restarting the Emby server seems to have released the 2 tuners and deleted the files.

My Emby server is running on a Windows 10 PC and I'm pretty sure I would have been watching live TV on an Nvidia Shield when both of those files were created. It's possible the Sheild was put into sleep mode or I switched to a different app once I was done watching TV, but I've also used the Emby app to watch recorded files and other live TV channels since then.

Is there anything else that can be done to prevent this? Maybe a scheduled task to restart Emby every morning or something? I thought I'd be ok with the scheduled task to clear this folder and 500gb drive, but I guess it fills up pretty quick when 2 streams get stuck.

152gb.JPG

191gb.JPG

Emby-logs.zip 3.38 MB · 0 downloads

Does the Shield app not have a "Are you will watching" setting?  But I guess if the app is sleeping this would not have any affect on the server continuing to stream the item.

But yes if you schedule Emby to be restarted that will/should clear the transcode temp folder.

Posted

I am pretty sure I have had cache files remain even after stopping and restarting the server, but it has been awhile.  I am running Emby as a service on Windows Server Essentials 2016 and this script, kicked off every morning as a scheduled task, works perfectly for me:

 

clearembycache.cmd:

 

sc \\[ACTUAL SERVER NAME] stop [YOUR CUSTOM-BUILT EMBYSERVER SERVICE NAME]
timeout /t 120
del [FOLDER PATH]\cache\*.* /Q /S
rd [FOLDER PATH]\cache\ /Q /S
del [FOLDER PATH]\transcoding-temp\*.* /Q /S
rd [FOLDER PATH]\transcoding-temp\ /Q /S
sc \\[ACTUAL SERVER NAME] start [YOUR CUSTOM-BUILT EMBYSERVER SERVICE NAME]

 

Happy2Play
Posted
6 hours ago, bardmaster said:

I am pretty sure I have had cache files remain even after stopping and restarting the server, but it has been awhile.  I am running Emby as a service on Windows Server Essentials 2016 and this script, kicked off every morning as a scheduled task, works perfectly for me:

 

clearembycache.cmd:

 

sc \\[ACTUAL SERVER NAME] stop [YOUR CUSTOM-BUILT EMBYSERVER SERVICE NAME]
timeout /t 120
del [FOLDER PATH]\cache\*.* /Q /S
rd [FOLDER PATH]\cache\ /Q /S
del [FOLDER PATH]\transcoding-temp\*.* /Q /S
rd [FOLDER PATH]\transcoding-temp\ /Q /S
sc \\[ACTUAL SERVER NAME] start [YOUR CUSTOM-BUILT EMBYSERVER SERVICE NAME]

 

Cache files are cleaned up with a scheduled task that removes anything older then 30 days old.  The files are harmless and will get regenerates almost as fast as they are deleted.  Transcoding temp is the only issue and gets deleted on every Emby server start.

Posted

Whoops, yes that's what I meant - the transcoding temp has been the problem.  I just added purging of cache files for good measure! :)

Posted
16 hours ago, Happy2Play said:

Does the Shield app not have a "Are you will watching" setting?  But I guess if the app is sleeping this would not have any affect on the server continuing to stream the item.

Yes it does and this can help a lot with TV temp files.

  • 7 months later...
mchahn
Posted

I have a ROKU Ultra and HDHomerun and my server's disk just filled up after watching the Oscars 4 or 5 days ago.  It sure would be nice if this didn't happen.

Posted
2 hours ago, mchahn said:

I have a ROKU Ultra and HDHomerun and my server's disk just filled up after watching the Oscars 4 or 5 days ago.  It sure would be nice if this didn't happen.

Hi, we're looking into it. Thanks for reporting.

  • 7 months later...
Posted

Is it the future yet? ...checks transcode folder... nope!

This is still happening. Finished watching a live tv channel in Emby on a Roku last night (12/17) around 8:00pm. Exited live tv by using the back button and the exited Emby by using the home button. This morning, there is a 187GB (and growing!) file in the transcode folder. HDHomerun status page shows a tuner is in use (no is watching tv right now). The IP address locking the tuner is my UnRaid server that Emby is running on in a docker container.

This happens constantly. Restarting Emby clears the tuner and removes the files.

Server logs from yesterday and today attached. There are several ffmpeg logs from yesterday. I'm attaching the one with a time stamp around when I stopped watching.

 

 

embyserver-63775382400.txt embyserver(1).txt ffmpeg-directstream-0e8923a4-6638-4d76-b1c9-fe94ddc63d26_1.txt

Posted
On 12/18/2021 at 8:45 AM, frumpl said:

Is it the future yet? ...checks transcode folder... nope!

This is still happening. Finished watching a live tv channel in Emby on a Roku last night (12/17) around 8:00pm. Exited live tv by using the back button and the exited Emby by using the home button. This morning, there is a 187GB (and growing!) file in the transcode folder. HDHomerun status page shows a tuner is in use (no is watching tv right now). The IP address locking the tuner is my UnRaid server that Emby is running on in a docker container.

This happens constantly. Restarting Emby clears the tuner and removes the files.

Server logs from yesterday and today attached. There are several ffmpeg logs from yesterday. I'm attaching the one with a time stamp around when I stopped watching.

 

 

embyserver-63775382400.txt 34.52 MB · 0 downloads embyserver(1).txt 2.33 MB · 1 download ffmpeg-directstream-0e8923a4-6638-4d76-b1c9-fe94ddc63d26_1.txt 1.57 MB · 0 downloads

This should be improved with the upcoming Emby Server 4.7 release. Thanks.

  • Thanks 1

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...