Diagnosing Transcoding Issues

@astroroxy

I have the episode.

If you prefer, you can remove the link and I’ll get it to @Volts and @FordGuy61
if you wish

Thank you for the file.

100% confirmed that it’s not encoded correctly

Video
ID                                       : 1
Format                                   : HEVC
Format/Info                              : High Efficiency Video Coding
Format profile                           : Main 10@L6.2@High
Codec ID                                 : V_MPEGH/ISO/HEVC
Duration                                 : 23 min 15 s
Bit rate                                 : 1 741 kb/s
Width                                    : 1 920 pixels
Height                                   : 1 080 pixels
Display aspect ratio                     : 16:9
Frame rate mode                          : Constant
Frame rate                               : 23.976 (24000/1001) FPS

HEVC = OK
Main 10 = HDR
Level 6.2 ---- At bit rate 1, 741 kb/sec == Poor encoding (incorrect profile selection)

Tne person who did the encode turned it UP instead of DOWN to 4.0

1 Like

Downloaded. OK to remove link.

I guess the question, would it be possible to gracefully catch not so good files and either display an error, or failback to software transcoding?

I’m not sure it would help.

There are two problems:

  1. Celeron CPU low performance, especially single-cores.
  2. Limited ASS support in the Plex Android / Android TV client.

I transcoded a section of the video using Handbrake to HEVC 10-bit, Main10@L4.0@High and loaded onto my system (PMS on DS918+, Nvidia Shield Pro as client).

With no subtitles, both the L6.2 and L4.0 videos direct play, without buffering, using the Shield as a client. Both have similar bitrates, 6.2 = 1741 kbps, 4.0 = 1732 kbps.

With hardware acceleration enabled and Burn Subtitles = Automatic, both the L6.2 and L4.0 videos buffered. The J3455 Celeron cannot burn the subtitles fast enough.

With hardware acceleration disabled and Burn Subtitles = Automatic, both videos buffered. Not nearly as much as with h/w acceleration enabled, but they still buffered at some point.

The J4125 in the DS920+ is a stronger CPU than the J3455, so that is probably why you can transcode the video in software without buffering. However, you will still run into buffering at some point, when transcoding higher bitrate videos.

So even if Plex had some sort of look up table to compare bitrate vs video level and auto-switch between hardware accelerated & software transcoding, I’m not sure it would help much. At some point you’ll still hit the wall due to Celeron’s low single core capability (as mentioned above, subtitle burning is a single core process on Linux systems).

A workaround is to set Burn Subtitles = Image Formats Only in the Plex client. The video direct plays, but style information is lost. To give you an example, 23 seconds into the video, the word “Assassination” does not appear on one of the panels of paper. It does appear with Burn Subtitles = Automatic.

As for a non-workaround solution:

  1. Run Plex Media Server on a more powerful system, at least when burning subtitles is required.

For example, you could run PMS on a laptop or desktop Windows system with a stronger CPU. The media would still reside on the NAS.

  1. Look for a Plex client that better handles ASS subtitles.

The problem with the Android client is that Exoplayer, the underlying video player, has very limited support for ASS subtitles. There is ongoing work to improve things (GitHub), but it will take some time to make it into production Android releases (ExoPlayer is part of the Android OS).

Other Plex clients may handle ASS subtitles better. Plex for Windows direct plays ASS subtitles. It has mpv as an underlying video player. I believe both the iPhone and AppleTV clients also use mpv. If so, they may be able to direct play ASS subtitles (I’ve neither with which to test).

Not the news you want to read, but that is where things sit today, as best as I can tell, anyway.

1 Like

Great post.

The ATV can play some-not-all ASS subtitles. It can’t preserve fancy anime subtitle formatting.

Thanks. And thanks for the info on the ATV & ASS subtitles.

Maybe it would be a good idea to then have a message prompt if there are ASS subtitles?
Burn Subtitles = Image Formats Only definitely made it playable, and the subtitles worked well enough.

I would not have guessed that’s why it’s having trouble so a little message box if it has to buffer a few times to suggest what you did.

I have a very high end, fast, competent computer all connected up with CAT5E lines all tested out which I use as my PMS. All my content on an unraid server with approx 100TB. Grabbing a movie is no problem, but seeing PMS buffer all the time has given me stomach aches. Troubleshooting for days, adding to weeks and just can’t find a thing.
AMD 5950x
Asus Crosshair Dark Hero
64MB of 3600 RAM
Strix Asus RTX-3090
2 x WD Black NVMe PCIe V4.0 SSD 1TB
2.5Gbps Ethernet

