<?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>183259</bug_id>
          
          <creation_ts>2018-03-01 13:59:50 -0800</creation_ts>
          <short_desc>[GStreamer] Cannot play particular videos</short_desc>
          <delta_ts>2023-06-28 09:27:51 -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>Other</version>
          <rep_platform>PC</rep_platform>
          <op_sys>Windows 10</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>WORKSFORME</resolution>
          
          <see_also>https://bugs.webkit.org/show_bug.cgi?id=221622</see_also>
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Michael Catanzaro">mcatanzaro</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>alicem</cc>
    
    <cc>bugs-noreply</cc>
    
    <cc>calvaris</cc>
    
    <cc>cgarcia</cc>
    
    <cc>fjimenez</cc>
    
    <cc>jsteiner</cc>
    
    <cc>mcatanzaro</cc>
    
    <cc>philn</cc>
    
    <cc>pnormand</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1403031</commentid>
    <comment_count>0</comment_count>
    <who name="Michael Catanzaro">mcatanzaro</who>
    <bug_when>2018-03-01 13:59:50 -0800</bug_when>
    <thetext>I can&apos;t play this simple WebM video in Epiphany Tech Preview (WebKitGTK+ 2.19.91):

https://raw.githubusercontent.com/gnome-design-team/gnome-mockups/master/gtk/loop5.webm

I think it&apos;s different from bug #182653 because that video starts to play and only seek is broken, whereas this video does not play at all.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1403180</commentid>
    <comment_count>1</comment_count>
    <who name="Philippe Normand">pnormand</who>
    <bug_when>2018-03-02 01:44:25 -0800</bug_when>
    <thetext>Add it to an html file in a &lt;video&gt; element and it plays.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1403217</commentid>
    <comment_count>2</comment_count>
    <who name="Michael Catanzaro">mcatanzaro</who>
    <bug_when>2018-03-02 08:09:48 -0800</bug_when>
    <thetext>Ummmm that should not be required, and was not required in the past. We are even showing media controls for it and everything. They&apos;re just broken.

If we did not support directly playing media files, we would need to start a download instead of displaying broken media controls. But I&apos;m pretty sure this used to work. I see it is also broken in 2.18.6, though.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1409221</commentid>
    <comment_count>3</comment_count>
    <who name="Michael Catanzaro">mcatanzaro</who>
    <bug_when>2018-03-25 18:13:30 -0700</bug_when>
    <thetext>Carlos, any chance you know how this is supposed to work?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1409252</commentid>
    <comment_count>4</comment_count>
    <who name="Carlos Garcia Campos">cgarcia</who>
    <bug_when>2018-03-25 23:36:26 -0700</bug_when>
    <thetext>I giess we are doing something different in case of MediaDocument</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1439775</commentid>
    <comment_count>5</comment_count>
    <who name="Philippe Normand">pnormand</who>
    <bug_when>2018-07-06 07:06:04 -0700</bug_when>
    <thetext>The problem seems to be that loop5.webm is thought to be audio/webm by the DOMImplementation and MediaDocument seems to handle only &lt;video&gt; elements, so an empty page is displayed, only controls are visible.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1440791</commentid>
    <comment_count>6</comment_count>
    <who name="Philippe Normand">pnormand</who>
    <bug_when>2018-07-10 02:50:23 -0700</bug_when>
    <thetext>The HTTP response header has the wrong content-type set, so not sure what to do about this. One thing to consider, maybe don&apos;t set the type attr on the video element created by the MediaDocument. I tried that and got a bunch of XSS errors afterwards :S</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1499016</commentid>
    <comment_count>7</comment_count>
    <who name="Michael Catanzaro">mcatanzaro</who>
    <bug_when>2019-01-28 07:32:26 -0800</bug_when>
    <thetext>Another example video that fails to play:

