Plex Friend is buffering whether or not transcoding is required, bit-rates seem to be within limits

@OttoKerner said:

@markmarz said:
So doesn’t this make the whole throttling discussion around 32400 moot?

No.
https://forums.plex.tv/discussion/comment/1376675/#Comment_1376675

You cannot rule out that they by now have developed a way to identify Plex traffic by other means than the port number.

If they’re not homing in on port numbers, then what difference does it make which I assign?

@markmarz said:
But then it seems to me it’s the luck of the draw whether remote Plex users are going to have a good experience - that is without buffering and high picture qualify.

It kinda is when longer distances come into play.

Maybe I have to set my bandwidth limits so low as to render poor video quality to avoid buffering. Doesn’t sound like I have any more options.

There is a tiny chance: if you have optimized versions of your videos which are Direct-Playable by the remote client (and the bandwidth limit is taken into account when they are generated).
When these files are DirectPlayed, they (usually) don’t get chopped up into small packets but are transferred as a continuous stream. So roundtrip delay is a smaller influence then.
It might make the crucial difference.

Of course then you are restricted to mostly stereo audio and burned-in subtitles (if at all).
The remote client might have to explicitly pick the right version (some Plex clients cannot do that) because it might not get picked automatically.

@OttoKerner said:

@markmarz said:
But then it seems to me it’s the luck of the draw whether remote Plex users are going to have a good experience - that is without buffering and high picture qualify.

There is a tiny chance: if you have optimized versions of your videos which are Direct-Playable by the remote client (and the bandwidth limit is taken into account when they are generated).

I’ve currently got 15 TB of videos, it’s just not practical to optimize them all. Besides, they’re all Direct Playable now on the Raspberry running Plex for Kodi. Almost all of them are AAC Stereo and have no subtitles. Those that do have subtitles are using external .SRT, maybe those wouldn’t be viewable.

The only optimization that could come into play for most of my videos, I think, would be reducing their bit rates.

That’s why I’ve been testing first with a Direct Play MP4 which has an overall bit rate = 1,703 kb/s (variable), progressive, AAC stereo. I just don’t think it’s unreasonable to expect this to play without buffering on a 10 Mb/s connection. In other words I’m getting frustrated! hah!

I go to sleep for a few hours and WOW this thread takes off… :slight_smile:

As far as Comcast throttling 32400. That is a definite YES! I also have Comcast and without a doubt it is throttled. Setting to a random port higher than 1000 and I got noticeable increases in speed of 3 to 10 times what 32400 had. Even with Comcast tech support on the line and telling me that 32400 wasn’t throttled it was pretty evident based on my results. Do a bit of research to find a port that’s clear, but for the most part anything over 1000 and under 65,000 should be good. Remember you need to also set it up in Plex’s Remote Access settings, too, so it gets propagated to client devices that try to connect remotely.

For port forwards using their equipment, the easiest way is this: Buy a mid-level or high-level consumer grade router. Get it installed and set up your port forwards and static IPs on that. Get everything ready to go. Then it’s time to call Comcast Tech Support and have them convert their equipment from a router to a bridge. This is a simple flag on that model of router, as I have the same device on my network. When they installed it, I was ready to go, just needed to have them switch it to a bridge. (I had everything working from my own router back before their device went in, so I knew it was working before hand.)

You will need to plug your new router’s WAN port into the Comcast device’s port #1 and nothing else gets plugged into the Comcast device. Everything gets plugged into the router or makes WiFi connections on it. This way everything goes through YOUR hardware first, and then for all intents and purposes the Comcast device is nothing more than a piece of wire.

Once their device is a bridge you will need to restart your local router to get a good external IP from them and then you should be good to go. As you have your port forwards and statics set, everything should work with minimal fuss.

@markmarz said:
That’s why I’ve been testing first with a Direct Play MP4 which has an overall bit rate = 1,703 kb/s (variable), progressive, AAC stereo.

Make sure your mp4 files are ‘Optimized for streaming’
This is shown in the Plex media info btw.

@OttoKerner said:
Make sure your mp4 files are ‘Optimized for streaming’
This is shown in the Plex media info btw.

