AVC1 Video playback is stuttering on Windows & Android TV

Server Version#: 1.20.4.3517-ab5e1197c (Synology)
Player Version#: 1.22.0.1421-be6a7c42 (Windows)

My video playback is stuttering on Windows 10 and Android TV for some 1080p videos. It should be noted that I can even play some 4K videos just fine. So, I am guessing that the problem is caused by the codec. When checking some of the video files that don’t work, I found that they are all using the same codec. I also found that some are using different audio codecs, but here is the most commonly used codec that causes stuttering over the network for me…

Video
Codec: AVC1
Input type: AVC1 (24bit)
Output type: NV12 (12bit)

Audio
Codec: AAC
Sample rate: 44,100

And, as shown in Plex Media Info:

Plex-Media Info

Oddly enough, I can just open the same file from a network share on the Windows computer and it plays just fine using a video player.

So, I am guessing that Plex is doing some transcoding when playing these videos. Is this a known problem? Is there anything I can do to solve the problem? I have already checked CPU usage on my Synology DS-1813+, but it never goes beyond 15% when playing this kind of video. So, I don’t think it is a performance problem on the Synology.

Any suggestions? Thank you!

@trumpy81 Thank you for getting back to me!

I have followed the instructions to execute Get Info, but the following screen remains blank. So, I have looked at the source code of the page and I am guessing that you are looking for the Media Info.

<?xml version="1.0" encoding="UTF-8"?>
<Media id="37467" duration="882520" bitrate="1246" width="1920" height="1080" aspectRatio="1.78" audioChannels="2" audioCodec="aac" videoCodec="h264" videoResolution="1080" container="mp4" videoFrameRate="24p" optimizedForStreaming="0" audioProfile="lc" has64bitOffsets="0" videoProfile="high">
<Part accessible="1" exists="1" id="88731" key="/library/parts/88731/1603757813/file.mp4" duration="882520" file="/volume2/video/Movies/FTL/FTL.mp4" size="137872956" audioProfile="lc" container="mp4" deepAnalysisVersion="4" has64bitOffsets="0" optimizedForStreaming="0" requiredBandwidths="2059,1551,1551,1551,1551,1551,1551,1551" videoProfile="high">
<Stream id="175313" streamType="1" default="1" codec="h264" index="0" bitrate="1118" bitDepth="8" chromaLocation="left" chromaSubsampling="4:2:0" codedHeight="1088" codedWidth="1920" colorPrimaries="bt709" colorRange="tv" colorSpace="bt709" colorTrc="bt709" frameRate="23.976" hasScalingMatrix="0" height="1080" level="40" profile="high" refFrames="3" requiredBandwidths="1931,1442,1442,1442,1442,1442,1442,1442" streamIdentifier="1" width="1920" displayTitle="1080p (H.264)" extendedDisplayTitle="1080p (H.264)" />
<Stream id="175314" streamType="2" selected="1" default="1" codec="aac" index="1" channels="2" bitrate="128" language="English" languageCode="eng" audioChannelLayout="stereo" profile="lc" requiredBandwidths="128,128,128,128,128,128,128,128" samplingRate="44100" streamIdentifier="2" displayTitle="English (AAC Stereo)" extendedDisplayTitle="English (AAC Stereo)" />
</Part>
</Media>

I have also attached the log file.

DELETED

Sorry! Here is a new log file.

Moderator: Logs deleted as requested.

On Windows, it basically plays for a second and then it stops for a few seconds showing me the circling ring before continuing for another second.
Initially, I thought it is a bandwidth problem, but then I found that I can play much larger files with higher frame rates and resolution just fine.
Strange that you couldn’t find anything in this log. I thought I had seen the file in the previous log. I can run it again if it helps. In which log file should I expect to see an entry?
Looking at the strange behavior, I am wondering if it is possible that the codec just crashes and that, what I perceive as stuttering, is just the codec restarting?
I would also like to mention that the behavior is slightly different on Android TV where it plays for a couple of seconds and then stops for a couple of seconds.

I had some time this morning and so I looked at the log file some more. I found the following entries which seem to reflect what I am seeing in the player.