https://matrix.org/_matrix/media/v1/download/matrix.org/vatFhMWBkNvNZhJWOdQCkeaQ</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1598101</commentid>
    <comment_count>8</comment_count>
    <who name="Michael Catanzaro">mcatanzaro</who>
    <bug_when>2019-12-12 12:44:08 -0800</bug_when>
    <thetext>Lots of errors in the web inspector. Looks like some problems with the media controls JS:

[Error] Failed to load resource: Plug-in handled load (loop5.webm, line 0)
[Error] Blocked script execution in &apos;https://raw.githubusercontent.com/gnome-design-team/gnome-mockups/master/gtk/loop5.webm&apos; because the document&apos;s frame is sandboxed and the &apos;allow-scripts&apos; permission is not set.
[Error] Refused to load https://raw.githubusercontent.com/gnome-design-team/gnome-mockups/master/gtk/loop5.webm because it appears in neither the media-src directive nor the default-src directive of the Content Security Policy.
[Error] Blocked script execution in &apos;https://raw.githubusercontent.com/gnome-design-team/gnome-mockups/master/gtk/loop5.webm&apos; because the document&apos;s frame is sandboxed and the &apos;allow-scripts&apos; permission is not set. (x26)
[Error] Blocked script execution in &apos;https://raw.githubusercontent.com/gnome-design-team/gnome-mockups/master/gtk/loop5.webm&apos; because the document&apos;s frame is sandboxed and the &apos;allow-scripts&apos; permission is not set. (x50)

