Problem with video 5

I am trying to configure my site to use HTML 5 video. Mp4 files are served from S3. My MIME type is correct and the URL is correct. This does not work. The only thing I can think of is the wrong codec.

Here is my code:

<video width="320" height="240" controls>
<source src="{url}"  type='video/mp4; codecs="avc1.42E01E, mp4a.40.2"'>
</video>

Now, as I understand it, the audio codec is always the same. mp4a.40.2. The video is encoded as basic, but according to http://wiki.whatwg.org/wiki/Video_type_parameters#MPEG-4 , the last two characters of the video codec in my code 1Eare a variable.

Are there any wrong characters to make the video not work? If so, how do I find the correct settings?

It’s not easy for me to wrap my head around this stuff. Thanks for any help you can provide.

+3
source share
2 answers

The idea behind the video codec information is that your browser will not download the video if it cannot play it. ( found that here ) Therefore, I think that even with the wrong but general avc level (last 2 characters) it should load and play. I found this guide on how to detect and change the avc level using a hex editor. Megui obviously also works for this.

+1
source

Try to remove the attribute type. If this makes it work, you have found a problem. Also check the actual HTTP header Content-Type.

0

Source: https://habr.com/ru/post/1755347/


All Articles