Nov 09, 2020 20:06:24.423 [0x7fd9f4a63700] DEBUG - Auth: authenticated user 1 as user@nowhere.com
Nov 09, 2020 20:06:24.424 [0x7fd9f503f700] DEBUG - Request: [192.168.68.237:51845 (Subnet)] GET /library/parts/88731/1603757813/file.mp4 (8 live) TLS Signed-in Token (user@nowhere.com) (range: bytes=1632201-) 
Nov 09, 2020 20:06:24.429 [0x7fd9f503f700] DEBUG - Content-Length of /volume2/video/Movies/FTL/FTL.mp4 is 136240755 (of total: 137872956).
Nov 09, 2020 20:06:24.435 [0x7fd9f4a63700] DEBUG - Failed to stream media, client probably disconnected after 393216 bytes: 104 - Connection reset by peer
Nov 09, 2020 20:06:24.436 [0x7fd9f4a63700] DEBUG - Completed after connection close: [192.168.68.237:51842] 206 GET /library/parts/88731/1603757813/file.mp4 (8 live) TLS 149ms 393216 bytes (range: bytes=123603769-) 
Nov 09, 2020 20:06:24.558 [0x7fd9f4d51700] DEBUG - Auth: authenticated user 1 as user@nowhere.com
Nov 09, 2020 20:06:24.559 [0x7fd9e7df2700] DEBUG - Request: [192.168.68.237:51846 (Subnet)] GET /library/parts/88731/1603757813/file.mp4 (8 live) TLS Signed-in Token (user@nowhere.com) (range: bytes=123604120-) 
Nov 09, 2020 20:06:24.564 [0x7fd9e7df2700] DEBUG - Content-Length of /volume2/video/Movies/FTL/FTL.mp4 is 14268836 (of total: 137872956).
Nov 09, 2020 20:06:24.572 [0x7fd9f4d51700] DEBUG - Failed to stream media, client probably disconnected after 393216 bytes: 104 - Connection reset by peer
Nov 09, 2020 20:06:24.573 [0x7fd9f4d51700] DEBUG - Completed after connection close: [192.168.68.237:51845] 206 GET /library/parts/88731/1603757813/file.mp4 (8 live) TLS 149ms 393216 bytes (range: bytes=1632201-) 
Nov 09, 2020 20:06:24.711 [0x7fd9f4a63700] DEBUG - Auth: authenticated user 1 as user@nowhere.com
Nov 09, 2020 20:06:24.712 [0x7fd9e7322700] DEBUG - Request: [192.168.68.237:51847 (Subnet)] GET /library/parts/88731/1603757813/file.mp4 (8 live) TLS Signed-in Token (user@nowhere.com) (range: bytes=1634034-) 
Nov 09, 2020 20:06:24.719 [0x7fd9e7322700] DEBUG - Content-Length of /volume2/video/Movies/FTL/FTL.mp4 is 136238922 (of total: 137872956).
Nov 09, 2020 20:06:24.726 [0x7fd9f4a63700] DEBUG - Failed to stream media, client probably disconnected after 393216 bytes: 104 - Connection reset by peer
Nov 09, 2020 20:06:24.727 [0x7fd9f4a63700] DEBUG - Completed after connection close: [192.168.68.237:51846] 206 GET /library/parts/88731/1603757813/file.mp4 (8 live) TLS 168ms 393216 bytes (range: bytes=123604120-) 
Nov 09, 2020 20:06:24.869 [0x7fd9f4d51700] DEBUG - Auth: authenticated user 1 as user@nowhere.com
Nov 09, 2020 20:06:24.870 [0x7fd9f503f700] DEBUG - Request: [192.168.68.237:51848 (Subnet)] GET /library/parts/88731/1603757813/file.mp4 (8 live) TLS Signed-in Token (user@nowhere.com) (range: bytes=123604816-) 
Nov 09, 2020 20:06:24.875 [0x7fd9f503f700] DEBUG - Content-Length of /volume2/video/Movies/FTL/FTL.mp4 is 14268140 (of total: 137872956).
Nov 09, 2020 20:06:24.882 [0x7fd9f4d51700] DEBUG - Failed to stream media, client probably disconnected after 425984 bytes: 104 - Connection reset by peer
Nov 09, 2020 20:06:24.882 [0x7fd9f4d51700] DEBUG - Completed after connection close: [192.168.68.237:51847] 206 GET /library/parts/88731/1603757813/file.mp4 (8 live) TLS 170ms 425984 bytes (range: bytes=1634034-) 
Nov 09, 2020 20:06:25.016 [0x7fd9f4a63700] DEBUG - Auth: authenticated user 1 as user@nowhere.com
Nov 09, 2020 20:06:25.016 [0x7fd9e7df2700] DEBUG - Request: [192.168.68.237:51849 (Subnet)] GET /library/parts/88731/1603757813/file.mp4 (8 live) TLS Signed-in Token (user@nowhere.com) (range: bytes=1650771-) 
Nov 09, 2020 20:06:25.022 [0x7fd9e7df2700] DEBUG - Content-Length of /volume2/video/Movies/FTL/FTL.mp4 is 136222185 (of total: 137872956).
Nov 09, 2020 20:06:25.029 [0x7fd9f4a63700] DEBUG - Failed to stream media, client probably disconnected after 393216 bytes: 104 - Connection reset by peer
Nov 09, 2020 20:06:25.029 [0x7fd9f4a63700] DEBUG - Completed after connection close: [192.168.68.237:51848] 206 GET /library/parts/88731/1603757813/file.mp4 (8 live) TLS 159ms 393216 bytes (range: bytes=123604816-) 
Nov 09, 2020 20:06:25.154 [0x7fd9f4a63700] DEBUG - Auth: authenticated user 1 as user@nowhere.com
Nov 09, 2020 20:06:25.154 [0x7fd9e7322700] DEBUG - Request: [192.168.68.237:51850 (Subnet)] GET /library/parts/88731/1603757813/file.mp4 (8 live) TLS Signed-in Token (user@nowhere.com) (range: bytes=123605538-) 
Nov 09, 2020 20:06:25.160 [0x7fd9e7322700] DEBUG - Content-Length of /volume2/video/Movies/FTL/FTL.mp4 is 14267418 (of total: 137872956).
Nov 09, 2020 20:06:25.168 [0x7fd9f4a63700] DEBUG - Failed to stream media, client probably disconnected after 409600 bytes: 104 - Connection reset by peer
Nov 09, 2020 20:06:25.168 [0x7fd9f4a63700] DEBUG - Completed after connection close: [192.168.68.237:51849] 206 GET /library/parts/88731/1603757813/file.mp4 (8 live) TLS 152ms 409600 bytes (range: bytes=1650771-) 
Nov 09, 2020 20:06:25.281 [0x7fd9f4d51700] DEBUG - Auth: authenticated user 1 as user@nowhere.com
Nov 09, 2020 20:06:25.281 [0x7fd9f503f700] DEBUG - Request: [192.168.68.237:51851 (Subnet)] GET /library/parts/88731/1603757813/file.mp4 (8 live) TLS Signed-in Token (user@nowhere.com) (range: bytes=1653140-) 
Nov 09, 2020 20:06:25.287 [0x7fd9f503f700] DEBUG - Content-Length of /volume2/video/Movies/FTL/FTL.mp4 is 136219816 (of total: 137872956).
Nov 09, 2020 20:06:25.293 [0x7fd9f4d51700] DEBUG - Failed to stream media, client probably disconnected after 409600 bytes: 104 - Connection reset by peer
Nov 09, 2020 20:06:25.294 [0x7fd9f4d51700] DEBUG - Completed after connection close: [192.168.68.237:51850] 206 GET /library/parts/88731/1603757813/file.mp4 (8 live) TLS 139ms 409600 bytes (range: bytes=123605538-) 
Nov 09, 2020 20:06:25.419 [0x7fd9f4d51700] DEBUG - Auth: authenticated user 1 as user@nowhere.com
Nov 09, 2020 20:06:25.420 [0x7fd9f503f700] DEBUG - Request: [192.168.68.237:51852 (Subnet)] GET /library/parts/88731/1603757813/file.mp4 (8 live) TLS Signed-in Token (user@nowhere.com) (range: bytes=123606253-) 
Nov 09, 2020 20:06:25.425 [0x7fd9f503f700] DEBUG - Content-Length of /volume2/video/Movies/FTL/FTL.mp4 is 14266703 (of total: 137872956).
Nov 09, 2020 20:06:25.438 [0x7fd9f4a63700] DEBUG - Failed to stream media, client probably disconnected after 409600 bytes: 104 - Connection reset by peer
Nov 09, 2020 20:06:25.438 [0x7fd9f4a63700] DEBUG - Completed after connection close: [192.168.68.237:51851] 206 GET /library/parts/88731/1603757813/file.mp4 (8 live) TLS 157ms 409600 bytes (range: bytes=1653140-) 
Nov 09, 2020 20:06:25.573 [0x7fd9f4d51700] DEBUG - Auth: authenticated user 1 as user@nowhere.com
Nov 09, 2020 20:06:25.574 [0x7fd9e7322700] DEBUG - Request: [192.168.68.237:51854 (Subnet)] GET /library/parts/88731/1603757813/file.mp4 (8 live) TLS Signed-in Token (user@nowhere.com) (range: bytes=1654536-) 
Nov 09, 2020 20:06:25.579 [0x7fd9e7322700] DEBUG - Content-Length of /volume2/video/Movies/FTL/FTL.mp4 is 136218420 (of total: 137872956).
Nov 09, 2020 20:06:25.586 [0x7fd9f4d51700] DEBUG - Failed to stream media, client probably disconnected after 393216 bytes: 104 - Connection reset by peer
Nov 09, 2020 20:06:25.586 [0x7fd9f4d51700] DEBUG - Completed after connection close: [192.168.68.237:51852] 206 GET /library/parts/88731/1603757813/file.mp4 (8 live) TLS 166ms 393216 bytes (range: bytes=123606253-) 
Nov 09, 2020 20:06:25.715 [0x7fd9f4a63700] DEBUG - Auth: authenticated user 1 as user@nowhere.com
Nov 09, 2020 20:06:25.716 [0x7fd9e7df2700] DEBUG - Request: [192.168.68.237:51855 (Subnet)] GET /library/parts/88731/1603757813/file.mp4 (8 live) TLS Signed-in Token (user@nowhere.com) (range: bytes=123606959-) 
Nov 09, 2020 20:06:25.721 [0x7fd9e7df2700] DEBUG - Content-Length of /volume2/video/Movies/FTL/FTL.mp4 is 14265997 (of total: 137872956).
Nov 09, 2020 20:06:25.728 [0x7fd9f4a63700] DEBUG - Failed to stream media, client probably disconnected after 409600 bytes: 104 - Connection reset by peer
Nov 09, 2020 20:06:25.728 [0x7fd9f4a63700] DEBUG - Completed after connection close: [192.168.68.237:51854] 206 GET /library/parts/88731/1603757813/file.mp4 (8 live) TLS 154ms 409600 bytes (range: bytes=1654536-) 

