<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.webkit.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>281781</bug_id>
          
          <creation_ts>2024-10-18 14:24:08 -0700</creation_ts>
          <short_desc>DAR/SAR/PAR aspect ratios not respected for VP9 WebM</short_desc>
          <delta_ts>2024-11-22 07:36:09 -0800</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>Media</component>
          <version>Safari 18</version>
          <rep_platform>Mac (Apple Silicon)</rep_platform>
          <op_sys>macOS 14</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>InRadar</keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Eric Portis">e</reporter>
          <assigned_to name="Jean-Yves Avenard [:jya]">jean-yves.avenard</assigned_to>
          <cc>jean-yves.avenard</cc>
    
    <cc>jer.noble</cc>
    
    <cc>webkit-bug-importer</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>2069252</commentid>
    <comment_count>0</comment_count>
    <who name="Eric Portis">e</who>
    <bug_when>2024-10-18 14:24:08 -0700</bug_when>
    <thetext>Here&apos;s a 1400x1400 MP4 with a non-square pixel aspect ratio:

https://media.phase-eight.com/video/upload/fl_keep_dar,x_0/c_fill,dpr_2.0,du_30,h_700,w_500/v1/p8-catalog/videos/950582882-video.mp4

It displays as expected (5:7). But a WebM with the same dimensions + aspect-ratio, does not (it displays 1:1):

https://media.phase-eight.com/video/upload/fl_keep_dar,x_0/c_fill,dpr_2.0,du_30,h_700,w_500/v1/p8-catalog/videos/950582882-video.webm

(Firefox and Chrome both display both videos correctly)

Here&apos;s what ffprobe says about the WebM:

```
% ffprobe 950582882-video.webm
ffprobe version 7.0.2 Copyright (c) 2007-2024 the FFmpeg developers
  built with Apple clang version 15.0.0 (clang-1500.3.9.4)
  configuration: --prefix=/opt/homebrew/Cellar/ffmpeg/7.0.2_1 --enable-shared --enable-pthreads --enable-version3 --cc=clang --host-cflags= --host-ldflags=&apos;-Wl,-ld_classic&apos; --enable-ffplay --enable-gnutls --enable-gpl --enable-libaom --enable-libaribb24 --enable-libbluray --enable-libdav1d --enable-libharfbuzz --enable-libjxl --enable-libmp3lame --enable-libopus --enable-librav1e --enable-librist --enable-librubberband --enable-libsnappy --enable-libsrt --enable-libssh --enable-libsvtav1 --enable-libtesseract --enable-libtheora --enable-libvidstab --enable-libvmaf --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2 --enable-libxvid --enable-lzma --enable-libfontconfig --enable-libfreetype --enable-frei0r --enable-libass --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libspeex --enable-libsoxr --enable-libzmq --enable-libzimg --disable-libjack --disable-indev=jack --enable-videotoolbox --enable-audiotoolbox --enable-neon
  libavutil      59.  8.100 / 59.  8.100
  libavcodec     61.  3.100 / 61.  3.100
  libavformat    61.  1.100 / 61.  1.100
  libavdevice    61.  1.100 / 61.  1.100
  libavfilter    10.  1.100 / 10.  1.100
  libswscale      8.  1.100 /  8.  1.100
  libswresample   5.  1.100 /  5.  1.100
  libpostproc    58.  1.100 / 58.  1.100
Input #0, matroska,webm, from &apos;950582882-video.webm&apos;:
  Metadata:
    MAJOR_BRAND     : mp42
    MINOR_VERSION   : 512
    COMPATIBLE_BRANDS: mp42iso2avc1mp41
    ENCODER         : Lavf60.3.100
  Duration: 00:00:08.21, start: 0.000000, bitrate: 577 kb/s
  Stream #0:0: Video: vp9 (Profile 0), yuv420p(tv, bt709, progressive), 1400x1400, SAR 5:7 DAR 5:7, 25 fps, 25 tbr, 1k tbn
      Metadata:
        ENCODER         : Lavc60.3.100 libvpx-vp9
        DURATION        : 00:00:08.160000000
  Stream #0:1: Audio: vorbis, 44100 Hz, stereo, fltp
      Metadata:
        ENCODER         : Lavc60.3.100 libvorbis
        DURATION        : 00:00:08.212000000

~
```</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2070587</commentid>
    <comment_count>1</comment_count>
    <who name="Radar WebKit Bug Importer">webkit-bug-importer</who>
    <bug_when>2024-10-25 09:51:51 -0700</bug_when>
    <thetext>&lt;rdar://problem/138642717&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2070759</commentid>
    <comment_count>2</comment_count>
    <who name="Jean-Yves Avenard [:jya]">jean-yves.avenard</who>
    <bug_when>2024-10-26 17:15:41 -0700</bug_when>
    <thetext>Here we have conflicting information: the webm container does specify a 1000x1400 dimension, but the VP9 bytestream gives 1400x1400 for both image and display size  

And up to know we favoured the VP9 byte stream data.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2070789</commentid>
    <comment_count>3</comment_count>
    <who name="Jean-Yves Avenard [:jya]">jean-yves.avenard</who>
    <bug_when>2024-10-26 21:31:03 -0700</bug_when>
    <thetext>Pull request: https://github.com/WebKit/WebKit/pull/35768</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2071140</commentid>
    <comment_count>4</comment_count>
    <who name="EWS">ews-feeder</who>
    <bug_when>2024-10-28 19:34:33 -0700</bug_when>
    <thetext>Committed 285809@main (f5992b64d864): &lt;https://commits.webkit.org/285809@main&gt;

Reviewed commits have been landed. Closing PR #35768 and removing active labels.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2077027</commentid>
    <comment_count>5</comment_count>
    <who name="EWS">ews-feeder</who>
    <bug_when>2024-11-22 07:36:09 -0800</bug_when>
    <thetext>Committed 283286.528@safari-7620-branch (1265651ee93f): &lt;https://commits.webkit.org/283286.528@safari-7620-branch&gt;

Reviewed commits have been landed. Closing PR #2327 and removing active labels.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>