This would generally cause the media to be transcoded if this flag isn’t set. The OP’s issues appear to be more with Comcast throttling than with anything else, at this point. Although it’s a good idea to have this “Optimized for Streaming” flag set, it’s not likely to be the root of his problem.

@MikeG6.5 said:

@OttoKerner said:
Make sure your mp4 files are ‘Optimized for streaming’
This is shown in the Plex media info btw.

This would generally cause the media to be transcoded if this flag isn’t set. The OP’s issues appear to be more with Comcast throttling than with anything else, at this point. Although it’s a good idea to have this “Optimized for Streaming” flag set, it’s not likely to be the root of his problem.

I’m inclined to agree with Mike on this one. There’s no transcoding going on, that’s for sure. I’ve found a way I have to re-find to set this bit with a command line program, but right now I want to focus on buffering.

@MikeG6.5 said:
I go to sleep for a few hours and WOW this thread takes off… :slight_smile:

As far as Comcast throttling 32400. That is a definite YES!
But we’ve just determined that Comcast isn’t seeing traffic on 32400 in my setup, and my guess is, yours. Right? In my case, the port open to the internet is 28477. What does your Settings->Remote Access-> Private<-Public<-Internet show?

I’m not doubting your experience, I just don’t get it.

For port forwards using their equipment, the easiest way is this: Buy a mid-level or high-level consumer grade router. Get it installed and set up your port forwards and static IPs on that. Get everything ready to go. Then it’s time to call Comcast Tech Support and have them convert their equipment from a router to a bridge. This is a simple flag on that model of router, as I have the same device on my network. When they installed it, I was ready to go, just needed to have them switch it to a bridge. (I had everything working from my own router back before their device went in, so I knew it was working before hand.)

You will need to plug your new router’s WAN port into the Comcast device’s port #1 and nothing else gets plugged into the Comcast device. Everything gets plugged into the router or makes WiFi connections on it. This way everything goes through YOUR hardware first, and then for all intents and purposes the Comcast device is nothing more than a piece of wire.

Once their device is a bridge you will need to restart your local router to get a good external IP from them and then you should be good to go. As you have your port forwards and statics set, everything should work with minimal fuss.

Thanks for this, Mike. In fact I own this router, even though it’s branded Xfinity/Arris, it was legitimately purchased at Best Buy after Xfinity told me I needed this modem to support VOIP. I don’t use VOIP, it was just I had to have the hardware to support their Triple-Play bargain basement offer and this was it. And I needed a Docsis 3.0 modem anyway. Many regrets later.

I have an older router I might be able to use, or spend some more !@#$ money, why not? Hah-hah! I take it that you went the bridge route because you were unable to get Port Forwarding to work on the Arris TG862G-CT?

I will go this route (pun!) if someone can drill into my head why Port Forwarding will matter if Comcast doesn’t see 32400 and besides if they’re throttling, it may be by traffic detection that has nothing to with assigned ports.

@markmarz said:
I’m inclined to agree with Mike on this one. There’s no transcoding going on, that’s for sure. I’ve found a way I have to re-find to set this bit with a command line program, but right now I want to focus on buffering.

My point is: if optimized for streaming is not set, the file will be put through the transcoder.
Which then again will be causing the ‘chopping up’ into small packets, even if the processor load will be low, becaused it is practically just a ‘remux’ instead of a full blown ‘transcode’.

So, to achieve Direct Play, the optimized flag must be set. And this might be the deciding factor with a client that is 2000 miles away.

@OttoKerner said:

@markmarz said:
I’m inclined to agree with Mike on this one. There’s no transcoding going on, that’s for sure. I’ve found a way I have to re-find to set this bit with a command line program, but right now I want to focus on buffering.

My point is: if optimized for streaming is not set, the file will be put through the transcoder.
Which then again will be causing the ‘chopping up’ into small packets, even if the processor load will be low, becaused it is practically just a ‘remux’ instead of a full blown ‘transcode’.

So, to achieve Direct Play, the optimized flag must be set. And this might be the deciding factor with a client that is 2000 miles away.