It seems that the server is having a connection reset every few seconds which is likely resulting in the stuttering video.

In comparison, here is a log for a video that works.

Nov 10, 2020 14:58:38.650 [0x7fd9f4a63700] DEBUG - Auth: authenticated user 1 as user@nowhere.com
Nov 10, 2020 14:58:38.650 [0x7fd9e4806700] DEBUG - Request: [192.168.68.237:8500 (Subnet)] GET /library/parts/83906/1541986219/file.MKV (6 live) TLS Signed-in Token (user@nowhere.com) (range: bytes=0-) 
Nov 10, 2020 14:58:38.656 [0x7fd9e4806700] DEBUG - Content-Length of /volume2/video/Music Videos/Phantastic Ferniture/Phantastic Ferniture - ■■■■■■ ‘n’ Rollin.MKV is 45223777 (of total: 45223777).
Nov 10, 2020 14:58:38.710 [0x7fd9f4d51700] DEBUG - Completed: [192.168.68.237:8498] 200 GET /photo/:/transcode?width=1920&height=1233&minSize=1&opacity=10&background=343a3f&url=%2Flibrary%2Fmetadata%2F37817%2Fart%2F1601889685%3FX-Plex-Token%3Dxxxxxxxxxxxxxxxxxxxx%26X-Plex-Account-ID%3D1 (6 live) TLS GZIP 461ms 8956 bytes (pipelined: 1)
Nov 10, 2020 14:58:39.908 [0x7fd9f4d51700] DEBUG - Auth: authenticated user 1 as user@nowhere.com
Nov 10, 2020 14:58:39.909 [0x7fd9e4806700] DEBUG - Request: [192.168.68.237:8498 (Subnet)] GET /:/timeline?ratingKey=37817&key=%2Flibrary%2Fmetadata%2F37817&playbackTime=1001&playQueueItemID=7944&state=playing&hasMDE=1&time=0&duration=204000 (6 live) TLS GZIP Signed-in Token (user@nowhere.com)
Nov 10, 2020 14:58:39.911 [0x7fd9e4806700] DEBUG - Client [h47584pik7o2h0cr4zmewz70] reporting timeline state playing, progress of 0/204000ms for guid=, playbackTime=1001ms ratingKey=37817 url=, key=/library/metadata/37817, containerKey=, metadataId=37817, source=

