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

Michael Niedermayer michaelni
Thu Feb 1 13:22:14 CET 2007


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)

[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

The educated differ from the uneducated as much as the living from the
dead. -- Aristotle 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20070201/c1c565e3/attachment.pgp>



More information about the ffmpeg-devel mailing list