Seriously never used such a fast, robust machine before and yet I still some times cannot direct stream a moderate bitrate movie. Installed PMS multiple times in different locations and have tried about 150 variations of settings. I guess I’m venting, sorry. I posted my logs and tech info in another post.

I wanted to ask, is my RTX-3090 helping me out when playing a movie? Also, will PMS ever be able to play M2TS files? Spending time converting, handbraking away still takes hours. Just unhappy today I guess.

I’m impressed it can boot!

/kidding

This is probably the wrong forum to be discussing HW transcoding with AMD CPUs

If you look at the CPUs used by Synology, PLEASE correct me if I’m wrong,

MODEL # OF CPU CORES # OF THREADS CPU MAX FREQ. CPU BASE FREQ. TDP
AMD Ryzen™ Embedded V1807B with Radeon™ Vega 11 Graphics 4 8 3.8GHz 3.35GHz 35-54W
AMD Ryzen™ Embedded V1756B with Radeon™ Vega 8 Graphics 4 8 3.6GHz 3.25GHz 35-54W
AMD Ryzen™ Embedded V1605B with Radeon™ Vega 8 Graphics 4 8 3.6GHz 2GHz 12-25W
AMD Ryzen™ Embedded V1404I with Radeon™ Vega 8 Graphics 4 8 3.6GHz 2GHz 12-25W
AMD Ryzen™ Embedded V1202B with Radeon™ Vega 3 Graphics 2 4 3.2GHz 2.3GHz 12-25W
AMD Ryzen™ Embedded V1780B 4 8 3.6GHz 3.35GHz 35-54W
AMD Ryzen™ Embedded V1500B 4 8 2.2GHz 12-25W

Ref: https://www.amd.com/en/products/embedded-ryzen-v1000-series

I don’t see where Synology uses any of the AMD CPUs with embedded GPUs.
That makes HW transcoding on these CPUs without a GPU moot.

Ref: What kind of CPU does my Synology NAS have? - Synology Knowledge Center

I can’t., nor would I try to, speak for Engineering and Product teams.

I can tell you that, on Linux, if you install the VAAPI drivers yourself, PMS will find and use them.

Another option to add to this is to install Kodi and then use the Kodi Plex Addon since Kodi uses libavcodec (I just got that information from a Google search) and is able to handle ASS subtitles.
That part I know because I tested it out since I have a few anime with ASS subtitles that would struggle using the Plex app.

Looking at libavcodec, I don’t see why Plex doesn’t consider using that as the video player in the app (or at least giving it as an option to select from) since it is free and open source (and from the makers of ffmpeg). Though that is for another thread.

-Shark2k

@shark2k

That’s a great idea. They already tried that route.

Kodi “owns” the hardware because it’s a HTPC (OS) . You maintain the box.

Plex’s apps live under the constraints the host provides.

I’ve asked several times about a “Plex Streaming Box” (white box).
If looks could kill… :see_no_evil: lol
I think it really came down to a logistics & support issue; specifically how to support such a device.

Software would be easy.
Hardware support because people break stuff / brick it by accident – How do you remedy those cases ?

I’m a tad confused by this because I am not using a dedicated Kodi “box” to accomplish this. I’m using a Shield Pro (model number P2897) in which I went to the Play store and searched for Kodi and then installed the app. On my Shield I also installed VLC for Android and since I added my network share of where my files for Plex live I am able to access them using that as well. I tested and using either Kodi via the Kodi Plex Addon or VLC for Android, I am able to play the media files that have ASS subtitles (and all their fancy styling and animations) with no issue what-so-ever. However, those same files when I play through Plex require my server to transcode to maintain the styling (which I do understand is a limitation of the video player that is being used by Plex).

Just to be clear, I’m not trying to be stubborn/a hard ass/argumentative here. I also didn’t mean to start anything with that last comment I made, it was just a thought after having done a quick search to try to understand why Kodi (via the Kodi Plex Addon) and VLC are able to play the files.

I also freely admit that I am not familiar at all with the creation of an app on the various systems (Android, iOS, Roku, etc.) so I really don’t know if Plex can update the app so that it uses libavcodec which would give it better funtionality.

Anyway, this discussion probably doesn’t add much to this thread, so if you don’t want to respond/answer here, I understand. Again, not trying to cause a stir, just trying to get a better understanding of how it works.

-Shark2k

Can you please lock this thread as it’s been pretty derailed.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.