Jump to content

Transcoding-Temp Folder


davedick

Recommended Posts

davedick

I noticed that my Windows drive available space was around 100 GB free (Drive capacity is 500 GB).  Which, I determined that a little of 300 GB is coming from the Transcoding-Temp folder.

 

When I look at the file dates (which most happen to be this week).  While the Emby DVR would have been recording shows, and I added some shows to the libraries, we haven't been watching any media thru Emby this week (except on Sunday for Football).

 

What would cause Emby to create files in the Transcoding-Temp folder based on what I described above and shouldn't these file have been automatically deleted?

 

I did a restart on the server and the files started to delete, however i never seen temp transcoding files build up.

 

 

embyserver-63711705600.txt

Link to comment
Share on other sites

So during the times of the recordings you'll see home high disk usage in that folder. That is where the live TV buffer is stored when a stream is opened.

Link to comment
Share on other sites

bardmaster

Hi - I have the same issue in a high-speed NVME M.2 SSD dedicated to temp processing files and TV recordings.  This actually has been haunting me since upgrading from 4.0.3 but I was wondering if it had something to do with my setup.

 

My symptoms:  Video files (largely live TV but also saved AVC files) would stop during replay with the "Processing" bar.  Sometimes they would resume after 5-10 seconds, but then later they would just freeze.  After a lengthy amount of time I would get the error "Video Error: No Streams Were Provided for Playback" per this thread I started:  https://emby.media/community/index.php?/topic/73356-video-error-no-streams-were-provided-for-playback/

 

Just a week ago I uninstalled that version, cleared out all settings and deleted all files related to Emby, and performed a clean install.  But now I am getting the lockup as a result of no more space being available on my 1TB M.2 drive.  Keep in mind this is an alternate cache location from the default.

 

Here are my specs:

 

Emby Server 4.3.0.30

OS: Windows Server 2016 Essentials (64-bit)

Processor: Intel i7-4790 @ 3.60GHz (4 cores/8 threads)

RAM: 24GB

 

transcoding-temp: 685 GB from 163,766 files in 1 folder (after 1 week)

cache: 372 MB from 60,333 files in 26,129 folders (this looks a bit more normal)

 

Normally I would attach some logfiles but as this is a long-standing recurring event all I'm going to attach is the screenshot of the logfiles that were saved before I shut the Emby Server down, and will look to @@Luke and @@ebr for advice!

 

post-206588-0-03094300-1576635716_thumb.jpg

Link to comment
Share on other sites

davedick

Can you please clarify on how the file creation in the temp transcoding folder works and if/when the temp files should be deleted ?

 

For example, I'm seeing a 50 GB file with date/time 12/16 5:55 pm and a 29 GB file with date of 12/17/19 5:55 AM.   There are about 10 other files created since the first 2 I mentioned with the next actual sized file, being 13 GB, dated 12/17/19 2:25pm

 

I do record a bunch of shows, with some being back to back on the same channel, or multiple being on different channels, etc, with record time buffer being set to 5 min before and 5 min after

 

More recently dated and timed files would make sense to see, but I would expect by now that the 50 GB file would have been deleted by now, especially if there are times when Emby isn't recording any shows and there was no playback requested.

Link to comment
Share on other sites

bardmaster

Did you have a live stream open during that time?

Which time?  This massive accumulation of temp files occurred over the course of about a week.  We do not keep live TV running constantly, if that is your inquiry, nor do we fall asleep to live TV.

 

This accumulation ends up filling up my SSD and then nothing functions properly.

Link to comment
Share on other sites

  • 2 weeks later...
bardmaster

Are you still running into this with emby server 4.3.1?

Yes this also happened with 4.3.1 - but...

 

PROBLEM IDENTIFIED!  The "transcoding-temp" folder does not purge if you have changed the default temporary path in Transcoding settings.  Once I switched this back to default, the folder is cleared after every transcoding session is completed.

 

This was the case with both my Windows Server 2016 Essentials build as well as a Windows 10 x64 test system.

 

I am now running 4.3.1 on my "prod" server and all's well.

Link to comment
Share on other sites

bardmaster

Yes this also happened with 4.3.1 - but...

 

PROBLEM IDENTIFIED!  The "transcoding-temp" folder does not purge if you have changed the default temporary path in Transcoding settings.  Once I switched this back to default, the folder is cleared after every transcoding session is completed.

 

This was the case with both my Windows Server 2016 Essentials build as well as a Windows 10 x64 test system.

 

I am now running 4.3.1 on my "prod" server and all's well.

Update: I may have spoken too soon...that folder is no longer purging and is at 15GB after 2 days.  I am considering writing a simple script for Task Scheduler to purge it (and the cache folder, for good measure) on a nightly basis.

 

Not a scientific conclusion, but it does appear to be filling up much more slowly than it did when I had a custom folder location defined.

Link to comment
Share on other sites

davedick

From what I can tell with the current Emby version, the amount of space used in the transcoding temp folder is smaller, however it still shows files with date stamp from a couple of days ago and longer.

 

