[FEATURE REQUEST] Display flag for letterboxed fullscreen DVDs

Some DVDs have anamorphic flags set for full screen (i.e., the 720x480 image displays as 640x480) but the content of the movie is widescreen—the black bars at the top and bottom of the screen are actually part of the data in each displayed 640x480 frame. This displayed the movie as widescreen on old 4:3 TVs but when displayed on a widescreen TV, the movie is treated as having a 4:3 aspect ratio and is displayed with black bars on the sides. The final result is a small image in the middle of the screen surrounded by thick black bars.

For example, Three Amigos (from 1986) is 720x480 on the disc. But the top 64 rows of pixels and bottom 70 rows of pixels are just black so there are only 480-64-70=346 lines of resolution. There are some extra black columns of pixels on the left and right as well (4 on each side) so the dimensions of the useful frame are 712x346. The pixel aspect ratio of the content is flagged as 8x9 (width x height) so this will display as 632x346 representing an aspect ratio of 1.83:1 which is very close to the 1.85 of the theatrical release. To display this on a full HD screen (1920x1080), the scaling factor is 1080/480=2.25x so the final image will be displayed as 1422x778. Only about half of the screen area is filled with image!

Here’s my feature request: could there be a settable “zoom to maximize screen width” flag somewhere in PMS? Then these files would display correctly. Plex has to sort out the anamorphic flags anyway so it seems like this shouldn’t be too hard. The checkbox for this could be made to only appear for 4:3 files to avoid overly cluttering the UI. Having a flag like this would just zoom the image until the file frame width matched the screen frame width; the top and bottom of the frame would be cropped off but this would be the desired effect when those are just black regions anyway.

Yes, I know that these are low-resolution DVDs and I should replace them with better versions. But in some cases, I don’t want to buy new discs and in other cases, the movies are out of print and these versions are the only ones available.

Yes, I know that I can use Handbrake to crop off the black bars and get the movie to fill the screen. But I prefer to display from the non-transcoded source and I’d rather not have two versions of the same movie if I can help it.

A feature like this would be really nice for compatibility with older discs in people’s libraries!

@jeremy1180 said:
Yes, I know that these are low-resolution DVDs and I should replace them with better versions.

I have some DVD rips that look way better than their HD successors.

Yes, I know that I can use Handbrake to crop off the black bars and get the movie to fill the screen. But I prefer to display from the non-transcoded source and I’d rather not have two versions of the same movie if I can help it.

You are, simply put, an Aspect Ratio Murderer. Own It. Wear it like badge of Dishonor.

Continue reading - several options and personal opinions abound:

--------- handy info if you’d like to come back to the church and seek redemption.----------

It’s very easy.
Do NOT let Plex transcode ANY DVD! The transcoder simply doesn’t know how DVD’s work.

https://forums.plex.tv/discussion/comment/1335697/#Comment_1335697
Encode them properly yourself and any player on Planet Earth will have no problem playing them back properly.

Custom anamorphic setting for DVDs you want to display at their full width in the proper aspect ratio is explained in painful detail at the link above. In short NTSC DVDs are stored properly at 720x480, but when played back, if your Custom Settings are correct a 16:9 item displays as 854x480. Letter boxing is some flavor of that height dimension, but if the Custom Width is kept at 854, the height works itself out depending how much you crop. These items, of course, display ‘Letterboxed’ correctly.

4:3 items have a width setting of 640, but are still stored properly at 720x480. They, of course, display ‘Pillar Boxed’ correctly.

The above examples are for NTSC. PAL is another animal - it’s Custom Width would be 1024 for 16:9 and storage would be done at 720x576 and for 4:3 content, I 'think it’s 768x576 - so you would make the Custom Width 768 - maybe. If you require more accuracy on those numbers, you’re on your own. Google it. I can’t remember off the top of my head. I work in NTSC so PAL dimensions aren’t at the top of my Best Seller List.

It is complicated - which is probably why Plex Developers are unable to make the transcoder do anything, but destroy DVD content. They, themselves don’t know how it works - but I do - as do many, many others.

