HTML5 video only for video / mp4 playback

I have an application created using codeigniter and running on Facebook. This application should allow users to download videos like mp4.

Downloading the video is fine. I set the mime type in mimes.php as 'mp4' => array('video/mp4', 'application/octet-stream').

I uploaded a video that appeared as type application / octet-stream when I checked with the codeigniters file upload class. But I downloaded another video from ext.mp4 and it was downloaded successfully.

A video that plays perfectly displays as an application type / octet stream when I repeat the file type, but a video that only plays audio displays as a video / mp4 type.

However, when I try to watch a video in my interface using HTML5 video, it plays, but only audio. You can hear the sound when the video is playing, but I do not see the video itself.

How to fix it?

EDIT:

Video reproducing only sound can be seen here

You can watch the video if you watch it on my computer in a video player, but it only plays audio on the Internet.

The code that displays the video

<video  width="410" controls>
              <source src=" <?php echo base_url().$upload_path.'/'.$videos_dir.'/'. $item['name'];?>" type="video/mp4">

                Your browser does not support the video tag.
            </video>
+3
source share
1 answer

It turns out the video was not properly encoded to support the HTML5 video tag.

HTML5 video requires MP4 video with H264 video codec and AAC audio codec.

The problematic video was not the H264 codec. Running it through the converter fixed it.

+11
source

All Articles