I have attached how the folder currently looks.   While most of the files are 0 in size, I would think those would have been deleted.

 

To be clear there hasn't been any live tv viewing or media watching.  The usage has been strictly DVR recording.

post-7566-0-50075200-1578521106_thumb.jpg

Edited by davedick
Link to comment
Share on other sites

roormonger

I have had this problem for a while now. I made this batch file to clear two of the Emby temp folders. I used the scheduler in windows to run it every twelve hours.

;@[member="Echo"] off
set folder="C:\Users\[USERNAME]\AppData\Roaming\Emby-Server\programdata\cache\temp"
IF EXIST "%folder%" (
    cd /d %folder%
    for /F "delims=" %%i in ('dir /b') do (rmdir "%%i" /s/q || del "%%i" /s/q)
)

set folder="C:\Users\[USERNAME]\AppData\Roaming\Emby-Server\programdata\transcoding-temp"
IF EXIST "%folder%" (
    cd /d %folder%
    for /F "delims=" %%i in ('dir /b') do (rmdir "%%i" /s/q || del "%%i" /s/q)
Link to comment
Share on other sites

bardmaster

 

I have had this problem for a while now. I made this batch file to clear two of the Emby temp folders. I used the scheduler in windows to run it every twelve hours.

;@[member="Echo"] off
set folder="C:\Users\[USERNAME]\AppData\Roaming\Emby-Server\programdata\cache\temp"
IF EXIST "%folder%" (
    cd /d %folder%
    for /F "delims=" %%i in ('dir /b') do (rmdir "%%i" /s/q || del "%%i" /s/q)
)

set folder="C:\Users\[USERNAME]\AppData\Roaming\Emby-Server\programdata\transcoding-temp"
IF EXIST "%folder%" (
    cd /d %folder%
    for /F "delims=" %%i in ('dir /b') do (rmdir "%%i" /s/q || del "%%i" /s/q)

Great script.  If you are looking for full automation and have EmbyServer running as a service (which I do on my Windows Server 2016 Essentials), one also needs to stop the server in order to delete any currently-locked files.

 

My biggest problem is a single file that starts with the first transcoding session post-server startup, is locked by EmbyServer, and continues to grow in size.  I have attached a screenshot of the latest one which started this morning at 5:59am, which is when my wife started watching Live TV.  This is after my purge script ran at 5am and cleared out the folder.  It is already nearly 7GB in size!

 

So I created the below batch script that stops the service, waits 2 minutes for EmbyServer to close (it lingers for a bit), deletes both "transcoding-temp" and "cache" folders (which recreate automatically when EmbyServer needs them), then restarts the service.  Add to Windows Task Scheduler with "highest privileges" and make sure to put the script's folder location in the "Start in (optional)" field as this is essentially still old-school DOS scripting.

 

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]
 
As a research note: This issue started after EmbyServer 4.0.3 which was stable.  I had confirmed this by taking a backup and overwriting all the contents of [uSERNAME]\AppData\Roaming\Emby-Server\system and the problem went away.
 
Secondary research note:  I also did this because of another issue, possibly related not sure, where Live TV would frequently fail with a cryptic message per this thread: https://emby.media/community/index.php?/topic/73356-video-error-no-streams-were-provided-for-playback/).
 
I do hope our friends at Emby can figure out the issue soon, as I hate being left behind in versions but also dislike having to develop custom workaround fixes like this one.  I have faith in @@ebr, @@Luke, and the gang!  :)

post-206588-0-11508000-1578597838_thumb.jpg

Edited by bardmaster
Link to comment
Share on other sites

  • 2 months later...
Leondarkfury

I am also having an issue with the Transcoding folder not self purging. I am running Emby 4.4.0.40, and running my temp location in a RAM drive. I used to use Plex, so I kept the same 5GB drive for Emby. It seems to continue to fill up and never clear. 

 

My server is running on a Windows 10 Pro machine, and I am streaming on a Roku 4 Ultra or my LG V35 ThinQ smartphone. When I finish the video, I back out and move to the next video. 

Edited by Leondarkfury
Link to comment
Share on other sites

I am also having an issue with the Transcoding folder not self purging. I am running Emby 4.4.0.40, and running my temp location in a RAM drive. I used to use Plex, so I kept the same 5GB drive for Emby. It seems to continue to fill up and never clear. 

 

My server is running on a Windows 10 Pro machine, and I am streaming on a Roku 4 Ultra or my LG V35 ThinQ smartphone. When I finish the video, I back out and move to the next video. 

 

Hi there, can we please look at an example of what's not clearing? Thanks !

Link to comment
Share on other sites

  • 2 weeks later...
Leondarkfury

Hi there, can we please look at an example of what's not clearing? Thanks !

I gave myself more RAM space for the temp drive, and pushed out the most recent Windows patches. It appears to be working now, but it if comes back I will post what I am seeing, thanks!

Link to comment
Share on other sites

  • 2 weeks later...

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