...

Nov 10, 2020 15:00:11.627 [0x7fd9f4a63700] DEBUG - Auth: authenticated user 1 as user@nowhere.com
Nov 10, 2020 15:00:11.627 [0x7fd9e4806700] DEBUG - Request: [192.168.68.237:8498 (Subnet)] GET /:/timeline?ratingKey=37817&key=%2Flibrary%2Fmetadata%2F37817&playbackTime=92430&playQueueItemID=7944&state=paused&hasMDE=1&time=92000&duration=204000 (4 live) TLS GZIP Signed-in Token (user@nowhere.com)
Nov 10, 2020 15:00:11.629 [0x7fd9e4806700] DEBUG - Client [h47584pik7o2h0cr4zmewz70] reporting timeline state paused, progress of 92000/204000ms for guid=, playbackTime=92430ms ratingKey=37817 url=, key=/library/metadata/37817, containerKey=, metadataId=37817, source=
Nov 10, 2020 15:00:11.632 [0x7fd9e4806700] DEBUG - Play progress on 37817 'Phantastic Ferniture - ■■■■■■ ‘n’ Rollin' - got played 92000 ms by account 1!

I have shortened the output for the working file, but most apparently it shows “Play progress” which I cannot find in the log for videos that don’t work.

I am not an expert, but it seems that the videos that don’t work, don’t use the transcoder at all. Maybe the problem is that the transcoder doesn’t get started for this video codec?

