Jump to content

Wrong Aspect Ratio When Playback Starts


TheGrimKeeper

Recommended Posts

TheGrimKeeper

I'm having a weird problem here with some DVD rips, which I have as MKV files.  The files play okay, but the image is horizontally compressed.

The file is 720x480, and displays correctly in VLC.  But when playback starts in the Emby app or my browser, with the aspect ratio set to Auto, the video is not the correct width (see screenshot #1).  Changing the aspect ratio to Cover corrects the width, but overscans the height (see screenshot #2).  Finally, changing the aspect ratio back to Auto keeps the correct width and fixes the height (see screenshot #3).

I've attached a server log, as well as the ffmpeg log from one of the files causing the problem ("Wrong Aspect Ratio.txt").  I've also attached an ffmpeg log from a episode in the same series that works correctly ("Correct Playback.txt").

I've loaded the files into mkvtoolnix to check the headers and from what I can see they're the same between the correct and incorrect files, so I don't know what's causing this.  Any help would be appreciated.

#1 (Auto).PNG

#2 (Cover).PNG

#3 (Auto).PNG

embyserver.txt Wrong Aspect Ratio.txt Correct Playback.txt

Link to comment
Share on other sites

roaku

@TheGrimKeeper

I think setting the starrred field below in mkvtoolnix to the proper aspect ratio of the material should resolve this for you:

aspect-ratio.jpg.866cc4878393dfa884d761ac9cab9e37.jpg

Link to comment
Share on other sites

TheGrimKeeper
59 minutes ago, roaku said:

I think setting the starrred field below in mkvtoolnix to the proper aspect ratio of the material should resolve this for you:

Thanks for the idea.  I tried 4/3 and 1.66 in this setting; the former produced the same squeezed result, and while the latter was not as squeezed horizontally as it was previously, it still wasn't quite right (this is an old television show BTW, so it is a 4:3 aspect ratio).

Setting the toggle to 16/9 seemed to produce the correct aspect ratio on first playback, but this seems like the wrong setting because, again, this isn't a widescreen video, despite the DVD resolution.

I also checked the files that are working correctly (different episodes from this series) and they do not have this setting OOTB in mkvtoolnix.  So, as before, we seem to have two different results with the same metadata inputs, which doesn't seem right to me.

Link to comment
Share on other sites

roaku
4 minutes ago, TheGrimKeeper said:

Thanks for the idea.  I tried 4/3 and 1.66 in this setting; the former produced the same squeezed result, and while the latter was not as squeezed horizontally as it was previously, it still wasn't quite right (this is an old television show BTW, so it is a 4:3 aspect ratio).

Setting the toggle to 16/9 seemed to produce the correct aspect ratio on first playback, but this seems like the wrong setting because, again, this isn't a widescreen video, despite the DVD resolution.

I also checked the files that are working correctly (different episodes from this series) and they do not have this setting OOTB in mkvtoolnix.  So, as before, we seem to have two different results with the same metadata inputs, which doesn't seem right to me.

I think you should try a 3:2 aspect ratio.

Link to comment
Share on other sites

12 hours ago, TheGrimKeeper said:

but this seems like the wrong setting because, again, this isn't a widescreen video, despite the DVD resolution.

I think maybe it is the proper aspect ratio as the black bars are probably encoded into the video (given the resolution).

  • Agree 2
Link to comment
Share on other sites

TheGrimKeeper
2 hours ago, ebr said:

I think maybe it is the proper aspect ratio as the black bars are probably encoded into the video (given the resolution).

So there are vertical black bars encoded in the file, which you would expect given the resolution.  But from the screenshots it's clear that Emby is distorting the horizontal dimension when playback starts.

Anyway, why does toggling the aspect ratio setting back and forth after playback starts "fix" the issue?

Link to comment
Share on other sites

TheGrimKeeper
2 hours ago, Luke said:

Hi, does the same thing happen in Chrome or Edge?

Yes, the same thing happens on Edge (I don't have Chrome on this machine).  But it's also happening on my FireTV cube and Nvidia Shield, so this behavior is consistent across every instance of Emby that I've tried.

Link to comment
Share on other sites

I would really be surprised to see this translate from one platform to another, or even browser, because changing the aspect ratio is purely a client-side effect handled by the video player. the fact that you could start in Auto, change to something else, then go back to Auto and have it be different from what you started with is most likely a quirk in the firefox video player.

The only other thing I can think of is that perhaps the aspect or resolution changes during the video. We do occasionally see videos like this from some users. So in that situation when the video player re-evaluates it a second time on the change back to auto, then it's different from what you started with.

So based on that, can you provide a sample video for testing?

 

Link to comment
Share on other sites

TheGrimKeeper
15 minutes ago, Luke said:

I would really be surprised to see this translate from one platform to another, or even browser, because changing the aspect ratio is purely a client-side effect handled by the video player. the fact that you could start in Auto, change to something else, then go back to Auto and have it be different from what you started with is most likely a quirk in the firefox video player.

I don't know what to tell you, but FF and Edge are doing the same thing.  The options are different in the FireTV app, for instance, so that needs to remain on Horizontal Stretch for the video to display correctly for the duration of playback.

16 minutes ago, Luke said:

The only other thing I can think of is that perhaps the aspect or resolution changes during the video. We do occasionally see videos like this from some users. So in that situation when the video player re-evaluates it a second time on the change back to auto, then it's different from what you started with.

I suppose that's possible, but I'm seeing this consistently with multiple files.  If this were the case it must be some kind of mastering error on the original DVD.  But, as I mentioned in my first post I compared the headers of the problem files with others that playback correctly, and I didn't see any differences (though admittedly I'm not an expert here).

18 minutes ago, Luke said:

So based on that, can you provide a sample video for testing?

Of course.  I cut the first 10 seconds from the video I took screenshots of in the first post; this is a direct stream copy so it has not been re-encoded, and I've confirmed that it exhibits the same behavior on both FF and Edge.  The full file is too large to upload here, and is also under copyright, so probably not a good idea to have it posted in the forum.  But if you have a more direct way for me to get it to you I'm happy to supply it.  Thanks.

Test.mkv

  • Thanks 1
Link to comment
Share on other sites

8 hours ago, crusher11 said:

I also had a 16:9 video play in 4:3 the other day, on Android TV.

Was the "Zoom" setting actually set to something other than "Normal"?

Link to comment
Share on other sites

crusher11
5 minutes ago, ebr said:

Was the "Zoom" setting actually set to something other than "Normal"?

I've never touched the zoom setting.

Link to comment
Share on other sites

26 minutes ago, crusher11 said:

I've never touched the zoom setting.

If you look at it in this case, is it set to "Normal"?

Link to comment
Share on other sites

Ian_King

So just today, all the films I have previously recorded which should play in a 4:3 aspect ratio, are now on playback suddenly jumping to a square format after about one or two seconds.

Must be something that has occurred on the last update?

I am running Beta 4.9.0.3, and playback through MS Edge

Link to comment
Share on other sites

crusher11
2 hours ago, ebr said:

If you look at it in this case, is it set to "Normal"?

Just in general, or while playing the problem video? I don't remember what it was.

Link to comment
Share on other sites

visproduction

DVD media is set to 0.9 rectangular pixels.  So, when a 4:3 media is encoded on a DVD in a 16:9 screen, the TV will resize the media to fit into the widescreen TV resolution of 1280 x 720.  Since DVD media can only do 720 x 480, the 4:3 media gets resized so when it plays back in 16:9 it will look correct with a 4:3 ratio.  Height 480 becomes 720 and a 4:3 ratio would need to have the width changed to 960 pixels with 160 pixel width black bars left and right. (960 x 720 = 1.3333)  But since the format in DVD is 1.5 and the 160 left and right bars are in 1.77 and the larger size at 1280 wide.  The media has to become a floating odd size inside the 720 x 480 with black bars that are only 76 pixels wide each left and right.  This leaves the middle image actual size at 720 - (76 *2) = 568 making the media look to be pretty skinny at 568 / 480 = aspect ration 1.18 instead of 1.33 times the height.  This odd size ends up looking right if it is played back on a widescreen TV which just takes the media and stretches it to 1280 x 720.

When encoding the encoder should have an option to accept incoming DVD of 4:3 floating inside a 16:9 format, but it probably doesn't.  DVD's can be made with both copies of a video, one in 4:3 and another in 16:9.  Usually these are two different DVD's full and widescreen, to maintain a high bitrate for both.  But if the original video is 4:3 and the DVD producer wants it to playback correctly on 16:9 TV's, the encoding can be done this way with floating the 4:3 media inside wider screen size that converts exactly correct on a 16:9 TV. (This sometimes is done to save on production cost for making a full and widescreen copy of the media, because when the producer does this float inside 16:9 they only have to pay for one set of 16:9 menus.)

When it first gets converted to workstation with square pixels, the best method is to crop the black bars out and then resize the video width to the correct 1.333 (4:3) aspect ratio.  Often this mixup is caused by media being grabbed from a DVD without any attention to correct the aspect ratio.

You can try forcing the playback ratio out to 1280 x 720 and keep the original odd squeezed media unchanged.  I think some players in different situations may or may not accept the size instructions inside the .mkv file.  The safest way to playback correctly all the time is to correct the floating image to it's proper 4:3 aspect ratio, by removing the black bars and resizing what is left to 480 height x 640 width.  That way, you are not trying to partially create more height scan lines and the result will look decent.

Hope that makes some sense.

 

Edited by visproduction
  • Like 1
Link to comment
Share on other sites

Ian_King

Thanks vizproduction for your very comprehensive response, but most of which I am not sure I understood.

All I know is that all the movies I have recorded directly from TV in a 4:3 format which previously played just fine, are now very shortly after staring playback via MS Edge or Chrome, switching to a square format.

I can only think it can be a change made in the last Beta update which needs to be fixed?

 

 

Link to comment
Share on other sites

3 hours ago, crusher11 said:

Just in general, or while playing the problem video? I don't remember what it was.

On the specific video you thought was incorrect.

Link to comment
Share on other sites

crusher11
7 hours ago, ebr said:

On the specific video you thought was incorrect.

As I said, I don't remember what it was. I just had one of my VirtualTV channels running in the background.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...