dhjgv 0 Posted December 25, 2018 Share Posted December 25, 2018 Good morning all and merry christmas, now that I have a bit time I stumbled across the following issue: I have a 4K Movie that transcodes fine tp FHD 5MBit when outside my network as long as subs are disabled (Transcode with abt. 80FPS). Once turning on the PGS Subs, the transcode is only 20FPS (which is not enough obviously). Menawhile the CPU is only at 15% usage so there is enough resources left. Server:AMD Ryzen 2700x 16GB RAM 256GB PCIe SSD Raid 5 with 6 HDDs Windows 10 Pro THe H/W Acceleration is turned OFF! I know that the PGS Sub is problematic and needs to be burned into the video. Is there some forced speed limitation when burning in the subs? When doing this on 1080p stuff all is working fine with or without subs. Server and FFMpeg Log are attached. SRV_Log.txtwith_Sub.txtwithout_Sub.txt Hope you can lead me to some solution. Link to comment Share on other sites More sharing options...
Luke 37098 Posted December 25, 2018 Share Posted December 25, 2018 Hi, there's no limitation, however burning in pgs subtitles is a very expensive process and you need to have a system powerful enough to do that. The next release of emby server will improve our transcoding commands to make them a little more optimal, but it still requires a powerful system. What you could do is add external srt subtitles. These are very efficient and can be passed down to emby apps as plain text. Our subtitle download feature can help with that. Thanks ! Link to comment Share on other sites More sharing options...
dhjgv 0 Posted December 25, 2018 Author Share Posted December 25, 2018 Hi Luke, 8x 4GHz is still not enough even when the utilization is only 20%? I would understand when it runs @100%, but it simply isn't, that is why I am asking. Ext Subs would double again the choice of Subs, as I already have them inside every file. Link to comment Share on other sites More sharing options...
Guest asrequested Posted December 25, 2018 Share Posted December 25, 2018 I can replicate this on my Threadripper. When using subs, CPU usage drops and I'm transcoding in real-time (24fps). Link to comment Share on other sites More sharing options...
dhjgv 0 Posted December 25, 2018 Author Share Posted December 25, 2018 I can replicate this on my Threadripper. When using subs, CPU usage drops and I'm transcoding in real-time (24fps). Realtime would be ok so I get a smooth movie at least. But for me the usage is always 18-19% and it encodes at exactly 20FPS (reproducible). Due to this I had the thought about ffmpeg limitation. Link to comment Share on other sites More sharing options...
Luke 37098 Posted December 26, 2018 Share Posted December 26, 2018 The next release of emby server will improve our transcoding commands to make them a little more optimal. Link to comment Share on other sites More sharing options...
dhjgv 0 Posted January 16, 2019 Author Share Posted January 16, 2019 Hi again, With Version 4.0 now released, I updated and the behaviour (20FPS) is exactly the same. Would be great if it could be looked into now. New Transcodelog attached. If it has to be longer, please let me know. Having all Subs external would be a pain as all my media has it interal including commentary tracks etc which is not available via opensubtl. Best regards Log.txt Link to comment Share on other sites More sharing options...
ebr 14925 Posted January 16, 2019 Share Posted January 16, 2019 Hi. I'm afraid you are combining two incredibly intensive processes (transcoding HEVC and burning in graphic subs) here and your hardware simply cannot handle it. You can try some of the new hardware acceleration settings available in 4.0 but the only solution may be to use the convert feature to create more streamable versions of these items. @@softworkz do you see anything else he can try? Link to comment Share on other sites More sharing options...
dhjgv 0 Posted January 16, 2019 Author Share Posted January 16, 2019 Hi, I like to point out again, only 18-19% CPU Usage! Hardware should not be the bottleneck. More like FFMPEG is using only one core when burning subs. Link to comment Share on other sites More sharing options...
Jdiesel 1114 Posted January 16, 2019 Share Posted January 16, 2019 I don't know for sure but a lot of ffmpeg processes are single threaded due to the type of work that is being done. A good example of this is tonemapping which is limited to a single thread currently. Link to comment Share on other sites More sharing options...
Luke 37098 Posted January 16, 2019 Share Posted January 16, 2019 I think the issue is your system just can't transcode 4k to 4k with subtitles fast enough to be playable. Try setting the in-app quality setting to a 1080p bitrate. We can try to do a better job of automatically limiting so that you don't have to do this manually. Link to comment Share on other sites More sharing options...
Guest asrequested Posted January 16, 2019 Share Posted January 16, 2019 There's definitely a big difference between using subs and not using them. But it may be the single thread issue. Link to comment Share on other sites More sharing options...
softworkz 3338 Posted January 16, 2019 Share Posted January 16, 2019 Hi, I like to point out again, only 18-19% CPU Usage! Hardware should not be the bottleneck. More like FFMPEG is using only one core when burning subs. @@Jdiesel and @ are mostly correct. Though, it's not necessarily about single-threading - yes/no. It's just that multi-threading does not automatically mean that an infinite number of threads can be involved. There are limits to parallelization which are depending on the actual job to do. In many cases there's an optimum and using more threads would make things even slower. That's why it's usually(!) not an "ffmpeg limitation" but a parallelization limit of the algorithms involved. Link to comment Share on other sites More sharing options...
softworkz 3338 Posted January 16, 2019 Share Posted January 16, 2019 Hi. I'm afraid you are combining two incredibly intensive processes (transcoding HEVC and burning in graphic subs) here and your hardware simply cannot handle it. You can try some of the new hardware acceleration settings available in 4.0 but the only solution may be to use the convert feature to create more streamable versions of these items. @@softworkz do you see anything else he can try? @@dhjgv - Have you tried AMF hardware acceleration for encoding? (just use hw accel for encoding, not for decoding) Link to comment Share on other sites More sharing options...
Guest asrequested Posted January 16, 2019 Share Posted January 16, 2019 Does that mean it's already optimized? No wiggle room? As is on my machine, it's happening in real-time, so there's no grace for hiccups. It would be nice to be able to have some kind of buffer. Link to comment Share on other sites More sharing options...
softworkz 3338 Posted January 16, 2019 Share Posted January 16, 2019 It depends very much on the hw acceleration which parts can be reasonably done by the hardware and which ones shouldn't be or won't work at all. Link to comment Share on other sites More sharing options...
dhjgv 0 Posted January 16, 2019 Author Share Posted January 16, 2019 I think the issue is your system just can't transcode 4k to 4k with subtitles fast enough to be playable. Try setting the in-app quality setting to a 1080p bitrate. We can try to do a better job of automatically limiting so that you don't have to do this manually. It is only transcoding to 5MBit 1080p @@Jdiesel and @ are mostly correct. Though, it's not necessarily about single-threading - yes/no. It's just that multi-threading does not automatically mean that an infinite number of threads can be involved. There are limits to parallelization which are depending on the actual job to do. In many cases there's an optimum and using more threads would make things even slower. That's why it's usually(!) not an "ffmpeg limitation" but a parallelization limit of the algorithms involved. Noted... @@dhjgv - Have you tried AMF hardware acceleration for encoding? (just use hw accel for encoding, not for decoding) As I have no GPU in that System (headless server), I can't use HW Accel. (it is set to "yes" anyway. I just started converting the PGS Sub to SubRip/SRT, but regardless if I have it muxed into the MKV or as external file, the Subs won't be displayed/used (iOS App and Web via Chrome). Is this a general Problem at the moment? Link to comment Share on other sites More sharing options...
Guest asrequested Posted January 16, 2019 Share Posted January 16, 2019 It depends very much on the hw acceleration which parts can be reasonably done by the hardware and which ones shouldn't be or won't work at all. I was referring to using the CPU. No hardware acceleration. Link to comment Share on other sites More sharing options...
softworkz 3338 Posted January 16, 2019 Share Posted January 16, 2019 It is only transcoding to 5MBit 1080p Noted... As I have no GPU in that System (headless server), I can't use HW Accel. (it is set to "yes" anyway. I just started converting the PGS Sub to SubRip/SRT, but regardless if I have it muxed into the MKV or as external file, the Subs won't be displayed/used (iOS App and Web via Chrome). Is this a general Problem at the moment? Apologies, I got so many logs open that I had looked at the wrong one... Anyway, what I said about parallelization was still meant for CPU operation Link to comment Share on other sites More sharing options...
Luke 37098 Posted January 17, 2019 Share Posted January 17, 2019 I just started converting the PGS Sub to SubRip/SRT, but regardless if I have it muxed into the MKV or as external file, the Subs won't be displayed/used (iOS App and Web via Chrome). Is this a general Problem at the moment? No, the subs should be just fine in these cases. Can we look at an example? thanks. Link to comment Share on other sites More sharing options...
dhjgv 0 Posted January 17, 2019 Author Share Posted January 17, 2019 (edited) I just tried after a fresh restart of the server. Attached are the logs. I used an external SRT file and the sub should be displayed at 2:07:13 but wasn't (in Chrome). I checked the same file (with ext srt) with VLC and it displays fine. Server.txt Transcode.txt HW.txt Edited January 17, 2019 by dhjgv Link to comment Share on other sites More sharing options...
Luke 37098 Posted January 17, 2019 Share Posted January 17, 2019 Are you sure that subtitle track was selected? Link to comment Share on other sites More sharing options...
dhjgv 0 Posted January 17, 2019 Author Share Posted January 17, 2019 120% sure! I checked it three times and made sure it is the external sub, not the one within MKV. See attached. I attached also the srt file (working fine in VLC). xxx.ger.forced.srt Link to comment Share on other sites More sharing options...
Luke 37098 Posted January 18, 2019 Share Posted January 18, 2019 Can you zip up the subtitle track and attach it here? thanks. Link to comment Share on other sites More sharing options...
dhjgv 0 Posted January 18, 2019 Author Share Posted January 18, 2019 I already attached it to the Post before, but anyway, attached again as ZIP. xxx.ger.forced.srt.zip Link to comment Share on other sites More sharing options...
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