Search code examples
htmlhtml5-videomp4

MP4 Video not Playing on Github Page Website


I am in the process of inserting a MP4 video (which is already converted to H.264 to make it compatible with Chrome and other websites) on a personal website based on HTML 5 using following code:

<video  controls >
<source src="MultiUSV_Trim_MP4.mp4" type="video/mp4">
</video>

But what I am getting is:

enter image description here

The video is not working on Chrome Browser. I haven't tried to open and test my webpage on other browsers but see from other reviews that the video might work in other browsers. I am looking for a solution which is compatible with all browsers and work with all browsers.

I tried with Firefox Browser the webpage and here is result:

enter image description here

Any further directions will be appreciated.

Snapshot of the media information enter image description here


Solution

  • This is the starting path to your page's files (so just add required filename at ending):

    https://github.com/YogangSingh/YogangSingh.github.io/raw/main/

    Try as:

    <video controls="" width="800" height="500" muted="" loop="" autoplay="">
    <source src="https://github.com/YogangSingh/YogangSingh.github.io/raw/main/MultiUSV_Trim_MP4.mp4" type="video/mp4">
    </video>