The Guide above cuts a few years off the learning curve, but it will still take some good old fashioned labor, many tests, developing an understanding, and finally putting it into practice.

Note:
Do NOT attempt DVD encodes with the new Windows Version of Handbrake.
Version 0.10.5 is the last known version with sane Custom Settings - which is the ONLY way you’re gonna get DVDs to work properly. There’s a rumor going around HB is working on the fix - so far - crickets.

Note 2:
If you are one of the aforementioned Aspect Ratio Murderers - your twisted desire to FORCE everything onto your screen because you have ‘Mommy Issues’ with black bars - use PMP (top of the forum/downloads/get an app). It will allow you to mangle your material in whatever sick way you see fit (lol), but do be advised that ONLY works from the settings in ‘Full Screen/App View’ PMP mode.

Here are Fred Astaire and Ginger Rogers in a PSA confronting Aspect Ratio Murder and a graphic example of why you shouldn’t do it:

:#

Ok folks, thanks for the detailed replies but I must have explained things poorly because you misunderstood my problem and feature request. Few things bug me more than displaying things with with incorrect aspect ratio so I am no “Aspect Ratio Murderer”. I’m the first guy to angrily go looking for the remote when I see a 4:3 image stretched horizontally to fill a 16:9 TV. I would never ever ever propose altering the display aspect ratio.

I’ll try to explain again. This time with pictures!

First off, all DVDs of TV shows and movies are anamorphic. DVD frames are always 720x480 pixels – an aspect ratio of 3:2. 3:2 is an aspect ratio commonly used in photography (think 4x6 prints) but is not the right aspect ratio for SD TVs or widescreen TVs. Here’s the 3:2 aspect ratio shown on the LCD screen of a Canon 5D Mark III (5760x3840 pixels; a 3:2 aspect ratio):

I suspect that 3:2 was chosen as a compromise between the aspect ratio fading from popularity (4:3) and the aspect ratio of the future (16:9). By being in between these two, a little stretching or squashing could fill either screen size. Stretching or squashing in this case means that the pixels are treated as rectangles rather than squares – which is what I meant by anamorphic: non-square pixels.

For widescreen (16:9), the pixels have an aspect ratio of 32:27 (1.185:1, width to height; note that pixel dimensions don’t have any physical meaning but are just included to show the exact pixel aspect ratio):

For fullscreen (4:3), the pixels have an aspect ratio of 8:9 (0.889:1):

For content that is widescreen (assumed to be 16:9 for now), there are two ways to get it to display correctly:
1. “Anamorphic widescreen” – A 16:9 image is squashed horizontally into a 3:2 aspect ratio (720x480 pixels) and a flag is set so that the player knows to stretch the pixels horizontally when playing back the DVD (the pixels are stretched by a factor of 1.185x as indicated above). The display size is 853x480 even though the frame is only 720x480.


2. Letterboxed – In this case, the fullscreen flag is set so the displayed frame is 640x480 (the horizontal size is reduced by a factor of 0.889 as indicated above). However, the content is widescreen so it will fill the available width (640 pixels) and its height will be 9/16 of this, or 360 pixels. So in this case, the display size of the content is 640x360 which would be stored on the disc as 720x360. Since all frames are 720x480, this requires the frame to be hard matted – 60 rows of black are added to the top and bottom to get up to the standard 720x480 size.

