[MPlayer-users] Wrong aspect ratio when playing old mkv files

Thomas Zander thomas.e.zander at googlemail.com
Sat Dec 21 20:25:59 CET 2013


Hi,

using an up-to-date snapshot of mplayer and ffmpeg, I see that some
old mkv files (DVD rips) are played in the wrong aspect ratio.
Using mkvinfo, I get this info for the video track:

...
|  + Video track
|   + Pixel width: 704
|   + Pixel height: 432
|   + Interlaced: 0
|   + Display width: 1015
|   + Display height: 432
...

However, current mplayer+ffmpeg plays it at 704:432.
A snapshot from March 2013 scales it to display width and height as expected.

I was trying to figure out where and why it was set back then and
today, but was not yet successful locating the problem.
I noticed that in ffmpeg/libavcodec/h264.c:init_dimensions() the struct members
h->width
h->avctx->width
h->avctx->coded_width
all contain 704.

I also tried creating files with different aspect ratios with an
up-to-date mkvmerge, but the result remains unchanged.
The parameters display width and height from the mkv header do not
seem to get passed into the decoder.

Does someone have any hints how to track this down from here?
(Problem: I could not create a fully functional debug build that lets
me stop in init_dimensions() and step from there.)

Thanks
Riggs


More information about the MPlayer-users mailing list