<?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>290223</bug_id>
          
          <creation_ts>2025-03-21 16:45:15 -0700</creation_ts>
          <short_desc>MediaRecorder WebM Videos Play Rotated 90° Counterclockwise</short_desc>
          <delta_ts>2025-05-22 01:05:49 -0700</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>iPhone / iPad</rep_platform>
          <op_sys>iOS 18</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc>https://webrtc.github.io/samples/src/content/getusermedia/record/</bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>InRadar</keywords>
          <priority>P2</priority>
          <bug_severity>Major</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="FS">faiyadh</reporter>
          <assigned_to name="Jean-Yves Avenard [:jya]">jean-yves.avenard</assigned_to>
          <cc>byron</cc>
    
    <cc>eric.carlson</cc>
    
    <cc>faiyadh</cc>
    
    <cc>jean-yves.avenard</cc>
    
    <cc>jer.noble</cc>
    
    <cc>marcosdg3</cc>
    
    <cc>oferrandiz</cc>
    
    <cc>seetalj</cc>
    
    <cc>uwolfer</cc>
    
    <cc>warren.seine</cc>
    
    <cc>webkit-bug-importer</cc>
    
    <cc>youennf</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>2105180</commentid>
    <comment_count>0</comment_count>
    <who name="FS">faiyadh</who>
    <bug_when>2025-03-21 16:45:15 -0700</bug_when>
    <thetext>Hi there,

Recorded WebM videos using the MediaRecorder API are playing back incorrectly on Safari iOS 18.4 beta. The playback/stored video is rotated 90° counterclockwise, affecting both portrait and landscape recordings.

Steps to Reproduce [site is attached]:
1. Click Start Camera and grant permissions.
2. Select any video/webm codec from the Recording format dropdown.
3. Click Start Recording—the recording proceeds as expected.
4. Click Play after recording.

Expected Result:
The video should play back with the correct orientation.

Actual Result:
The video plays back rotated 90 degrees counterclockwise:
- Portrait videos appear in landscape.
- Landscape videos are rotated incorrectly.

We are looking to have webm video functionality working correctly as soon as possible. Without proper orientation, iOS browsers will continue to lag behind current development standards. Looking forward to a quick resolution.

Thank you!</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2105265</commentid>
    <comment_count>1</comment_count>
    <who name="Warren Seine">warren.seine</who>
    <bug_when>2025-03-22 02:59:49 -0700</bug_when>
    <thetext>I came here to report the bug too. Here&apos;s a demo to reproduce (tested on iPadOS 18.4): https://warrenseine.github.io/webkit-webm-demo/ (nothing special to it, just basic MediaRecorder with WebM).</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2105476</commentid>
    <comment_count>2</comment_count>
    <who name="Alexey Proskuryakov">ap</who>
    <bug_when>2025-03-23 17:32:50 -0700</bug_when>
    <thetext>Thank you for the report. Could you please clarify if this worked correctly before, or if 18.4 was the only version tested?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2105649</commentid>
    <comment_count>3</comment_count>
    <who name="FS">faiyadh</who>
    <bug_when>2025-03-24 12:16:18 -0700</bug_when>
    <thetext>Thanks @Warren Seine. +1

@Alexey Proskuryakov, I believe webm was introduced on Safari iOS starting from 18.4. We tried it on 18.3 and found the format is not supported.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2105693</commentid>
    <comment_count>4</comment_count>
    <who name="FS">faiyadh</who>
    <bug_when>2025-03-24 15:09:11 -0700</bug_when>
    <thetext>We got some description here in bug 290002 for the webm issue from jean-yves.avenard@apple.com in here https://bugs.webkit.org/show_bug.cgi?id=290002. 

&gt; Yes, this is a known issue. The webm container doesn&apos;t allow like mp4 to indicate in the metadata that the video should be rotated. We will have to physically rotate the image before compressing it.