I understand. So, I have started 10+ video files using a different codecs and resolutions, but not a single one has triggered a response in DEBUG mode. I mean one of them gave the following out:

Nov 10, 2020 15:57:36.040 [0x7fd9e7df2700] DEBUG - [Transcode] Streaming Resource: Reached Decision id=37635 codes=(MDE=1000,Direct play OK.) media=(id=36385 part=(id=83717 decision=direct play protocol=http streams=(Video=(id=149514 decision= width=1920 height=1080) Audio=(id=149515 decision= channels=0 rate=0))))

But I am guessing that we are looking for something like this (made up example):

Nov 10, 2020 15:57:36.040 [0x7fd9e7df2700] DEBUG - MDE: ...

Shouldn’t I see transcode being used more often? Maybe there is some kind of issue on the Synology platform?

I did some more testing and monitoring. Might have found something: It seems that the stuttering takes place when the video format is somewhat off. Oddly enough, it doesn’t seem to care about the x resolution, but a larger than normal y resolution seems to result in stuttering.

If you take a look at my first post, it shows a resolution of 1920x1088 which is 8 lines larger than the 1080 standard.

I will do some more testing, but thought that this might be helpful information.

I believe it also explains why I can convert these videos to the same format with the issue being gone right away.

Unfortunately, further testing shows that my findings above have been incorrect. I basically found files with a format of 1920x1088 that play just fine…

Back to the drawing board… :disappointed:

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