this post was submitted on 18 Nov 2024
12 points (100.0% liked)

Firefox

17907 readers
140 users here now

A place to discuss the news and latest developments on the open-source browser Firefox

founded 4 years ago
MODERATORS
 

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.

you are viewing a single comment's thread
view the rest of the comments
[โ€“] taaz@biglemmowski.win 3 points 1 day ago* (last edited 1 day ago) (1 children)

Your second example has wrong type for that file should be video/mp4.

https://tekeye.uk/html/html5-video-test-page

[โ€“] Donatello@lemmy.ml 1 points 23 hours ago* (last edited 23 hours ago) (2 children)

Thank you @taaz@biglemmowski.win 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)

[โ€“] taaz@biglemmowski.win 1 points 22 hours ago* (last edited 22 hours ago)

I know, I've linked that to show the correct mimetype.

Is your web server returning the correct mimetype for the FooBar.mp4 file ? Also codecs part should probably look more like this: type='video/mp4; codecs="av1, ogg"' (omit the ogg in your case)

E: if you are opening the html with the element as a file:// in firefox, you probably wont be able to load resources from http:// (only https:// it seems), and it will show the same error in this case but it's because of security not because it can't decode the media. You can see the detailed error (for loading the file) in developer tools ctrl+shift+i and switch to network tab.