[Help Needed] Prevent Buffer issues when streaming

Hi All!

First i would like to say that i am 100% sure that all the posts in this threat will not solve all the problems. I undestand that to get better results you need a lot of different aspects…but let me tell what is the reason of this post:

I have these devices:

ATV 4
Roku 3
Samsung Smart TV
PS3
PS4
iPad

I n all of these i install the Plex app and i would like to know how can i have files that are most compatible with these devices.

Most of my Library are MKV 720p but when i am streaming (local or remote) have a lot of buffering…So… Here are my questions:

  1. Should i convert it to MP4 files?
  2. If Yes… Should I use the convert option or use Handbreak?
  3. What are the best settings to get better results? I really want i nice HD Quality!

Thanks for all help!

Braz.

Before even giving you an answer (and yes, we might just be able to answer all your questions in one thread :smiley: ), would you mind sharing some additional information with us?

  1. What is your server running on? Specifically, what is the processor information?
  2. Since you state you have buffering issues remote as well as local (local implies processor but remote implies Internet upload speed and processor), what are your download & upload internet service speeds?
  3. Do you have or can you capture one event in your log files and then post your log files here (collect all of them in a zip and attach it to your next post) ?
    The best way to capture/create an example is to start playback, run just long enough for it to start buffering. As soon as it does, stop playback. Wait 30-60 seconds for PMS to write to its log files then shutdown PMS. This is the best time to capture the log files.

To point out a few things MP4 container versus MKV container is immaterial. The encoding of the video (e.g. H.264, VC1, VP9, etc) and the encoding of the audio (MP3, AC3, DTS, etc) is what’s important. PMS reads all the containers with ease. It packages the audio and video in its format to stream to your device so you truly gain nothing by ‘converting to MP4’.

@ChuckPa said:
Before even giving you an answer (and yes, we might just be able to answer all your questions in one thread :smiley: ), would you mind sharing some additional information with us?

What is your server running on? Specifically, what is the processor information?

Intel i7 3770 K 8gb RAM - 1x 4 TB WD Red + 1x 3TB Samsung D3 Station

Since you state you have buffering issues remote as well as local (local implies processor but remote implies Internet upload speed and processor), what are your download & upload internet service speeds?

D/L: 50 Mbits - U/L: 5 Mbits

Do you have or can you capture one event in your log files and then post your log files here (collect all of them in a zip and attach it to your next post) ?

See attached

The best way to capture/create an example is to start playback,  run just long enough for it to start buffering.  As soon as it does, stop playback.  Wait 30-60 seconds for PMS to write to its log files then shutdown PMS.  This is the best time to capture the log files.  

To point out a few things MP4 container versus MKV container is immaterial. The encoding of the video (e.g. H.264, VC1, VP9, etc) and the encoding of the audio (MP3, AC3, DTS, etc) is what’s important. PMS reads all the containers with ease. It packages the audio and video in its format to stream to your device so you truly gain nothing by ‘converting to MP4’.

This last item is that really matter to me! I would like to know what are the best settings to get a “more compatible” file.

Thank you for your help!

Braz.

Thanks for the logs.

First, your processor isn’t, based on what I can see, the problem in any way nor should it be. Notice the “speed=4.3” in the line below. This means your processor is processing video at 4.3x real time. That’s plenty to stay ahead.

Aug 13, 2016 01:44:20.889 [11572] DEBUG - [Now] Device is Mystery 3 (Plex for Sony (PlayStation 3 01.17)).
Aug 13, 2016 01:44:20.889 [11572] DEBUG - [Now] Profile is PlayStation 4 App
Aug 13, 2016 01:44:20.889 [11572] DEBUG - [Now] Updated play state for /library/metadata/9448.
Aug 13, 2016 01:44:20.889 [11572] DEBUG - Statistics: (k3avbsmcs3l) Reporting active playback in state 0 of type 1 (scrobble: 0) for account 1
Aug 13, 2016 01:44:20.889 [11572] DEBUG - It took 0.0 sec to serialize a list with 0 elements.
Aug 13, 2016 01:44:20.890 [8684] DEBUG - Completed: [179.218.86.36:52560] 200 GET /:/timeline?ratingKey=9448&key=%2Flibrary%2Fmetadata%2F9448&state=playing&playQueueItemID=884&time=5085000&duration=8615082 (6 live) GZIP 7ms 433 bytes  (pipelined: 878)
Aug 13, 2016 01:44:21.180 [2028] DEBUG - Request: [127.0.0.1:37285] PUT /video/:/transcode/session/ah89k35t9ka/progress?progress=60.4&size=-22&speed=4.3&remaining=5842 (6 live)
Aug 13, 2016 01:44:21.180 [2028] DEBUG - Auth: We found auth token (xxxxxxxxxxxxxxxxxxxx), enabling token-based authentication.

Also, the bitrate (2.09 Mbps shown below) of your media is very low by comparison with what the cpu can do and well within your 5 Mbps upload limit

Aug 13, 2016 01:44:23.713 [11572] DEBUG - Request: [179.218.86.36:52536] GET /video/:/transcode/universal/session/ah89k35t9ka/base/01712.ts (5 live)
Aug 13, 2016 01:44:23.713 [11572] DEBUG - Asked for segment 1712 from session.
Aug 13, 2016 01:44:23.713 [11572] DEBUG - HLS segment range: 0 - 1732; average bitrate: 2.09 Mbps (segment size min/avg/max: 0.3/0.8/1.2)