But there is definitely no transcoding; or let me say this:

  1. Direct Play is indicated by Plex Status i flag
  2. Direct Play is indicated by PlexPy
  3. CPU usage is really low

Besides just for grins I checked the low bit rate MP4 file and its MOOV atom is already positioned towards the front.

@markmarz said:
Besides just for grins I checked the low bit rate MP4 file and its MOOV atom is already positioned towards the front.

Well, I’m grinning on the other side of my face now! In fact the MOOV atom was after mdat, so I used ffmpeg to move it to the front:
ffmpeg -i “Gay Purr-ee (1962).mp4” -c:v copy -c:a copy -movflags faststart “Gay Purr-ee (1962).mov.mp4”

And checked with AtomicParsley; it’s right after ftyp now:
E:\dvd_input\Gay Purr-ee (1962)>atomicparsley.exe “Gay Purr-ee (1962).mov.mp4” -T | more
+»-±+Atom ftyp @ 0 of size: 32, ends @ 32
Atom moov @ 32 of size: 3976816, ends @ 3976848
Atom mvhd @ 40 of size: 108, ends @ 148

I will rename *mov.mp4 to *mp4 and move it to my server, then ask my brother to try again.

I was finally able to get to no buffering, or at worst minimal buffering only at the start of a video. Here’s how:

  1. Web optimized MP4. This resulted in a very much faster startup, though there was still a little buffering at startup.
  2. Limit remote stream bitrate to 2 Mbps (480p); left Internet upload speed at 10 Mbps. The quality was degraded but watchable according to my brother. He called it ‘acceptable SD’. Could no longer make out individual beard stubble. Hah-hah!

Limiting remote stream bit rate was key. Finally I was able to see my videos being transcoded, even those normally Direct Playable, because Plex was working as I expected to reduce the bit rate. Web optimizing helped at startup, but he had the same quality/no buffering with non-optimized videos once past startup. Nevertheless I will set up a batch script to optimize all my non-optimized MP4s (the majority).

Is there an equivalent to MP4 web optimization for MKVs? My MKVs contain MPEG-2 videos, so the MOOV atom doesn’t apply but perhaps something else does.

I’m glad that Plex is now usable but very disappointed that I have to reduce the quality so much. I guess that’s life when transmitting over 2,000 miles. Hadn’t read about distance mattering before. Here’s hoping I have similar success when trying again with my daughter, who is a similar distance away but has a better client in the Raspberry.

I’m still considering hooking up an old DLink Gigabit router to my Arris & setting the Arris to bridge mode, solely so I can use a different external port with the aim of sneaking past throttling. But it still doesn’t make sense to me, since Comcast isn’t seeing 32400 now. If someone could explain this, I’d appreciate it.

Thanks @OttoKerner and @MikeG6.5! I’m not marking this question answered till all my questions are answered, but I feel we’ve made good progress.

Here is another thing to try for those movies that get transcoded:

Settings - Server - Transcoder - (Show Advanced) -
‘Transcoder default duration’
‘Transcoder default throttle buffer’

slightly raise these values by 50% at a time and then check out the playback behaviour of transcoded videos over a longer time (test for days, not minutes). Don’t get crazy here, over-doing it will have negative consequences.

MKVs always have their header at the beginning of the file, so they are always ‘optimzed for streaming’. The thing is that there are not so many clients which can Direct-Play a MKV.
So most of MKVs will get at least remuxed to TS or mp4 when streamed with Plex.

@OttoKerner said:
Here is another thing to try for those movies that get transcoded:

Settings - Server - Transcoder - (Show Advanced) -
‘Transcoder default duration’
‘Transcoder default throttle buffer’

slightly raise these values by 50% at a time and then check out the playback behaviour of transcoded videos over a longer time (test for days, not minutes). Don’t get crazy here, over-doing it will have negative consequences.
Thanks Otto, I will try that when my brother has the the time. In my particular circumstance, it’s my daughter who is the ultimate beneficiary. She doesn’t have the time to mess with this, and since there’s about 1,000 miles between them, any tweaks I find for him may not apply for her.