The problem I tried to communicate in my original post has to do with these letterboxed widescreen DVDs (#2).

On a 4:3 TV, this version displays fine:

But on a 16:9 TV, black bars are inserted on the right and left (source frame outlined in red below for illustrative purposes). The 16:9 TV doesn’t know that there are useless black bars at the top and bottom; it’s just displaying the image with the correct pixel aspect ratio and zooming as much as possible without cropping anything. Note that this thick black border is also present for similar reasons when viewing SD channels on widescreen TVs.

My feature request is for a zoom feature that would expand the video until its width matched the screen width allowing the top and bottom to be cropped off: i.e., “horizontally constrained zooming”. Because the source is letterboxed, only black rows of pixels on the top and bottom are lost:


For fullscreen content, this would mean cropping off non-black portions of the frame.

The workaround I have for now is to transcode only the content portion of the original frame in Handbrake, cropping off the black bars on the top and bottom but preserving the pixel aspect ratio information. Then the video is displayed with the correct aspect ratio and the TV can enlarge the frame much more before hitting the screen boundaries (typically until the width of the video matches the screen width). But I would rather set a flag in Plex and have Plex take care of it for me!

Another zoom feature that some might want is a zoom feature that matches the height of the content portion of the video to the screen height (vertically constrained zooming). I think this is what @trumpy81 was referring to:

This still maintains the correct aspect ratio but fills the whole screen with image at the expense of cropping off the left and right portions. This one is harder to do since for DVD and Blu-ray rips it won’t be obvious how much to zoom; you’d basically need a way to specify how tall the content portion of the frame is or the software would have to be very clever and figure this out for you (Handbrake does this but doesn’t always do it correctly).

iOS devices can do both of these kinds of zooming (horizontally and vertically constrained).

Finally, I’m aware that many TVs generally have zoom features to help with these sorts of problems. But again, it would be super nice if this could be set once in Plex and never dealt with again. Finding the TV remote, figuring out how the zoom feature works, which buttons to press, etc. is a pain.

You’re encoding wrong - plain and simple. You also are not aware of the ‘Reason’ for Storage at 720x480. The reason is that’s as big as you get on a DVD disc. That’s the max. ‘Anamorphic’ had to be ‘invented’ so playback could occur at the correct aspect ratio of 854x480 while storage took place at 720x480. Widescreen/Letterboxed DVDs can be ‘Stored’ all day at 720x480. That won’t effect the playing back of them at the correct aspect ratio.

BluRay discs are different. They can hold the resolution as it is. No need for Anamorphic. Just make it what it is.

While the video is in ‘Storage’ it doesn’t matter if those pixels are square or not. You’re not watching the video while it’s in storage. You only watch it once it comes out of storage onto your TV Screen. If you set up the material correctly in Handbrake that happens. If you don’t - it don’t happen.

You can NOT set up the material properly in Windows Versions of Handbrake above Version 0.10.5.
That’s why none of your stuff is working correctly.
Go Here:
HandBrake: Old Releases

https://forums.plex.tv/discussion/comment/1335697/#Comment_1335697
There are the screenshots leading to ‘The Correct Way’ for widescreen letterbox - Source 720x480, set the Width to 720, the Height to 480. Select Custom from the Anamorphic dropdown and set the Custom Width to 854. Crop out the black bars. The video will be ‘Stored’ at 720x480. Plex will recognize it as 480p. When displayed on your TV it will have a width of 854 and a height of ‘whatever it is’. A full 16:9 image will fill up your screen because you didn’t crop anything off of it. The full resolution, once it hits the TV will be 854x480.

You can just encode at 854x480 because Plex will now call it 480p. A few months ago Plex was calling those 576p. Who knows how other players and environments are going to deal with 854x480. Plex didn’t know what they were doing in the first place, so they didn’t know how to handle it when they ‘fixed’ it. Read all about it:
https://forums.plex.tv/discussion/266445/why-is-plex-identifying-sd-video-as-576p
Right in that thread we find out Plex has no idea how to deal with DVDs. The transcoder is going to encode SD material at 720x404 obliterating all hope at maintaining some quality. Plex blasts nearly 80 pixels off the rock face before carving ever begins!

But… if you want to encode a DVD properly so it plays on everything refer to the image above. Store at 720x480.
If you crop out the black bars on letterboxed material, the Custom Width will still be 854. When displayed it will only be as tall as it is. You cropped out the black bars - so the player or your TV will happily put those back in for you, free of charge. The picture can only be as tall as it is - if there’s nothing there, it gets black automatically. No need to encode black in.

There’s also no need to worry about non-square pixels while the video is in storage. It - just - doesn’t - matter. You’re not watching storage.

You can also Store 4:3 material at 720x480 and have it magically transform into 640x480 on your TV. Simply set the Custom Width to 640. That’s as wide as it will ever display - on any player on Earth - and all will be good. You can just encode at 640x480 if you want to. I don’t, but you can. When I’m ripping 4:3 DVDs they come at 720x480 with the proper flag, so that’s how I keep them.

You can also request this ‘feature’ until you are blue in the face, but NOTHING is ever going to happen with it.
In the first place Plex doesn’t know what they’re doing regarding DVDs - so the chances of them figuring out a way to do what you want are quite remote. Your best hope is to fix it in post/pre-processing and take every opportunity to keep Plex away from it… bad things WILL happen otherwise.

:slight_smile:

@JuiceWSA – you don’t understand. Please re-read my post. The whole point of my feature request is that I don’t want to encode at all. Period.

I know how to use Handbrake and when I encode, I know exactly what I’m doing and get exactly the result I want with no aspect ratio distortion and no storage space wasted encoding black bars.

Just to restate everything:

  • Widescreen content is sometimes recorded on a DVD in “letterboxed” format with black bars on top and bottom written onto the disc.
  • When displaying on a widescreen TV from Plex, the rips of these discs (no encoding involved) will not display correctly; they display with a thick black border all around. I’ve seen some people describe this as a windowboxed or postage stamp image.
  • The only options for getting these videos to fill the screen are (1) transcoding the video using Handbrake or similar (which I know how to do correctly) or (2) using the zoom feature that some TVs have. Neither of these are ideal options. Transcoding requires time, effort, and more storage space for a second file; and I never want to mess with my TV settings if I don’t have to.
  • This could be managed with a single Plex flag that would tell the player to enlarge the video (preserving the aspect ratio) until the playback width matched the screen width, cropping off the black bars on the top and bottom. There have been some bugs in the past but these days, Plex seems to display all of my DVD rips true to the content on the disc (i.e., with the correct aspect ratio). It’s just that these letterboxed widescreen DVDs are treated as fullscreen (because that’s how they’re written on the disc) so they end up being displayed with thick black borders all around. This isn’t Plex’s fault, it’s just an artifact of how the discs were formatted. But Plex could add a feature and make it go away and it would “just work”.

@jeremy1180 said:
Just to restate everything:

  • Widescreen content is sometimes recorded on a DVD in “letterboxed” format with black bars on top and bottom written onto the disc.
  • When displaying on a widescreen TV from Plex, the rips of these discs (no encoding involved) will not display correctly; they display with a thick black border all around. I’ve seen some people describe this as a windowboxed or postage stamp image.

They are encoded wrong, or are encoded as 16:9 in 1.33 - which is… wrong.
Your options are limited. You can:

  1. Live with it.
  2. Fix it.
  • The only options for getting these videos to fill the screen are (1) transcoding the video using Handbrake or similar (which I know how to do correctly) or (2) using the zoom feature that some TVs have. Neither of these are ideal options. Transcoding requires time, effort, and more storage space for a second file; and I never want to mess with my TV settings if I don’t have to.
  • This could be managed with a single Plex flag that would tell the player to enlarge the video (preserving the aspect ratio) until the playback width matched the screen width, cropping off the black bars on the top and bottom. There have been some bugs in the past but these days, Plex seems to display all of my DVD rips true to the content on the disc (i.e., with the correct aspect ratio). It’s just that these letterboxed widescreen DVDs are treated as fullscreen (because that’s how they’re written on the disc) so they end up being displayed with thick black borders all around. This isn’t Plex’s fault, it’s just an artifact of how the discs were formatted. But Plex could add a feature and make it go away and it would “just work”.

Ain’t gonna happen.
Request has already been made - many times - years ago… result: Ignored.

Good Luck.

But Wait!

I know you ‘don’t want to encode’ - it’s time consuming.

How 'bout this just in a ‘Remux’ that doesn’t take that long - I just did a Big Bang Episode in about 20 seconds. I changed it’s original 16:9 aspect ratio to 4:3 - it displays Pillarboxed - exactly as I expected:

! Video
! ID : 1
! Format : AVC
! Format/Info : Advanced Video Codec
! Format profile : High@L4
! Format settings : CABAC / 4 Ref Frames
! Format settings, CABAC : Yes
! Format settings, RefFrames : 4 frames
! Codec ID : V_MPEG4/ISO/AVC
! Duration : 21 min 16 s
! Bit rate mode : Variable
! Bit rate : 13.3 Mb/s
! Maximum bit rate : 15.0 Mb/s
! Width : 1 920 pixels
! Height : 1 080 pixels
! Display aspect ratio : 4:3
! Original display aspect ratio : 16:9
! Frame rate mode : Constant
! Frame rate : 23.976 (24000/1001) FPS
! Color space : YUV
! Chroma subsampling : 4:2:0
! Bit depth : 8 bits
! Scan type : Progressive
! Bits/(Pixel*Frame) : 0.268
! Stream size : 1.98 GiB (95%)
! Default : Yes
! Forced : No

Perhaps there’s something that can be tweeked in those files that misbehave?

MKVToolNix is blinding fast - if that would help:

Here’s one I set at 1920x800 - 18 seconds - displays as expected at 2.40:1):