This is pointing to a networking issue and not a media or computer issue in any way.

To that end,

  1. Do you have jumbo packets enabled on your network? If so, please turn them off. They cause problems like this due to the high latency on domestic grade equipment
  2. I know the Samsung-for-Plex app benefits greatly by increasing the buffering in its settings. The default settings are a bit ‘optimistic’ in my opinion when playing over wifi. I personally would rather wait 1-2 more seconds for the initial video to load than have it pause along the way to catch up. Check your other device apps as well. Bumping up their buffer sizes won’t hurt one bit.
  3. Do you have the SpeedTest app on any of your wireless devices? I recommend you run it, with your network otherwise quiet, and measure your performance. You should easily get 4 Mbps upload speed if you’re using a ‘G’ router or above. If you’re getting less than 4, this is something to dig into deeper. You can also repeat the same test using your computer at www.speedtest.net If your wifi is working correctly, it should be able to max-out your connection as easily as your wired connection.

Coming back to your question about what is the best media encoding? Ignoring the container (I prefer MKV because they are smaller and less ‘messy’ inside), standard H.264 video codec and AAC is the most compatible audio codec. Your cpu will not flinch if it has to convert DTS-HD -> AAC and stream it so do not be bothered down-converting. Keep your audio what you want for your TV and let your processor do the rest for the devices.

Let me know what you find on the 3 things above and we’ll go from there.

Is the server hardwired?

This is pointing to a networking issue and not a media or computer issue in any way.

To that end,

Do you have jumbo packets enabled on your network? If so, please turn them off.

Sorry i did not understand “jumbo packets enabled on your network?” How can i check it?

I know the Samsung-for-Plex app benefits greatly by increasing the buffering in its settings. The default settings are a bit ‘optimistic’ in my opinion when playing over wifi. I personally would rather wait 1-2 more seconds for the initial video to load than have it pause along the way to catch up. Check your other device apps as well. Bumping up their buffer sizes won’t hurt one bit.

I will change the values

Do you have the SpeedTest app on any of your wireless devices? I recommend you run it, with your network otherwise quiet, and measure your performance. You should easily get 4 Mbps upload speed if you’re using a ‘G’ router or above. If you’re getting less than 4, this is something to dig into deeper. You can also repeat the same test using your computer at www.speedtest.net If your wifi is working correctly, it should be able to max-out your connection as easily as your wired connection.

I will post the results… I use SAGEMCOM DSL-Router

Coming back to your question about what is the best media encoding? Ignoring the container (I prefer MKV because they are smaller and less ‘messy’ inside), standard H.264 video codec and AAC is the most compatible audio codec. Your cpu will not flinch if it has to convert DTS-HD → AAC and stream it so do not be bothered down-converting. Keep your audio what you want for your TV and let your processor do the rest for the devices.

OK Thanks :slight_smile:

@danjames92 said:
Is the server hardwired?

PC is wired connect to the router and streams either wired and wi-fi. All 4 ports are used to some device.

THX,
Braz.

Ah, the good old, and pretty useless Sagemcom modem… I have Windstream vbond service. it’s what they use and it’s stupid.

To check Jumbo frames.

If Windows: into the network configuration for IP setings… then deeper into the adapter’s settings. Forget my way there as I’m on Linux.

easiest thing to look for is the MTU. if it’s 1500, you’re not using Jumbo Frames. That’s the default MTU. Jumbo frames will start at 2K and go up

@ChuckPa said:
Ah, the good old, and pretty useless Sagemcom modem… I have Windstream vbond service. it’s what they use and it’s stupid.

To check Jumbo frames.

If Windows: into the network configuration for IP setings… then deeper into the adapter’s settings. Forget my way there as I’m on Linux.

easiest thing to look for is the MTU. if it’s 1500, you’re not using Jumbo Frames. That’s the default MTU. Jumbo frames will start at 2K and go up

I Think that´s what you want to see:

Thanks fo your help!


Yes, Jumbo frames are not enabled. 1492 is the DSL value. 1500 is the ethernet value. These are correct.

Next, go to http://www.speedtest.net on your computer. Run the speed test 3 times and use the highest values for upload and download

After that, get the speedtest app (by Ookla) for your phone or tablet. Repeat the test there.

Report back with your results. If any of them are less than 4 Mbps upload speed, you have identified the problem.

@ChuckPa said:
Yes, Jumbo frames are not enabled. 1492 is the DSL value. 1500 is the ethernet value. These are correct.

Next, go to http://www.speedtest.net on your computer. Run the speed test 3 times and use the highest values for upload and download

After that, get the speedtest app (by Ookla) for your phone or tablet. Repeat the test there.

Report back with your results. If any of them are less than 4 Mbps upload speed, you have identified the problem.

Wired

Wireless

Now repeat the test using a tablet because you said there is a problem whether local or remote.

@ChuckPa said:
Now repeat the test using a tablet because you said there is a problem whether local or remote.Just

just did…Take a look on the previous message