Synology DS418 - H.264 MPEG-4 AVC (part 10) Transcoding and Subtitles

Hello together,

recently I got a Synology DS 418 and installed the latest Plex Server Version 1.15.0.659-9311f93fd from this thread: Much faster (hopefully), smaller (mostly) and better PMS builds preview (1.15.0.573-123756e9a) . The installation worked and my video files are detected correctly. I am now trying to stream some of those videos, which are saved as .mkv files, to my Samsung TV (model: TV GQ75Q7FNG), but this only works to some extent. There are two problems I encounter and hope you can help me to understand the situation better.

Problem 1: Playback of some H.264 Videos lead to high CPU usage

When streaming some videos which are encoded with H.264 the CPU usage of my Synology NAS sykrockets to 99%, leading to severe lags und buffering pauses of the playback. I used the mkvinfo program to extract more information about the video stream and it seems to be dependant of the chosen h.264 profile. Here you can see the output of the mkvinfo program of two files which lead to the above mentioned high cpu usage:

Example 1:

| + Track
|  + Track number: 1 (track ID for mkvmerge & mkvextract: 0)
|  + Track UID: 4660655833373320124
|  + Track type: video
|  + Lacing flag: 0
|  + Minimum cache: 1
|  + Codec ID: V_MPEG4/ISO/AVC
|  + Codec's private data: size 43 (h.264 profile: High 10 @L5.1)
|  + Default duration: 00:00:00.041708333 (23.976 frames/fields per second for a video track)
|  + Language: und
|  + Video track
|   + Pixel width: 1920
|   + Pixel height: 1080
|   + Display width: 1920
|   + Display height: 1080

Example 2:

| + Track
|  + Track number: 1 (track ID for mkvmerge & mkvextract: 0)
|  + Track UID: 18445989320895891896
|  + Track type: video
|  + Lacing flag: 0
|  + Minimum cache: 1
|  + Codec ID: V_MPEG4/ISO/AVC
|  + Language: und
|  + Video track
|   + Pixel width: 1920
|   + Pixel height: 1080
|   + Display width: 1920
|   + Display height: 1080
|  + Codec's private data: size 44 (h.264 profile: High @L5.0)
|  + Default duration: 00:00:00.041708333 (23.976 frames/fields per second for a video track)

The playback of other files works perfectly fine, the CPU usage is low and no lag or buffering pauses appear. Following is the mkvinfo output of videos which do not lead to high CPU usage:

Example1:

|  + Track number: 1 (track ID for mkvmerge & mkvextract: 0)
|  + Track UID: 1
|  + Track type: video
|  + Lacing flag: 0
|  + Minimum cache: 1
|  + Codec ID: V_MPEG4/ISO/AVC
|  + Codec's private data: size 43 (h.264 profile: High @L4.0)
|  + Default duration: 00:00:00.041708333 (23.976 frames/fields per second for a video track)
|  + Language: und
|  + Video track
|   + Pixel width: 1920
|   + Pixel height: 1080
|   + Display width: 1920
|   + Display height: 1080

Example 2:

| + Track
|  + Track number: 3 (track ID for mkvmerge & mkvextract: 2)
|  + Track UID: 1
|  + Track type: video
|  + Lacing flag: 0
|  + Minimum cache: 1
|  + Codec ID: V_MPEG4/ISO/AVC
|  + Codec's private data: size 46 (h.264 profile: High @L4.1)
|  + Default duration: 00:00:00.041708333 (23.976 frames/fields per second for a video track)
|  + Language: und
|  + Video track
|   + Pixel width: 1920
|   + Pixel height: 1080
|   + Display width: 1920
|   + Display height: 1080

The main difference seems to be the used h.264 profile. My knowledge about this whole codec stuff is rather limited but it seems kinda weird to me as according to the following knowledge base article from Synology: https://www.synology.com/en-us/knowledgebase/DSM/tutorial/Multimedia/Can_my_Synology_NAS_transcode_4K_videos_for_my_device : “Any container or file extension in 4K 2160p (4096 x 2160) with codecs H.265 (HEVC), and in 1080p with codecs H.265 (HEVC), H.264 (AVC), MPEG-4 Part 2 (XVID, DIVX5), MPEG-2, and VC-1 can be transcoded up to 1080p by Synology NAS in 4K Group 3.” This text can be found under Note 4 and according to the same Knowledge Base Article the DS418 belong to 4K Group 3. No restriction is set about the used profile so I’m wondering why the playback leads to the high CPU usage.

Problem 2: Playback of video files with softcoded subtitles causes high CPU usage

The other problem I have stumbled upon lies in the use of subtitles. If I take a video file which itself plays without problems and activate a subtitle embedded into the file, for example .ass or .srt, the CPU usage rises to 99% and the video playback has buffering pauses every few seconds. This problem arises every time I use a softcoded subtitle.

If possible I would like to solve both problems allowing me to stream all my video files encoded with h.264 and use subtitles. Are there ways to achieve this? Or is the used hardware just not good enough to handle these use cases?

Thank you very much in advance for your answers and help. If you need further information please let me know I will provide them to the best of my knowledge.

Greetings,
xXKnightRiderXx

Hey trumpy81,

first of all thank you very much for your fast and detailed answer. I really appreciate it and it helped me understand the situation much better.

I was able to verify the following statement of yours:

My TV is not able to play H.264 videos with a profile of 5.0 or 5.1. When connecting an external hard drive to the TV it throws an error message about unsupported video codec if I try to play the video directly. When streaming the video the Plex activity tab shows that the video is being transcoded. If a video with profile 4.0 or 4.1 is played Direct Play is used. Using subtitles also leads to the need of transcoding the video.

To summarize the core problem: Since my TV does not support all H.264 profile transcoding is needed to play these video. Transcoding is a computationally intensive task and the CPU power of the NAS is not good enough for this job. To compensate for this the DS418 has a special hardware transcoding engine but Plex can not use it since Synology has not provided the necessary tools.

Is this conclusion more or less correct?

Greetings,
xXKnightRiderXx

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