MKVs always have their header at the beginning of the file, so they are always ‘optimzed for streaming’. The thing is that there are not so many clients which can Direct-Play a MKV.
Didn’t know MKVs were already optimized, thanks. Fortunately the Raspberry running Plex for Kodi Direct Plays MP4 & MKV (Mpeg-2) just fine.

Regarding the MOOV atom: unfortunately my server is not running proper ffmpeg (it’s running the avconv version) so it cannot move the MOOV atom. I have found a program that seems well thought of that will work on Debian named MP4Box. The catch is that the way to move the atom is by using the interleaving option and specifying an interleave value of zero. This is supposed to result in no actual interleaving, and perhaps it does, but the console messages indicate it’s doing its default interleaving of 500 ms anyway. There is another way in MP4Box to move the atom, but it doesn’t support multiple audio streams.

Do you know anything about interleaving videos? I can’t find any references to it in relation to Plex. I’m reluctant to do any more manipulation of my thousands of videos than necessary. Especially when I don’t know what’s happening. I did try it on just one video and it definitely moved the atom and it plays fine.

https://gpac.wp.imt.fr/mp4box/mp4box-documentation/

-inter Duration : interleaves media data in chunks of desired duration (in seconds). This is useful to optimize the file for HTTP/FTP streaming or reducing disk access. All meta data are placed first in the file, allowing a player to start playback while downloading the content. By default MP4Box always stores files with half a second interleaving and performs drift checking between tracks while interleaving. Specifying a 0 interleaving time will result in the file being stored without interleaving, with all meta-data placed at beginning of the file.

@markmarz said:
Regarding the MOOV atom: unfortunately my server is not running proper ffmpeg (it’s running the avconv version) so it cannot move the MOOV atom.

I have not much knowledge about Linux, but I think if you take a look into your Plex server program folder, you’ll find a ffmpeg version in there, renamed to plex transcoder (or similar). It has been patched to add some stuff Plex needs for its work, but the command line params are still the same.
It definitely can move the atoms, since that is what it’s doing when you let it Optimize a file.

@OttoKerner said:
I have not much knowledge about Linux, but I think if you take a look into your Plex server program folder, you’ll find a ffmpeg version in there, renamed to plex transcoder (or similar). It has been patched to add some stuff Plex needs for its work, but the command line params are still the same.

This is an exciting possibility but so far no luck. The closest I’ve found is
/usr/lib/plexmediaserver/Plex Transcoder

… which I can’t get to run from the command line:
root@omv:/usr/lib/plexmediaserver# "/usr/lib/plexmediaserver/Plex Transcoder" /usr/lib/plexmediaserver/Plex Transcoder: error while loading shared libraries: libva-drm.so.1: cannot open shared object file: No such file or directory

I’ll keep poking around.
So no ideas about interleaving huh?

@markmarz said:
… which I can’t get to run from the command line:
root@omv:/usr/lib/plexmediaserver# "/usr/lib/plexmediaserver/Plex Transcoder" /usr/lib/plexmediaserver/Plex Transcoder: error while loading shared libraries: libva-drm.so.1: cannot open shared object file: No such file or directory

It needs environment vars to find some external libs. Take a look at the invocation in this log file for example: https://forums.plex.tv/discussion/255156/transcoder-unknown-encoder-aac

So no ideas about interleaving huh?

Sorry, no. I am a GUI person. I simply point my little mp3tag to my files and tell it to optimize them. :slight_smile:

@OttoKerner said:
Sorry, no. I am a GUI person. I simply point my little mp3tag to my files and tell it to optimize them. :slight_smile:

Hah-hah-hahh!!! You could have fooled me!! Ha-hah! Well, I’d be lost without you, GUI or no, sir!

In case you don’t already know it,
take a look at this treasure trove:

There are tons of good stuff in there. CLI and GUI :smiley:

@OttoKerner said:
In case you don’t already know it,
take a look at this treasure trove:
https://forums.plex.tv/discussion/131308/cayars-setup-walk-through-and-some-tips-and-tricks/p1#top

There are tons of good stuff in there. CLI and GUI :smiley:

Very nice, I did not know that!