! Video
! ID : 1
! Format : AVC
! Format/Info : Advanced Video Codec
! Format profile : High@L4.1
! Format settings : CABAC / 4 Ref Frames
! Format settings, CABAC : Yes
! Format settings, RefFrames : 4 frames
! Codec ID : V_MPEG4/ISO/AVC
! Duration : 21 min 16 s
! Bit rate : 4 250 kb/s
! Width : 1 920 pixels
! Height : 1 080 pixels
! Display aspect ratio : 2.40:1
! Original display aspect ratio : 16:9
! Frame rate mode : Constant
! Frame rate : 23.976 (24000/1001) FPS
! Color space : YUV
! Chroma subsampling : 4:2:0
! Bit depth : 8 bits
! Scan type : Progressive
! Bits/(Pixel*Frame) : 0.085
! Stream size : 634 MiB (87%)
! Writing library : x264 core 142 r2479 dd79a61
! Encoding settings : cabac=1 / ref=4 / deblock=1:0:0 / analyse=0x3:0x113 / me=hex / subme=7 / psy=1 / psy_rd=1.00:0.00 / mixed_ref=1 / me_range=16 / chroma_me=1 / trellis=1 / 8x8dct=1 / cqm=0 / deadzone=21,11 / fast_pskip=1 / chroma_qp_offset=-2 / threads=12 / lookahead_threads=2 / sliced_threads=0 / nr=0 / decimate=1 / interlaced=0 / bluray_compat=0 / constrained_intra=0 / bframes=3 / b_pyramid=2 / b_adapt=1 / b_bias=0 / direct=1 / weightb=1 / open_gop=0 / weightp=2 / keyint=240 / keyint_min=24 / scenecut=40 / intra_refresh=0 / rc_lookahead=40 / rc=abr / mbtree=1 / bitrate=4250 / ratetol=1.0 / qcomp=0.60 / qpmin=0 / qpmax=69 / qpstep=4 / vbv_maxrate=62500 / vbv_bufsize=78125 / nal_hrd=none / filler=0 / ip_ratio=1.40 / aq=1:1.00
! Default : Yes
! Forced : No
! Color range : Limited
! Color primaries : BT.709
! Transfer characteristics : BT.709
! Matrix coefficients : BT.709