Given this explanation, I have a follow-up question: Is there an internal plan within WebKit to resolve this limitation, or will we need to continue applying a manual workaround for WebM videos? I believe the later case is very limited in scope client side without using heavy-weight external libraries?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2106000</commentid>
    <comment_count>5</comment_count>
    <who name="Radar WebKit Bug Importer">webkit-bug-importer</who>
    <bug_when>2025-03-25 15:36:58 -0700</bug_when>
    <thetext>&lt;rdar://problem/147878206&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2108448</commentid>
    <comment_count>6</comment_count>
    <who name="Warren Seine">warren.seine</who>
    <bug_when>2025-04-03 01:32:15 -0700</bug_when>
    <thetext>Hi! I hate to be that &quot;ETA?&quot; guy, but iOS 18.4 is now live and this is a pretty big bug (all portrait videos recorded with WebM are broken). I&apos;m happy following on the other ticket if they are related, but I don&apos;t see activity on either. Is this being addressed?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2110818</commentid>
    <comment_count>7</comment_count>
    <who name="Warren Seine">warren.seine</who>
    <bug_when>2025-04-14 02:20:05 -0700</bug_when>
    <thetext>Hey again, any news from Apple? Anything I can do to help?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2111402</commentid>
    <comment_count>8</comment_count>
    <who name="Marcos G.">marcosdg3</who>
    <bug_when>2025-04-16 16:41:21 -0700</bug_when>
    <thetext>Came across this as well, issue can be reproduced here using iOS 18.4: https://www.webrtc-experiment.com/RecordRTC/

Tested:
* Using vp8 and vp9 codecs, no difference same result
* No issue found on macOS 15.4+
* Decimating frames by reducing resolution/fps/bitrate did not make a difference</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2111406</commentid>
    <comment_count>9</comment_count>
    <who name="Marcos G.">marcosdg3</who>
    <bug_when>2025-04-16 16:49:36 -0700</bug_when>
    <thetext>I tested the functionality at this link: https://webrtc.github.io/samples/src/content/getusermedia/record/.

It appears that the issue is primarily related to recording with VP8 and VP9 codecs.

In contrast, using (avc, hvc, hev) did not present any problems.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2113481</commentid>
    <comment_count>10</comment_count>
    <who name="Jean-Yves Avenard [:jya]">jean-yves.avenard</who>
    <bug_when>2025-04-28 03:39:34 -0700</bug_when>
    <thetext>Pull request: https://github.com/WebKit/WebKit/pull/44588</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2113886</commentid>
    <comment_count>11</comment_count>
    <who name="EWS">ews-feeder</who>
    <bug_when>2025-04-29 06:51:04 -0700</bug_when>
    <thetext>Committed 294257@main (83051fcd6af8): &lt;https://commits.webkit.org/294257@main&gt;

Reviewed commits have been landed. Closing PR #44588 and removing active labels.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2116503</commentid>
    <comment_count>12</comment_count>
    <who name="EWS">ews-feeder</who>
    <bug_when>2025-05-12 09:33:49 -0700</bug_when>
    <thetext>Committed 289651.496@safari-7621-branch (c926762c1514): &lt;https://commits.webkit.org/289651.496@safari-7621-branch&gt;

Reviewed commits have been landed. Closing PR #3060 and removing active labels.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2117653</commentid>
    <comment_count>13</comment_count>
    <who name="Warren Seine">warren.seine</who>
    <bug_when>2025-05-16 10:40:51 -0700</bug_when>
    <thetext>Thank you very much for fixing the issue! I can see the patch was merged, but I could not find any mention about it in the Safari 18.5 release notes (https://developer.apple.com/documentation/safari-release-notes/safari-18_5-release-notes). Should we expect it for the next public Safari release?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2118813</commentid>
    <comment_count>14</comment_count>
    <who name="Jean-Yves Avenard [:jya]">jean-yves.avenard</who>
    <bug_when>2025-05-21 15:18:35 -0700</bug_when>
    <thetext>*** Bug 293309 has been marked as a duplicate of this bug. ***</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2118844</commentid>
    <comment_count>15</comment_count>
    <who name="Jean-Yves Avenard [:jya]">jean-yves.avenard</who>
    <bug_when>2025-05-21 16:29:08 -0700</bug_when>
    <thetext>The fix didn&apos;t make it on time for iOS 18.5 unfortunately. iOS 18.5 was released on May 12th, same day the webm fix was submitted to webkit.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2118926</commentid>
    <comment_count>16</comment_count>
    <who name="">seetalj</who>
    <bug_when>2025-05-22 01:05:49 -0700</bug_when>
    <thetext>*** Bug 293378 has been marked as a duplicate of this bug. ***</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>