[Ffmpeg-devel] Bug when decoding WMV HD file. The aspect ratio is not preserved

Zuxy Meng zuxy.meng
Fri Feb 2 02:18:06 CET 2007


Hi,

2007/2/1, Michael Niedermayer <michaelni at gmx.at>:
> Hi
>
> On Thu, Feb 01, 2007 at 12:55:37PM +0800, Zuxy Meng wrote:
> > Hi,
> >
> > 2007/2/1, Michael Niedermayer <michaelni at gmx.at>:
> > >Hi
> > >
> > >On Sat, Jan 27, 2007 at 07:44:59AM +0200, Kostya wrote:
> > >> On Sat, Jan 27, 2007 at 02:01:00AM +0100, Michael Niedermayer wrote:
> > >> > Hi
> > >> >
> > >> > On Wed, Jan 24, 2007 at 07:45:24PM +0100, Thomas Parmegiani wrote:
> > >> > > Hi all!
> > >> > >
> > >> > > I downloaded some WMV HD files on :
> > >> > >
> > >> > >
> > >http://www.microsoft.com/windows/windowsmedia/musicandvideo/hdvideo/contents
> > >> > > howcase.aspx
> > >> > >
> > >> > > I wanted to convert it to MPEG2 without audio (Audio is WMAPro which
> > >is not
> > >> > > currently supported by ffmpeg).
> > >> > > For 720p files, converted MPEG2 files preserve aspect ratio (16/9).
> > >> > > But for 1080p files (which have a resolution of 1440 x 1080),
> > >converted
> > >> > > aspect ratio is 4/3.
> > >> > >
> > >> > > The same problem appears if I try to use VLC to play WMV file
> > >> > >
> > >> > > Problem seen with files :
> > >> > >
> > >> > > Amazing caves :
> > >> > >
> > >http://download.microsoft.com/download/0/9/d/09d051c4-decc-4d39-9c57-f520187
> > >> > > 213a1/Amazing_Caves_1080.exe
> > >> > >
> > >> > > Coral Reef :
> > >> > >
> > >http://download.microsoft.com/download/a/9/3/a9327df4-aeb5-46de-b438-d0f60da
> > >> > > 6fb54/Coral_Reef_Adventure_1080.exe
> > >> > >
> > >> > > And I think with all others 1440 x 1080 files...
> > >> >
> > >> > i guess the problem is in vc1.c, it doesnt export the aspect ratio ...
> > >>
> > >> I will commit patch for exporting aspect ratio but it won't solve this
> > >problem.
> > >>
> > >> As standard says (note in Appendix I chapter 4.2):
> > >> "When sample aspect ratio information is not present (i.e.
> > >ASPECT_RATIO_FLAG = 0
> > >> or for Simple and Main profile), the sample aspect ratio is undefined and
> > >> application-dependent".
> > >>
> > >> All mentioned samples are coded as WMV3 - i.o.w. VC-1 Main profile, so
> > >aspect ratio
> > >> should be stored in container. BTW, newer MPlayer reads aspect ratio
> > >correctly.
> > >
> > >ok, ffmpeg should read the aspect ratio too now, though its not much
> > >tested,
> > >the only file i downloaded had a 1:1 SAR, so feedback is welcome ...
> >
> > You don't need bothering codec->width and codec->height. Patch
> > attached. Tested with a 4:3 WMV HD.
>
> hmm so the aspect is a sample aspect ratio instead of display aspect?
> if so patch ok (=patch is ok if the aspect is correct with it while it
> was wrong without)

Yes it's pixel's aspect ratio:-)
-- 
Zuxy
Beauty is truth,
While truth is beauty.
PGP KeyID: E8555ED6




More information about the ffmpeg-devel mailing list