views:

146

answers:

1

I'm working on our encoding software, and have come across a strange issue where files in a 16:9 aspect ratio are being played in 4:3 in some players, post-transcode from WMV to MP4. Using ASF view I can see that the source WMV file appears to have incorrect data in its BITMAPINFOHEADER structure (it reports that is has 4:3 dimensions but is actually 16:9), but is there an equivalent tool for MP4 files so I can check whether this problem has been carried through to the transcoded file?

I want to read the metadata that is embedded in the stream, rather than using a tool that renders it using DirectShow/FFmpeg/other as these appear to do some mangling and report the correct aspect ratio.

+1  A: 

After a bit of looking around I found MP4Box which can be used to retrieve this information using the -info switch, e.g.

mp4box.exe -info filename.mp4

If anybody is interested, it turns out the problem was that the original WMV stream had the AspectRatioX and AspectRatioY metadata attributes set so that the video has non-square pixels. This non-square metadata was carried through to the MP4 file so it should play back correctly (and does in Windows Media Player) however it appears that Flash ignores this metadata attribute and plays it using square pixels.

Greg Beech