Seems to me, in a few seconds, and a little bit of fiddling - A Work-Around is born.
Once you fix 'em - they’ll play on anything correctly.

How does that ‘Cropping’ do-hickey work?
I have no idea - but could be helpful at some point I imagine.

There’s even something for those Homicidal Aspect Ratio Murderers out there. 4:3 Stretched to 16:9 in 15 seconds or less:

! Video
! ID : 1
! Format : AVC
! Format/Info : Advanced Video Codec
! Format profile : High@L4.1
! Format settings : CABAC / 4 Ref Frames
! Format settings, CABAC : Yes
! Format settings, RefFrames : 4 frames
! Codec ID : V_MPEG4/ISO/AVC
! Duration : 45 min 11 s
! Bit rate : 1 950 kb/s
! Width : 720 pixels
! Height : 480 pixels
! Display aspect ratio : 1.85:1
! Original display aspect ratio : 4:3
! Frame rate mode : Variable
! Frame rate : 24.618 FPS
! Color space : YUV
! Chroma subsampling : 4:2:0
! Bit depth : 8 bits
! Scan type : Progressive
! Bits/(Pixel*Frame) : 0.229
! Stream size : 621 MiB (94%)
! Writing library : x264 core 142 r2479 dd79a61
! Encoding settings : cabac=1 / ref=4 / deblock=1:0:0 / analyse=0x3:0x113 / me=umh / subme=9 / psy=1 / psy_rd=1.00:0.00 / mixed_ref=1 / me_range=16 / chroma_me=1 / trellis=1 / 8x8dct=1 / cqm=0 / deadzone=21,11 / fast_pskip=1 / chroma_qp_offset=-2 / threads=12 / lookahead_threads=1 / sliced_threads=0 / nr=0 / decimate=1 / interlaced=0 / bluray_compat=0 / constrained_intra=0 / bframes=3 / b_pyramid=2 / b_adapt=2 / b_bias=0 / direct=3 / weightb=1 / open_gop=0 / weightp=2 / keyint=240 / keyint_min=24 / scenecut=40 / intra_refresh=0 / rc_lookahead=40 / rc=abr / mbtree=1 / bitrate=1950 / ratetol=1.0 / qcomp=0.60 / qpmin=0 / qpmax=69 / qpstep=4 / vbv_maxrate=62500 / vbv_bufsize=78125 / nal_hrd=none / filler=0 / ip_ratio=1.40 / aq=1:1.00
! Default : Yes
! Forced : No
! Color range : Limited
! Color primaries : BT.601 NTSC
! Transfer characteristics : BT.709
! Matrix coefficients : BT.601

