Sprite
Sprite

Reputation: 39

Some MP4 files play sound only on Chrome, IE(edge) and FireFox, do I have to change videos codec?

I have some MP4 files where sound is played but video is not shown, while all the other mp4 files are playing just fine. I used PHP to echo video from the database, and obviously html to show it.

The videos that show sound only, I have recorded using my phone while the ones that work I used my desktop. They both have MP4 extension. I believe its got something to do with the codec ?

Do I have to specify or change current videos codec before displaying it, or uploading it ?

<video  style="
          width: auto ;
           max-width: 100% ;
           height: auto ;
           width: 600px;
           height: 560px;
           object-fit: fill;" 

    class="video-item" controls = "controls" loop>
    <source   src="cvs/<?php echo $articles['data']?>" type="video/mp4">

Upvotes: 0

Views: 2399

Answers (1)

Sprite
Sprite

Reputation: 39

Turns out samsung has a setting, option called "HEVC" which lowers the videos file size but makes it impossible to upload and display it online. I turned it off and now it works just fine.

Upvotes: 2

Related Questions