Jump to content

'transcoding-temp' folder size increasing when not transcoding


Recommended Posts

Posted

I've been attempting to watch two 4K movies on my Samsung Q70. I've ensured that subtitles are off (because Emby will start transcoding the video when subtitles are enabled) and you can see from the picture below that it is not transcoding. However, I can visually see the free space on my SSD going down about 1GB/4 seconds when the movie is playing (and I've traced it back to the 'transcoding-temp' folder). When I exit out of the movie on my TV, that directory gets cleared. Windows is only installed on a 128GB SSD at the moment and this problem is causing my SSD to hit 0 bytes free. When this happens, I start to notice buffering on the TV. 

Also, I thought this may be related so I posted a picture of it: usually when the SSD hits 0 bytes free and there is a scene change in the movie, you will see a distorted image like below. The audio will continue to play in the background. The picture will not remain static, it will continuously change, not very drastic changes though. The video will never successfully proceed to the next scene. Even if I exit the video and fast forward to the time index, the aforementioned folder will once again consume the free space on my disk and the same problem will arise (still uncertain if this would occur if I could immediately seek to the timeframe, but for some reason I'm only able to do 10sec increments which takes forever because I have to wait for each buffer). 

I'm going to try to workaround the problem for the time being by hosting my appdata folder on a larger drive, but why is this 'transcoding-temp' folder continuing to increase in size when Emby is not transcoding?

Also, is the distortion from scene changing (usually around the 5-minute mark of the video) likely due to the lack of free space on the drive? I can confirm that the source files are intact. 

20201110_140551.jpg

20201110_140620.jpg

Happy2Play
Posted (edited)

The image show DirectStreaming, so the transcoding-temp folder is being used.  This folder is used no matter the playback method unless a true direct playback is being done.  If the server does a http direct play the folder is used also.

https://support.emby.media/support/solutions/articles/44001920144-direct-play-vs-direct-streaming-vs-transcoding

You will need to relocate the transcoding-temp to a larger drive.  Dashboard-Transcoding "Transcoding temporary path"

Edited by Happy2Play
Posted (edited)

@Happy2Play I appreciate the quick reply! Apologies for the misunderstanding. This modification fixed the problems with the stuttering but unfortunately the video corruption persists at the same time index on both movies. I also notice that right after this problem appears, the size of the transcoding-temp folder remains constant, almost as if the video processor has given up.

Does Emby currently have difficulty playing 4K content? 

EDIT: This problem is not present when playing over http

Edited by Crusher21
Happy2Play
Posted

There are topics across all client in reference to 4K.  Pretty sure it has to do with the HLS delivery method.  If the item direct plays there usually are no issues.

So from what you have provided, do you see this issue playing a item that has a supported video and audio track?

Posted

I'm not so sure about that. I had also tested another 4K movie with the same video codec (different audio codec though) that was playing in DirectSteam mode and didn't encounter any problems. Also, the problematic files can play past this timeframe when transcoding over http...although it did take two attempts. On the first attempt, slightly before the usual freeze timestamp it permanently froze without indicating that it was buffering (but CPU stayed at 100%). I refreshed and restarted the video, but none of the player options would appear like closed captioning, settings icon, etc. I had to restart the Emby server itself. On the second try, I seeked to 30 seconds before the problematic time index and was able to make it to the next scene successfully. 

I will see if I have one with supported audio and video to test.

Posted

@Happy2Play I believe I have identified the issue. The problem is not with the video codec, it is the audio codec. As you suggested, I tried to find a source file that would not require transcoding. I was not able to find one but I found one that did not require the audio codec to be transcoded (see details in the picture below). The file played perfectly using built-in AC3 audio. For fun, I tested again with the DTS-HD MA 7.1 codec and once again ran into the same problem. Both problematic files use this codec. The file that did not have a problem used TRUEHD 7.1.

Is this a bug that can be looked into?

20201110_174830.jpg

FrostByte
Posted (edited)

This is a known issue with the Samsung app when converting HD audio or DTS with 4K.  For best results you will want an alternate audio track in all your 4K which your TV supports so that it Direct Plays.  I.e. no HD audio, or DTS at all if your TV is 2018 or newer

Edited by FrostByte
  • Like 1
Posted

@FrostByte Thank you for the information! Is a fix for this issue currently being worked? The majority of my 4K videos do not have AC3 audio. 

Happy2Play
Posted

Was looking for topics referencing this 

  

On 11/5/2020 at 2:55 AM, SamES said:

The problem with this file is that the Atmos track will need converting, so the file will be HLS Streamed, which is a problem for 4K high bitrate HEVC files.  Playback performance will be unacceptable.

Is there another track (not Atmos, TrueHD or DTS) that you can select for audio?

 

Posted

@Happy2Play Would the performance hit be due to high CPU/GPU usage? It's weird because the first 5 minutes of the videos play just fine with seemingly no bottleneck. Is there an upcoming fix/workaround for this? 

 

FrostByte
Posted
5 minutes ago, Crusher21 said:

@FrostByte Thank you for the information! Is a fix for this issue currently being worked? The majority of my 4K videos do not have AC3 audio. 

I'm not aware of any fix and I've got the latest .86.  I'm slowly adding a DD+ track to all my 4K which because I prefer things to direct play anyway.  SamES is one of the devs who made the comment H2P just posted though which I think is in the Samsung section of the forum.   You could tag him and Luke

Happy2Play
Posted

Only a dev can answer this but the issue with 4K media has been around quite awhile and I don't see it going away any time soon (just my opinion) If the media does not Direct Play these issues will be different on each client/app/device.

FrostByte
Posted

There is another post by SamES somewhere and he associated the problem with the TV and not the server.  Even people with high end servers have noticed it.  The higher the bitrate of the input the more prominent the problem.  So a 4K remux will be worse than a reencode.

FrostByte
Posted

One way around the issue may be to pass the direct link like ATV can do, but I'm not sure that is even possible with Tizen

Posted

I'm hoping in the future Samsung and others will pay for the licensing to be able to direct play these codecs. I'm going to test to see if Plex suffers from the same problem to see if it really is the TV. It seems so sudden, my workstation can tackle the 4K movie without any problem up until this (even with the transcoded audio), so I don't understand why it would be a performance issue. I've been using plex for a few months and am hoping to switch to Emby. I like Emby a lot better, just trying to iron out quirks here and there. I never actually used plex for 4k movies because it kept buffering (now I see it was due to free disk space being at 0).

@SamES @Luke Sorry to include you guys on a long thread, but do you know if any progress is being made regarding a fix/workaround for transcoding of HD/DTS audio for 4K HEVC files? 

Posted

@FrostByte @Happy2Play I tested this scenario on plex with the same source files and did not encounter the same problem. I did not test the entire movie but it did not suffer around the same time index.

Posted
5 hours ago, Crusher21 said:

@FrostByte @Happy2Play I tested this scenario on plex with the same source files and did not encounter the same problem. I did not test the entire movie but it did not suffer around the same time index.

I believe that the issue is that the current method we use for HLS streaming is not optimised (or recommended) for 4K content.  Whenever HLS is used for playback (DirectStream or Transcode) some 4K or HEVC video streams have issues being segmented, which results in the issues you have described.

There is always a lot of work going on in the background on the server to improve transcode and directstream playback, so I'm sure in this will be improved over time.

  • Like 2

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