:slight_smile:

Just a cautionary warning… not all players follow the rules for display size and cropping that mkv can add, they just ignore it. It might be a pain to re-encode and remove black bars and crop but it probably will work in all players.

@JuiceWSA said:
They are encoded wrong, or are encoded as 16:9 in 1.33 - which is… wrong.

I’ve got a batch of old DVD’s that say on the back cover they are “Widescreen” I don’t think they were encoded wrong - they were made for our old fashioned 4X3 TV’s before anyone thought of a 16X9 display. No need to set the anamorphic flag, just add permanent black bars to the top and bottom, because they were meant to play on the old tube TV. In today’s world it would be wrong, back then, probably not. Just sayin’ :slight_smile:

1 Like

Yea, that ‘real old stuff’ (like you and I) may have some of those early attempts. I like to call it ‘KeyHoled’ or 'BungHoled. You know like peeping for giggles through the keyhole, watching the ball game through the knothole in the fench or any colorful analogies you can invent to go along with Bungholed. lol

I did check with VLC (not fair - it’ll play any **** you throw at it) and on all the Plex players I had with the following scores:
PMP - works
Plexweb - works
AFTV Disaster App - works
Roku Official App - fails miserably
RARflix - fails miserably
Android app on LG V20 Phone - fails miserably

Foiled again.
I do love a good encode through. Usually worth every minute that goes into them - when they don’t make a nuisance of themselves later by ‘just working’.

:slight_smile:

Changing the display size won’t help.

If I change the size, I could do this:

But I definitely don’t want that.

I want this:

Again, I know that transcoding will fix this and will produce a file that will work in all players. I have done this many times. I was just trying to make a request for a Plex feature based on a legitimate use case that would save me the trouble. VLC and other players can crop on the fly to arbitrary aspect ratios – doesn’t seem unreasonable for Plex to have a feature like this in contexts where it makes sense.

I may try out the MKV cropping flags but it sounds like player compatibility will likely be an issue.

Was this ever implemented? Or support for MKV cropping flags?

We have support for MPEG-2 direct stream and de-interlacing, so I think this is the only missing feature that prevents Plex from displaying remuxed DVDs properly.