Jump to content

Transcoding 4K to FHD with PGS Sub only 20FPS


dhjgv

Recommended Posts

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

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

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

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

  • 3 weeks later...

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

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

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

Jdiesel

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

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

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

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

Guest asrequested

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

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

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

Guest asrequested

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

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

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

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 by dhjgv
Link to comment
Share on other sites

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