Video Encoding ignore anamorphic pixel aspect ratio [#11119]

To get bugs in the current release fixed, please report them here.

Moderator: Gurus

rivorson
Posts: 594
Joined: Thu Jul 25, 2013 4:17 am

Video Encoding ignore anamorphic pixel aspect ratio [#11119]

Post by rivorson » Sat Jul 27, 2013 12:11 pm

I am trying to encode some video files for use on another device but have an issue with any anamorphic video. The resulting video file encoded by MediaMonkey appears distorted (either squashed or stretched depending on the video) because MM discards the pixel aspect ratio and assumes square pixels instead.

I am currently using MM 4.0 build 1511 as well as MM4.1 beta 1651 but also experienced the same issue with several previous builds.
Currently I have the paid version of codec pack 2.0.2.17 but also had this issue with versions 2.0.2.16 and 2.0.2.15, and have tried beta version 2.1.0.101.

All of my DVD rips are encoded using Handbrake with loose anamorphic to maintain the highest possible quality. It is possible to encode without the anamorphic but this is done by cropping lines vertically (which reduces the overall quality) then upscaling as close to the original resolution possible (which does not recreate the original quality). The [url=https://trac.handbrake.fr/wiki/AnamorphicGuide]Guide to Anamorphic Encoding in HandBrake[url] contains some useful information about anamorphic encoding and the reason to use it.


Here is an example of a video file I have attempted to encode. The following encoding options were used in MM:
Codec: X264
Max resolution: 1280x720
Output quality: 19
Bitrate (for max res): 0
Framerate: Original

Fit size exactly and preserve aspect ratio were altered in four test encodes to cover every iteration.
The screenshots and resolution information were collected using Media Player Classic.

Original video file.
720x592 with pixel aspect ratio of 7:4 and overall display aspect ratio of 16:9.
Image

Encoded with neither 'preserve aspect ratio' or 'fit size exactly' selected. The image appears squashed.
720x592. Display aspect ratio is 1.216.
Image

Encoding with 'preserve aspect ratio' only makes things worse. Somehow MediaMonkey inverts the pixel count so that the short side becomes the long side, squashing the image even further.
592x720. Display aspect ratio is 0.822.
Image

Encoded with 'fit size exactly'.
1280x720. Display aspect ratio of 16:9. This is the correct aspect ratio but only but coincidence. If the original video had not been widescreen, this option would still result in 16:9.
Image

Encoded with both 'fit size exactly' and 'preserve aspect ratio' selected.
1280x720 but with black bars added on the left and right sides of the frame. The actual image in this example is 1270x720.
Image


I should point out that the original video file plays in MM at the correct aspect ratio. The problem only occurs when the video is encoded by MM.
I can provide short anamorphically encoded video files for both widescreen and non-widescreen videos if this will help fix the problem.

rivorson
Posts: 594
Joined: Thu Jul 25, 2013 4:17 am

Re: Video encoding ignores anamorphic pixel aspect ratio

Post by rivorson » Sat Jul 27, 2013 12:12 pm

Please note that the last two screenshots have been cropped by the forum width.

MiPi
Posts: 593
Joined: Tue Aug 18, 2009 2:56 pm
Location: Czech Republic
Contact:

Re: Video encoding ignores anamorphic pixel aspect ratio

Post by MiPi » Mon Jul 29, 2013 11:33 am

Sample files would be helpful, so I can test it with the same file format and find the problem. Thanks.

rivorson
Posts: 594
Joined: Thu Jul 25, 2013 4:17 am

Re: Video encoding ignores anamorphic pixel aspect ratio

Post by rivorson » Mon Jul 29, 2013 6:25 pm

Hi MiPi

I have uploaded two sample files to Dropbox; one widescreen and one non-widescreen. Both use an anamorphic aspect ratio so and are being sqaushed by MM when transcoded.

I have limited each sample to approximately 30 seconds to speed up the transcoding process. I also verified that the problem occurs with these specific files before uploading.

Widescreen sample
Standard sample

MiPi
Posts: 593
Joined: Tue Aug 18, 2009 2:56 pm
Location: Czech Republic
Contact:

Re: Video encoding ignores anamorphic pixel aspect ratio

Post by MiPi » Tue Jul 30, 2013 3:34 am


MiPi
Posts: 593
Joined: Tue Aug 18, 2009 2:56 pm
Location: Czech Republic
Contact:

Re: Video encoding ignores anamorphic pixel aspect ratio

Post by MiPi » Tue Jul 30, 2013 5:59 am

This will be fixed in the next 4.1 release. Thanks for reporting.

rivorson
Posts: 594
Joined: Thu Jul 25, 2013 4:17 am

Re: Video encoding ignores anamorphic pixel aspect ratio

Post by rivorson » Tue Jul 30, 2013 11:54 am

Thanks MiPi. I'm impressed with how quickly it has been fixed.

Post Reply