Gabi92 0 Posted May 13, 2024 Posted May 13, 2024 Hi everyone. I´ve upgraded to premiere just to be able to use the gpu enconde and unlock other extra options, pretty nice. Now, here is my issue, i´ve a ram drive created of 512MiB in order to be used for emby transcode but it gets full in just secons for a 4K movie and it stops playing. The transcode keeps going but as the ram drive is full and emby doesn´t delete the old/already played files, it gets stuck until i stop the movie or i clean the directory by hand. Is there some workaround to solve it? Main idea about using the ram drive is to avoid wear in the main ssd as i use a proxmox server and there is no ssd dedicated for emby. Greetings
Happy2Play 9780 Posted May 13, 2024 Posted May 13, 2024 Probably need to see the server log for a specific example as cleanup do to disc space should happen unless there as say permissions issues or something else as I don't believe any testing is done on Ram Drives as all.
Lessaj 467 Posted May 13, 2024 Posted May 13, 2024 There's not really much reason to use a ram drive, it's not going to be any faster than using even standard hard drives. You concern for wearing out the SSD is noted but unless it's a really cheap SSD that's not likely going to be an issue. Also 512MB is way too small, you'll likely want as much free space as your largest file if not 1.5-2x that size (if it's HEVC/AV1) as it will store all the TS segments until the stream is completed, or if ffmpeg gets restarted - such as jumping further ahead in the file as there is currently buffer for.
Gabi92 0 Posted May 13, 2024 Author Posted May 13, 2024 3 hours ago, Happy2Play said: Probably need to see the server log for a specific example as cleanup do to disc space should happen unless there as say permissions issues or something else as I don't believe any testing is done on Ram Drives as all. Hi there., thank you for the fast response. I´ve attached both logs, embylog and transcode log. 1 hour ago, Lessaj said: There's not really much reason to use a ram drive, it's not going to be any faster than using even standard hard drives. You concern for wearing out the SSD is noted but unless it's a really cheap SSD that's not likely going to be an issue. Also 512MB is way too small, you'll likely want as much free space as your largest file if not 1.5-2x that size (if it's HEVC/AV1) as it will store all the TS segments until the stream is completed, or if ffmpeg gets restarted - such as jumping further ahead in the file as there is currently buffer for. Main idea is because my ssd is small (256 GB) and it´s shared across other CT and VMs inside proxmox so i don´t really have enought space to transcode a whole movie (bigger one it´s around 120 GiB) I was thinking that emby will just transcode few minutes before and ahead where i´m playing so i can move forward or backwards but in case that i want to jump let´s say 30 mins, then it will transcode the new time position. Main idea behind this kind of storare for me it´s to have something like that, "live" encode without using many disk space. Greetings embyserver.txt ffmpeg-transcode-a774fde9-c1c3-46ca-bd39-8921deadc320_1.txt
Happy2Play 9780 Posted May 13, 2024 Posted May 13, 2024 Not sure as it has an exited code 1. 2024-05-13 23:19:23.489 Info App: ProcessRun 'StreamTranscode a774fd' Process exited with code 1 - Failed Not really seeing anything else
Lessaj 467 Posted May 13, 2024 Posted May 13, 2024 If you enable throttling the buffer is ~2 minutes, otherwise it will go full tilt on the file from start to finish, wherever start may be, could be 30 minutes in. However from my observation the folder will continue to grow in size as long as the ffmpeg process is running so you'll need the space for it. Ideally your largest movie should be direct played anyway, so how much space you need exactly will vary based on your usage pattern with regards to transcoding.
sa2000 674 Posted May 13, 2024 Posted May 13, 2024 17 minutes ago, Happy2Play said: Not sure as it has an exited code 1. 2024-05-13 23:19:23.489 Info App: ProcessRun 'StreamTranscode a774fd' Process exited with code 1 - Failed Not really seeing anything else There is this error in the ffmpeg transcode log file - "No space left on device" [segment @ 0x1df2c80] Opening '/var/lib/emby/transcoding-temp/322800/322800.m3u8.tmp' for writing SegmentComplete=video:0 Index=145 Start=0.000000 End=435.393278 Duration=435.393278 offset_pts=0 start_pts=0 Frames=8 filename=322800_145.ts Error writing trailer of /var/lib/emby/transcoding-temp/322800/322800_%d.ts: No space left on device [segment @ 0x1a4ff80] Opening '/var/lib/emby/transcoding-temp/322800/322800_s5.m3u8.tmp' for writing It was about 40gb movie starting transcode at offset 7 min 15 seconds (segment 145 - 3 second segments) but the failure to write to the transcoding-temp directory was immediately on segment 145. 1
Happy2Play 9780 Posted May 13, 2024 Posted May 13, 2024 So I guess the question becomes why did segment deletion not happen? As it has written 144 segment already. Just like what does "Error writing trailer of" suppose to mean while playing "Cars" Also that is the default transcode-temp, correct? Just like the calculation would be way larger then 512MB for these 144 segments. So thing just do not add up here.
sa2000 674 Posted May 13, 2024 Posted May 13, 2024 (edited) 16 minutes ago, Happy2Play said: As it has written 144 segment already Do we have evidence of that ? A list directory of subfolders and files with filenames, sizes, last date/time modified would help here. Path being "/var/lib/emby/transcoding-temp" I just did a test starting playback with transcode and starting at an offset. The transcoding-temp directory just had segments starting with my offset Edited May 13, 2024 by sa2000
Happy2Play 9780 Posted May 13, 2024 Posted May 13, 2024 20 minutes ago, sa2000 said: 35 minutes ago, Happy2Play said: As it has written 144 segment already Do we have evidence of that ? Just the playing progress in the log continue 0-145 but looks like 'StreamTranscode xxxxxxx' is changing 13 times failing. But log also shows segments 129-145 failing.
TMCsw 248 Posted May 14, 2024 Posted May 14, 2024 WOW, WTF? The OP (probably is looking at the alternative software while you experts debate the technical side of this ) @Gabi92Can you try putting the temp-dir on an hdd if available? and see that works? (without running out of space or buffering..) Outer wise please give us your server specs. Also from what you have said so far you may need to spend some money (a little or a lot depends on several factors) on HW. So let's figure out the best way forward... I have been dabbling with Proxmox for a while...
Happy2Play 9780 Posted May 14, 2024 Posted May 14, 2024 1 hour ago, TMCsw said: WOW, WTF? The OP (probably is looking at the alternative software while you experts debate the technical side of this ) Sure as devs have already recommended against it. On 11/1/2021 at 2:20 PM, softworkz said: I'm afraid, but I have to disagree on that whole subject. With regards to using a RAM disk for transcoding-temp, I can only say: Don't ever do this! It's a very very bad idea! You don't even need an SSD for transcoding-temp, but (important!): It should be a local disk - no NAS, no SAN or anything like that. For a perfect setup, you'd have an average magnetic disk - but dedicated only for that single purpose. In a while, I'll come back and explain why. But no one can stop users from doing what they want. Just can say why the user is having issue of probably their own creation. 1
Gabi92 0 Posted May 14, 2024 Author Posted May 14, 2024 Thank you all for your time and your responses. 7 hours ago, Lessaj said: If you enable throttling the buffer is ~2 minutes, otherwise it will go full tilt on the file from start to finish, wherever start may be, could be 30 minutes in. However from my observation the folder will continue to grow in size as long as the ffmpeg process is running so you'll need the space for it. Ideally your largest movie should be direct played anyway, so how much space you need exactly will vary based on your usage pattern with regards to transcoding. I haven´t changed anything regarding the throttling, everything is on default settings, how can i change it? 6 hours ago, sa2000 said: Do we have evidence of that ? A list directory of subfolders and files with filenames, sizes, last date/time modified would help here. Path being "/var/lib/emby/transcoding-temp" I just did a test starting playback with transcode and starting at an offset. The transcoding-temp directory just had segments starting with my offset Let me do another test and i´ll attach a pic with the name of the files: 4 hours ago, TMCsw said: WOW, WTF? The OP (probably is looking at the alternative software while you experts debate the technical side of this ) @Gabi92Can you try putting the temp-dir on an hdd if available? and see that works? (without running out of space or buffering..) Outer wise please give us your server specs. Also from what you have said so far you may need to spend some money (a little or a lot depends on several factors) on HW. So let's figure out the best way forward... I have been dabbling with Proxmox for a while... I´ve tried to add it to an hdd with around 50 GiB and it works properly as it has enough space for this movie. I know that with multiple users and other movies it will grow more to around 800 GiB more or less Server specs are: Ryzen 1700 with 32GB of RAM, Nvidia A2000 6GB and 240 GB SSD The CT has 1 core with 3GiB of ram and the A2000 fully dedicated. Before adding the card, it has 5 cores but now is not nedded anymore as i don´t do software transcode. Main disk is 3GiB with 1.5 free and the ram disk has 512 MiB usually free as it´s being only used for transcode 3 hours ago, Happy2Play said: Sure as devs have already recommended against it. But no one can stop users from doing what they want. Just can say why the user is having issue of probably their own creation. I get the point of not using the ram disk as it won´t be faster but thats not the point, i´m just trying to avoid ssd wear and also avoid buying new hardware.
Lessaj 467 Posted May 14, 2024 Posted May 14, 2024 4 minutes ago, Gabi92 said: I haven´t changed anything regarding the throttling, everything is on default settings, how can i change it? From the Transcoding Tab. If you're using an A2000 this is a good page to look at to make sure it's actually able to use it. I don't think you'll wear the SSD before you actually replace it. I've been using the same scratch drive SSDs for years, read and written many many TB both for media preparations as well as transcoding temp files and 0 errors. A drive can still fail at any time of course.
Happy2Play 9780 Posted May 14, 2024 Posted May 14, 2024 5 minutes ago, Lessaj said: I don't think you'll wear the SSD before you actually replace it. Personally would agree as this SSD has lasted longer then most HDD. Nothing is really shown in the log that I saw but must be a reason on the fly cleanup is not working. 1
Gabi92 0 Posted May 14, 2024 Author Posted May 14, 2024 24 minutes ago, Lessaj said: From the Transcoding Tab. If you're using an A2000 this is a good page to look at to make sure it's actually able to use it. I don't think you'll wear the SSD before you actually replace it. I've been using the same scratch drive SSDs for years, read and written many many TB both for media preparations as well as transcoding temp files and 0 errors. A drive can still fail at any time of course. I think that you are talking about this option: Habilitar limitación (enable limit) I´ve tried it but same results on ram disk. Also regarding the ram disk, it´s apart from the 3GiB of ram of the machine.
Gabi92 0 Posted May 14, 2024 Author Posted May 14, 2024 18 minutes ago, Happy2Play said: Personally would agree as this SSD has lasted longer then most HDD. Nothing is really shown in the log that I saw but must be a reason on the fly cleanup is not working. Regarding this, here is my smart of the disk: Last SSD was replaced when it has around 14 years old but i hasn´t that many TiB written, also, i don´t plan to replace this one in at least + 5 years. Thats the main reason to avoid using it for transcode. I´ve like 8 people in the family that will be using it and it will be many writes to the disk.
Gabi92 0 Posted May 14, 2024 Author Posted May 14, 2024 So far i´ve an idea as possible solution, as i´ve installed the plugin Scripter-X, i can schedule a delete of the transcode directory but, it will clear files that are in use and it will suddenly stop playing for few seconds until the transcode starts again. Any idea on how to do it by delete just the played files? Regards
sa2000 674 Posted May 14, 2024 Posted May 14, 2024 4 hours ago, Gabi92 said: Main disk is 3GiB with 1.5 free and the ram disk has 512 MiB usually free as it´s being only used for transcode That is obviously not right. I have never heard of anyone using 512Mb for transcoding. It is normally a number of gigabytes Each 3 second segment is using up about 2 Mb of disc space
Gabi92 0 Posted May 14, 2024 Author Posted May 14, 2024 4 minutes ago, sa2000 said: That is obviously not right. I have never heard of anyone using 512Mb for transcoding. It is normally a number of gigabytes Each 3 second segment is using up about 2 Mb of disc space How much space would you recomend?, and let´s be realistic, even if i use the ssd, i got around 50 GiB available
sa2000 674 Posted May 14, 2024 Posted May 14, 2024 (edited) 29 minutes ago, Gabi92 said: How much space would you recomend?, I would start with 50 Gb - but let experienced users advise. Users tend to have terra bytes and do not worry about space. The ability to set the path for transcode temp area is because it is acknowledged that the default system drive may be inadequate so allowing users to specify larger target (not smaller target as in your case). I have only just started on Emby having been doing plex troubleshooting for years - so would like to leave the advice to experienced Emby users - but anyway start with many gigabytes. The advice on the Plex support articles is size of source file + 100Mb - in your case this would be over 40Gb. Don't know if emby has any checks on space available compared to file size. Edited May 14, 2024 by sa2000
Gabi92 0 Posted May 14, 2024 Author Posted May 14, 2024 10 minutes ago, sa2000 said: I would start with 50 Gb - but let experienced users advise. Users tend to have terra bytes and do not worry about space. The ability to set the path for transcode temp area is because it is acknowledged that the default system drive may be inadequate so allowing users to specify larger target (not smaller target as in your case). I have only just started on Emby having been doing plex troubleshooting for years - so would like to leave the advice to experienced Emby users - but anyway start with many gigabytes. The advice on the Plex support articles is size of source file + 100Mb - in your case this would be over 40Gb. Don't know if emby has any checks on space available compared to file size. I can assing 50 GiB but i got files that has around 120 GiB so it won´t be enough
Lessaj 467 Posted May 14, 2024 Posted May 14, 2024 Sounds like you have a lot of storage space to work with if you have some files that large. Why not use a directory within your mass storage instead then? As I mentioned before if you have to transcode a file that large, which is likely encoded with HEVC, you'll want 1.5-2x the space of your largest file as a transcode of a file that size, if played in its entirety, is going to be up being that large. The size of the TS segments is going to vary based on the bitrate of the media and how much information is on screen (IE mostly black screen/credits vs a scene). I just started transcoding Return of the King since it's the largest movie I have around that size and some of these TS segments are over 40MB. The original bitrate is around 69 Mbps but transcoding to h264 it's 103 Mbps, 1.5x larger. Again, files that large should be direct played, so it would be worth investigating if that's even possible on the client devices otherwise you're going to need about 180 GB for that edge case.
Gabi92 0 Posted May 14, 2024 Author Posted May 14, 2024 30 minutes ago, Lessaj said: Sounds like you have a lot of storage space to work with if you have some files that large. Why not use a directory within your mass storage instead then? As I mentioned before if you have to transcode a file that large, which is likely encoded with HEVC, you'll want 1.5-2x the space of your largest file as a transcode of a file that size, if played in its entirety, is going to be up being that large. The size of the TS segments is going to vary based on the bitrate of the media and how much information is on screen (IE mostly black screen/credits vs a scene). I just started transcoding Return of the King since it's the largest movie I have around that size and some of these TS segments are over 40MB. The original bitrate is around 69 Mbps but transcoding to h264 it's 103 Mbps, 1.5x larger. Again, files that large should be direct played, so it would be worth investigating if that's even possible on the client devices otherwise you're going to need about 180 GB for that edge case. Got it, i hope that most of the files doesn´t need the encode but it will depend on the device, tvs usually need it. An hdd should be fast enough for few transcodes (worst case scenario should be around 8 with files of 120 GB)?
Lessaj 467 Posted May 14, 2024 Posted May 14, 2024 Yes it should be fast enough, especially with throttling enabled. If you really did need to transcode that file 8x at the same time you're probably going to run into a GPU bottleneck first, and you'd need over 1tb of space for that many streams if played beginning to end. I doubt that would happen but it's possible. TVs shouldn't usually need a transcode, but they may not support PGS subs and that has to be burned in with a transcode. That's the main incompatibility that I've seen with TVs. This is a graph of the space usage of my transcoding-temp folder over the past couple weeks or so, since it's a ZFS dataset I can look historically at how much space has been used. The continuous space usage for a few days might have been a folder that didn't get cleaned up properly. Aside from one large spike, which I could probably figure out if I look through playback reporting for what coincides with that date, most of the time only a few GB are needed
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now