cross-posted from: https://lemmy.ml/post/22627659

Hi,

I have a couples of AV1 videos that I would like to display on a html page.

I’ve tried

<video controls preload="none">
    <source src="FooBar.mp4">
</video>

but it trow back

I’ve tried first with MKV container as it’s listed on the wikipedia page.

but this is not listed on the mozilla page https://developer.mozilla.org/en-US/docs/Web/Media/Formats/Video_codecs 🤔

Confusing… as I found also this in the firefox release note:

Firefox 97 and later versions support AV1 video in the MKV container.

So WTF !?

I’ve tried also

<video controls preload="none">
    <source src="FooBar.mp4" type="video/webm; codecs='av01.0.08M.08'">
</video>

but that change nothing…

Any ideas ?

Thanks.

  • Malix@sopuli.xyz
    link
    fedilink
    arrow-up
    0
    ·
    edit-2
    2 hours ago

    seems like the codecs=‘something’ is REALLY nitpicky. managed to get a test video to play with:

    <video> 
        <source src="test.mp4" type='video/mp4; codecs="avc1.4d401f"'>
    </video>
    

    I made the video by encoding some random clip with ffmpeg -i random_video.mp4 -c:v libaom-av1 -crf 30 test.mp4

    As for how are you supposed to know the “4d401f”? beats me, found it here: https://caraya.github.io/av1-video-demo/

    edit: https://developer.mozilla.org/en-US/docs/Web/Media/Formats/codecs_parameter#av1 does say that the codec string should look a bit different, but… I dunno, not a video-understanding-webmonke.

    edit2: and now I realize that since it works with the codecs=avc1 - it’s the older av1 variant? Not really what you were asking. Whoopsiedaisy.

    • Donatello@lemmy.mlOP
      link
      fedilink
      arrow-up
      0
      ·
      2 hours ago

      Thanks @[email protected] ,

      by any change I’ve tried codecs="avc1.4d401f" with my videos but of course it’s not working.

      Whats drive me crazy, is when open trough file:/// Firefox can play it, but once inside an html page, you have to specify the right codec !? WTF

    • Donatello@lemmy.mlOP
      link
      fedilink
      English
      arrow-up
      0
      ·
      edit-2
      2 hours ago

      Thank you @[email protected] no matter the type I enter, it’s still not working…

      btw the videos on your link are encoded H264 with , not AV1

      Codec: H264 - MPEG-4 AVC (part 10) (avc1)