Server Version#: 1.41.3.9314 and an update or 2 earlier
Player Version#: 4.141.0
I noticed some of my old 4:3 aspect ratio TV episodes started playing in Plex Web in a stretched aspect ratio and then some others did not. I isolated the problem to MP4 files that were NOT web optimized. This technically should not matter when playing back the file. I tested the theory by optimizing some of those that weren’t and then playing them back in Plex Web. They played with the correct aspect ratio.
The MP4 files were encoded from disc as 720x480, but with a pixel aspect ratio of 8x9 thus making the display size 640x480 which is typical for old TV show episodes. The iOS players don’t have the issue. I usually watch stuff in Plex Server on my Windows box, hence I’m using Plex Web built in. This started happening sometime during the updates issued in the spring or summer of 2024. I cannot tell you what update where the problem started. The Windows Movie & TV app plays the MP4 file fine (as well as VLC player).
This can happen when the aspect ratio stored in the container file and the inner video stream don’t match. Some players look at one place, other players look at the other place.
Share a file somewhere, I’ll try to suggest a fix.
Here’s a forum search with me (and others) blathering about various fixes for different versions of this problem.
https://forums.plex.tv/search?q=%40volts%20aspect%20ratio%20container%20order%3Alatest
Plex is a streaming server. It transports the videos per streaming protocol. What this means is that the player is never able to read the whole file in full. Instead, it receives successive chunks of the file from the server, while playback is progressing along the timeline.
If your mp4 files are not optimized for streaming, they have their media info header at the end of the file.
You can surely imagine that such a file, when transported without remuxing ((i.e. “Direct Play”), can tell the player the crucial media info only when it has been played already in full, because only then the file header is arriving in the player.
Optimize your mp4 files for streaming if you add them to your Plex libraries.
Doing so moves the file header to the beginning of the file, thus ensuring that the player can see it when it’s needed – i.e. at the beginning of playback.
There is software to do this in bulk.
I have optimized some of the files via the Plex Optimize function and it fixes the problem in the Plex Web player. However, the Plex Web player didn’t have the issue prior to the last few Plex Server updates. The same files that were not optimized played fine. And non-optimized files play fine in other players that I’ve tested (mainly iOS and Plex player in Amazon Fire Stick). Its as though Plex Web sees the 720x480 (storage size), but doesn’t see the pixel aspect ratio (PAR), or ignores it, of 8x9 thus making the correct display size 640x480.
I understand that MP4 files need to be web optimized and I usually do that via Handbrake when ripping discs, etc., but for whatever reason a handful of conversions got through without being web optimized which was probably my fault at some point. The fact remains that something changed in Plex Web which broke the correct playback. Having the MP4 header at the front is best, I know, but the file(s) should still play correctly even if not web optimized. And I don’t think its a browser issue. BTW, the standalone Plex Web app is also broken like the built-in Plex Web in PMS.
Thanks for the offer of suggesting a fix. I have examined the file(s) in question and determined that the only difference in the file that plays incorrectly and one that plays correctly is the web optimized flag being off vs. on. Plex Web is either ignoring the PAR or doesn’t see it and uses the storage size of 720x480 instead of the PAR of 8x9 thus 640x480. I can optimize the file(s) via the PMS optimize function which fixes the problem, but the player should play the files correctly regardless. Having a file web-optimized is best, yes, but it’s purpose is to make the streaming start faster, not correct or incorrect.
The Plex Optimize feature is not what I’m talking about. It performs a full transcode of the source file, which is not always needed.
If you are on Windows, you can use for instance mp3tag to perform the mp4 file optimization. It allows you to select several files at once for the operation.
Open the folder with the video file in mp3tag
right-click on this video file and pick ‘Utils’ - ‘Optimize MP4’
I do use mp3tag all the time for music files. Did not know about doing that with mp4 files. I chose the Original Quality in the Plex Optimize utility and it didn’t take but about 30 seconds for a 30 minute TV episode. Thanks for the tip.
UPDATE: Tried mp3tag like you suggested. I then did an Analyze in Plex on the file I tried with mp3tag and it now shows Web Optimized in the Info section. BUT, the display is still incorrect. So I did the Optimize in Plex and the file now plays correctly. Not sure why mp3tag did not do the trick.
Do you know of any other tool that might do the trick? Is there any tool to scan my libraries and give me a list of what files are not web optimized? (I’m probably only dreaming).
Share a file.
Or at least share the output of mediainfo -f.
Here is the Mediainfo for a 30 minute TV episode that is marked as non-web optimized in PMS. Plays fine in Plex Windows Desktop App, iOS on iPhone & iPad, Amazon Fire Stick. Does NOT play correctly in Plex Web, both standalone and PMS builtin versions. The only time that a non-web optimized file will display correctly in Plex Web is when the pixel aspect ratio (PAR) is 1:1. As I stated in my first post Plex Web did not have an issue playing non-web optimized files as of a few Plex Web updates ago.
Mediainfo-30 minute TV episode.txt (4.1 KB)
Needs the -f output to include both stream and container details.
What web browser?
Ok, it took me awhile to figure out how to use the mediainfo cli. The file is attached here using the -f switch like you suggested.
My browser is MS Edge, but I also tried Duck Duck Go browser with same results.
VideoFileData.txt (11.8 KB)
This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.