Just hovering over the play button causes the last error to occur, one error for each pixel I move the cursor.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1598288</commentid>
    <comment_count>9</comment_count>
    <who name="Xabier Rodríguez Calvar">calvaris</who>
    <bug_when>2019-12-13 01:38:08 -0800</bug_when>
    <thetext>(In reply to Michael Catanzaro from comment #8)
&gt; Lots of errors in the web inspector. Looks like some problems with the media
&gt; controls JS:

Please file a different bug for this under [GTK] cause controls are just tangentially related to multimedia. Thx!</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1598302</commentid>
    <comment_count>10</comment_count>
    <who name="Philippe Normand">pnormand</who>
    <bug_when>2019-12-13 03:33:38 -0800</bug_when>
    <thetext>As I said in comment 5 this might not be a pure-controls bug. loop5.webm is detected as an audio file...</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1725263</commentid>
    <comment_count>11</comment_count>
    <who name="Michael Catanzaro">mcatanzaro</who>
    <bug_when>2021-02-03 12:07:55 -0800</bug_when>
    <thetext>(In reply to Michael Catanzaro from comment #7)
&gt; Another example video that fails to play:
&gt; 
&gt; https://matrix.org/_matrix/media/v1/download/matrix.org/
&gt; vatFhMWBkNvNZhJWOdQCkeaQ

Hm, this happens with MP4 video as well:

https://gnome.modular.im/_matrix/media/r0/download/gnome.org/62a43e4dd1f71c657be994f79a4a203db9c9e708/video_514ec09.mp4

Is it the same issue (in which case the bug should be renamed to not specify WebM), or a different issue with the same symptoms?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1725592</commentid>
    <comment_count>12</comment_count>
    <who name="Philippe Normand">pnormand</who>
    <bug_when>2021-02-04 04:38:44 -0800</bug_when>
    <thetext>(In reply to Michael Catanzaro from comment #11)
&gt; (In reply to Michael Catanzaro from comment #7)
&gt; &gt; Another example video that fails to play:
&gt; &gt; 
&gt; &gt; https://matrix.org/_matrix/media/v1/download/matrix.org/
&gt; &gt; vatFhMWBkNvNZhJWOdQCkeaQ
&gt; 
&gt; Hm, this happens with MP4 video as well:

Do you have a H.264 decoder in your runtime?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1725605</commentid>
    <comment_count>13</comment_count>
    <who name="Philippe Normand">pnormand</who>
    <bug_when>2021-02-04 05:28:37 -0800</bug_when>
    <thetext>ERROR      webkitmediaplayer MediaPlayerPrivateGStreamer.cpp:1806:handleMessage: Error 9: R3: Received unexpected 200 HTTP status code for range request (url=https://gnome.modular.im/_matrix/media/r0/download/gnome.org/62a43e4dd1f71c657be994f79a4a203db9c9e708/video_514ec09.mp4)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1725609</commentid>
    <comment_count>14</comment_count>
    <who name="Michael Catanzaro">mcatanzaro</who>
    <bug_when>2021-02-04 05:49:40 -0800</bug_when>
    <thetext>(In reply to Philippe Normand from comment #12)
&gt; Do you have a H.264 decoder in your runtime?

Of course, you know we have OpenH264. https://www.w3schools.com/html/mov_bbb.mp4 plays fine.

(In reply to Philippe Normand from comment #13)
&gt; ERROR      webkitmediaplayer
&gt; MediaPlayerPrivateGStreamer.cpp:1806:handleMessage: Error 9: R3: Received
&gt; unexpected 200 HTTP status code for range request
&gt; (url=https://gnome.modular.im/_matrix/media/r0/download/gnome.org/
&gt; 62a43e4dd1f71c657be994f79a4a203db9c9e708/video_514ec09.mp4)

I wonder why 200 &quot;success&quot; is so unexpected. :P</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1726982</commentid>
    <comment_count>15</comment_count>
    <who name="Xabier Rodríguez Calvar">calvaris</who>
    <bug_when>2021-02-09 02:09:57 -0800</bug_when>
    <thetext>(In reply to Michael Catanzaro from comment #14)
&gt; (In reply to Philippe Normand from comment #12)
&gt; &gt; Do you have a H.264 decoder in your runtime?
&gt; 
&gt; Of course, you know we have OpenH264.
&gt; https://www.w3schools.com/html/mov_bbb.mp4 plays fine.
&gt; 
&gt; (In reply to Philippe Normand from comment #13)
&gt; &gt; ERROR      webkitmediaplayer
&gt; &gt; MediaPlayerPrivateGStreamer.cpp:1806:handleMessage: Error 9: R3: Received
&gt; &gt; unexpected 200 HTTP status code for range request
&gt; &gt; (url=https://gnome.modular.im/_matrix/media/r0/download/gnome.org/
&gt; &gt; 62a43e4dd1f71c657be994f79a4a203db9c9e708/video_514ec09.mp4)
&gt; 
&gt; I wonder why 200 &quot;success&quot; is so unexpected. :P

AFAIK a working range request should answer 206, not 200.

If we should accept 200 as a valid answer and be prepared to handle the whole download is a different issue.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1727150</commentid>
    <comment_count>16</comment_count>
    <who name="Xabier Rodríguez Calvar">calvaris</who>
    <bug_when>2021-02-09 11:44:01 -0800</bug_when>
    <thetext>Michael, can you please clarify de scope of this bug. It is completely unclear to me. 200 vs 206 seems to be a different issue, please file a new bug for it as the initial scope of this bug seems to be different.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1727165</commentid>
    <comment_count>17</comment_count>
    <who name="Michael Catanzaro">mcatanzaro</who>
    <bug_when>2021-02-09 12:00:19 -0800</bug_when>
    <thetext>Yeah, I agree it looks like 200 vs. 206 is a totally different issue. I have created bug #221622 for this problem with https://gnome.modular.im/_matrix/media/r0/download/gnome.org/62a43e4dd1f71c657be994f79a4a203db9c9e708/video_514ec09.mp4.

I would say this bug can be closed when https://raw.githubusercontent.com/gnome-design-team/gnome-mockups/master/gtk/loop5.webm is fixed.

I also posted a link to https://matrix.org/_matrix/media/v1/download/matrix.org/vatFhMWBkNvNZhJWOdQCkeaQ in one of the comments above. I assume that one is really the same as this issue.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1727428</commentid>
    <comment_count>18</comment_count>
    <who name="Fernando Jiménez Moreno">fjimenez</who>
    <bug_when>2021-02-09 22:00:13 -0800</bug_when>
    <thetext>(In reply to Xabier Rodríguez Calvar from comment #15) 
&gt; AFAIK a working range request should answer 206, not 200.
&gt; 
&gt; If we should accept 200 as a valid answer and be prepared to handle the
&gt; whole download is a different issue.

According to https://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.35.2 a server may ignore the `Range` header and so return a 200 response with the full content.

Doing some archeology, it seems that https://bugs.webkit.org/show_bug.cgi?id=85994 handled this scenario. But</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1727515</commentid>
    <comment_count>19</comment_count>
    <who name="Michael Catanzaro">mcatanzaro</who>
    <bug_when>2021-02-10 06:05:09 -0800</bug_when>
    <thetext>Maybe you could finish that thought in bug #221622. :)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1839865</commentid>
    <comment_count>20</comment_count>
    <who name="Michael Catanzaro">mcatanzaro</who>
    <bug_when>2022-02-10 12:11:18 -0800</bug_when>
    <thetext>I&apos;m renaming this bug &quot;Cannot play particular WebM videos&quot; -&gt; &quot;Cannot play particular videos&quot; because it affects MP4 videos too. E.g. WebKit is unable to play MP4 videos attached to this Bugzilla instance (e.g. attachment #451573). The symptoms are identical, so I assume it is the same bug.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1958201</commentid>
    <comment_count>21</comment_count>
    <who name="Michael Catanzaro">mcatanzaro</who>
    <bug_when>2023-05-26 08:27:43 -0700</bug_when>
    <thetext>(In reply to Philippe Normand from comment #5)
&gt; The problem seems to be that loop5.webm is thought to be audio/webm by the
&gt; DOMImplementation and MediaDocument seems to handle only &lt;video&gt; elements,
&gt; so an empty page is displayed, only controls are visible.

This seems to be sort of fixed now? WebKit recognizes that it doesn&apos;t support the content type of https://raw.githubusercontent.com/gnome-design-team/gnome-mockups/master/gtk/loop5.webm and the video gets downloaded instead.

Well, that&apos;s not really the *desired* behavior, but at least it&apos;s not as broken as it was before.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1958579</commentid>
    <comment_count>22</comment_count>
    <who name="Jakub Steiner">jsteiner</who>
    <bug_when>2023-05-29 01:04:50 -0700</bug_when>
    <thetext>Author of said videos here. I&apos;m having trouble playing back some of these webm/vp9 or mp4/h264 video produced with Blender/ffmpeg. The common trait is that they don&apos;t have sound.

It&apos;s not that they don&apos;t play directly, but also embedded with &lt;video&gt;:

https://teams.pages.gitlab.gnome.org/Design/web-experiments/static/tiling/</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1958585</commentid>
    <comment_count>23</comment_count>
    <who name="Philippe Normand">philn</who>
    <bug_when>2023-05-29 02:03:44 -0700</bug_when>
    <thetext>(In reply to Jakub Steiner from comment #22)
&gt; Author of said videos here. I&apos;m having trouble playing back some of these
&gt; webm/vp9 or mp4/h264 video produced with Blender/ffmpeg. The common trait is
&gt; that they don&apos;t have sound.
&gt; 
&gt; It&apos;s not that they don&apos;t play directly, but also embedded with &lt;video&gt;:
&gt; 
&gt; https://teams.pages.gitlab.gnome.org/Design/web-experiments/static/tiling/

This is bug 221622 it seems.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1964038</commentid>
    <comment_count>24</comment_count>
    <who name="Philippe Normand">philn</who>
    <bug_when>2023-06-28 09:01:24 -0700</bug_when>
    <thetext>(In reply to Jakub Steiner from comment #22)
&gt; Author of said videos here. I&apos;m having trouble playing back some of these
&gt; webm/vp9 or mp4/h264 video produced with Blender/ffmpeg. The common trait is
&gt; that they don&apos;t have sound.
&gt; 
&gt; It&apos;s not that they don&apos;t play directly, but also embedded with &lt;video&gt;:
&gt; 
&gt; https://teams.pages.gitlab.gnome.org/Design/web-experiments/static/tiling/

Plays fine here now in 44.0-128-g9791b24be+</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1964042</commentid>
    <comment_count>25</comment_count>
    <who name="Michael Catanzaro">mcatanzaro</who>
    <bug_when>2023-06-28 09:15:17 -0700</bug_when>
    <thetext>(In reply to Philippe Normand from comment #24)
&gt; Plays fine here now in 44.0-128-g9791b24be+

It&apos;s broken for me with the exact same version. I have:

WebKitGTK 2.41.5
GStreamer 1.22.4

$ flatpak remote-info --log gnome-nightly org.gnome.Platform//master
        ID: org.gnome.Platform
       Ref: runtime/org.gnome.Platform/x86_64/master
      Arch: x86_64
    Branch: master
Collection: org.gnome.Nightly
  Download: 345.8 MB
 Installed: 933.9 MB

    Commit: b7fab3a9bcf3de2dba4423e92b15767f23d4a190bd891bc5b02273635f44ee46
    Parent: d3c3a428ebe93331f213d3ca80a7a708e41bcfbf7e720a0ffefc31b0ef3684c3
   Subject: Export org.gnome.Platform
      Date: 2023-06-27 22:47:26 +0000
   History: 

Let me try to get a GStreamer debug log.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1964046</commentid>
    <comment_count>26</comment_count>
    <who name="Michael Catanzaro">mcatanzaro</who>
    <bug_when>2023-06-28 09:27:51 -0700</bug_when>
    <thetext>Looking at the GStreamer debug log, I think the problem on Jakub&apos;s website in bug #221622. I&apos;ll avoid attaching the debug log here because I&apos;m pretty sure that&apos;s a different problem from the bug with https://raw.githubusercontent.com/gnome-design-team/gnome-mockups/master/gtk/loop5.webm.

In fact, it&apos;s impossible to reproduce the original bug here because WebKit no longer supports the content type and downloads rather than loads https://raw.githubusercontent.com/gnome-design-team/gnome-mockups/master/gtk/loop5.webm, as I mentioned above in comment #20. The content type header for this file is audio/webm. That actually looks like a GitLab bug, because it should be a video, not audio. But anyway, I tested in Firefox and Firefox does not support audio/webm either. So the original bug with https://raw.githubusercontent.com/gnome-design-team/gnome-mockups/master/gtk/loop5.webm is no longer valid.

The next broken video mentioned in this bug is https://gnome.modular.im/_matrix/media/r0/download/gnome.org/62a43e4dd1f71c657be994f79a4a203db9c9e708/video_514ec09.mp4, which got split out into... bug #221622. Moving on.

The remaining problem here is https://bugs.webkit.org/attachment.cgi?id=451573. This video plays fine in Firefox but not in Epiphany. I got yet another debug log for this and decided this video is also broken due to bug #221622, same problem as with Jakub&apos;s video.

So I think there is nothing more to fix here, at least not for now. Closing. I strongly suspect we still have a bug that causes WebM video documents to not work, but we&apos;ll have to resolve bug #221622 first before we can make further progress, since that seems to be breaking a large number of videos.

BTW, to get the debug log, I followed the instructions from https://trac.webkit.org/wiki/WebKitGTK/Debugging#Debuggingmultimediastuff, but they will be lost when trac disappears. It would be good to add instructions for GStreamer debugging to https://docs.webkit.org/</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>