GNOME Bugzilla – Bug 322645
Matroska muxer: wrong pixel aspect ratio
Last modified: 2005-12-01 16:04:56 UTC
mpeg2dec stores pixel aspect ratio as "pixel-aspect-ratio" in caps, whereas matroskamuxer expect two values "pixel-width" and "pixel-height". I do not know which one of these is correct (since these properties are not documented in the PWG). The result is that mpeg2 decoded, any format encoded and matroska muxed video has wrong aspect.
matroskamux is wrong - it should be a GstFraction called pixel-aspect-ratio
Created attachment 55314 [details] [review] Patch adding support for pixel-aspect-ratio to matroskamuxer This patch adds pixel-aspect-ratio support to matroskamuxer. This patch is probably not quite correct since there should be only one way to specify the pixel aspect.
Created attachment 55315 [details] [review] New patch adding pixel-aspect-ratio support This patch removes pixel-width pixel-height support in favour of pixel-aspect-ratio.
Resolving with a slightly different patch: - ret = gst_structure_get_int (structure, "pixel_width", &pixel_width); - ret &= gst_structure_get_int (structure, "pixel_height", &pixel_height); - if (ret) { + if (gst_structure_get_fraction (structure, "pixel-aspect-ratio", + &pixel_width, &pixel_height)) { * gst/matroska/matroska-mux.c: (gst_matroska_mux_video_pad_setcaps): Look for pixel-aspect-ratio in caps, not pixel_width and pixel_height (Fixes: #322645)