9 ms·
Better web video with AV1 codec
- deanclatworthy 8y agoUsing these codecs isn’t going to be better for your users if their hardware cannot natively decode it. Sure, it might shave a few gigabytes off their data plan, but it’ll also drain their batteries quicker.
- iskin 8y agoBecause of this reason, AV1 is now disabled for mobile devices. On desktop hardware support is not critical.
- basch 8y agowhat percent of desktops are laptops?
- ysleepy 8y agoMy Notebook's fan starts spinning quite annoyingly because youtube does vp9. Just for comfort I prefer hardware decoding.
- jorvi 8y ago'media.webm.enabled' set to 'false' in Firefox's about:config will disable VP8 and VP9, gracefully falling back to (hardware accelerated) MP4 in almost all cases. This will break .webm and .webp images though.
- mort96 8y agoCould there be some way to only disable webm on youtube? Disabling webm for all of the web just because it makes youtube annoying seems unfortunate.
- earenndil 8y agoThere's an addon called h264ify that does just that. To test if it's working, go to https://www.youtube.com/html5 https://www.youtube.com/html5 and 'WebM VP8' and 'MSE & WebM VP9' are unchecked. Alternately, go to any youtube video and right click->stats for nerds.
- TD-Linux 8y agoFirefox Nightly switched to dav1d, which for many users is only going to use a fraction of their CPU. https://code.videolan.org/videolan/dav1d/issues/15#note_23456 https://code.videolan.org/videolan/dav1d/issues/15#note_2345... It will still be a measurable difference if you are watching hours of video, but for the gif replacement that this site suggests, it's negligible.
- grapeli23 8y agoChrome (74) also: https://bugs.chromium.org/p/chromium/issues/detail?id=924370 https://bugs.chromium.org/p/chromium/issues/detail?id=924370
- deleted 8y ago[deleted]
- asddgsgsaxg 8y agoThey did not switch to av1, they simply added support for it. H264 is still supported.
- BTeam 8y agoThey switched their AV1 decoder from libaom to dav1d.
- gwbas1c 8y ago> might shave a few gigabytes off their data plan I think I pay about $10 a gigabyte? If I actually used that many gigabytes a month, the savings would pay for a new phone!
- ct0 8y agoI feel bad for you! here is a encoding format that might work for you http://takeovertheworld.org/matrix/ http://takeovertheworld.org/matrix/
- billjings 8y agoAs always, it depends on the tradeoffs! In general, encoding will cost you a whole lot more than decoding. Software encoders need to be really good to ship on the encoding side, and they're not there with AV1 yet. Decoding, on the other hand, is pretty cheap. Hardware is still better, but it's been a long time since mobile CPUs were in a state that forced you to use a hardware decoder meet typical performance requirements. Bandwidth is so much more limited that using a software decoder to achieve a higher quality at a given bitrate is almost alway worth it. Depending on the OS, if you watch a lot of video it is not unlikely that you are using a mobile app that uses, say, a software VP9 decoder.
- ksec 8y ago>Decoding, on the other hand, is pretty cheap. Hardware is still better, but it's been a long time since mobile CPUs were in a state that forced you to use a hardware decoder meet typical performance requirements. Bandwidth is so much more limited that using a software decoder to achieve a higher quality at a given bitrate is almost alway worth it. It is not. Not with Modern Codec. Battery is so much more limited you will always want to trade high bandwidth than Software Decode. Apple tried VP9 software decode for youtube and all we got was very bad user experience. For most use case within a 20% bitrate, the difference between x264, VP9, x265 and AV1 are small, and you will always want to choose the one your user has hardware decode. No one expect their Laptop , PC, Mobile, Tablet to get burning hot just watching a video for a few mixtures. Hardware decoding is literally the most important hardware on Mobile usage, and I argue the same for PC.
- imtringued 8y agoYeah just look at the linked dav1d benchmarks. The decoder consumes a whole core for a single video at 30fps.
- billjings 8y agoMy language was too strident. But there are shipping production applications that are using software VP9 encoders successfully, with improved user experience.
- adamnemecek 8y agoHere’s a Rust AV1 mplementatuon by xiph https://github.com/xiph/rav1e https://github.com/xiph/rav1e
- lousken 8y agoYea, but what about AV1.1 [0] ? Isn't it better to wait for that? [0] https://old.reddit.com/r/AV1/comments/a1038a/av11_is_launching_soon_and_will_include_breaking/?limit=500 https://old.reddit.com/r/AV1/comments/a1038a/av11_is_launchi...
- e1ven 8y agoI don't know a lot about the specifics of this release, but isn't there always going to be a N+1 version which is better? After a new version comes out it's going to take a while to work through the pipeline of inclusion into various projects, and that'll take a while, then people need to upgrade, etc.
- iskin 8y agoNope, you can use AV1 without waiting for AV1.1. AV1.1 players will support AV1.
- lousken 8y agoPlayers will support both, but what about HW acceleration that will come eventually? That's my concern - for future proofing with mobile devices you should use AV1.1, correct?
- Rebelgecko 8y agoI'm not super familiar with how HW acceleration is implemented in practice, but I imagine that a lot of the "building blocks" for HW accelerated AV1 will be reusable for AV1.1. If that's the case, as long as a mobile device gets the right software updates the hardware for AV1 will still be beneficial for AV1.1.
- twotwotwo 8y agoIf I'm parsing what I read right: 1.1 prohibits some narrow tiles--not the little 4x4 transform/prediction tiles, larger independently decompressible tiles that are used to allow parallelism. I suspect nobody was generating the narrow tiles before: it would be bad for compression, since the whole idea of these tiles is you can't predict across their boundaries. But they were technically allowed even if they didn't make sense. The other things I see are a new option that doesn't break existing AV1 streams, and a couple changes that look like essentially editorial cleanups that were deferred during the spec freeze to avoid confusion. They were right not to do these changes during spec freeze, but (at least from what I can see) they're not practical issues for folks considering AV1 encoding today.
- NelsonMinar 8y agoSo far the pirate scene has totally ignored AV1. Most stuff is still H.264, with some H.265 (HEVC) releases.
- magila 8y agoThe pirate scene isn't what it used to be when it comes to adopting new technology. In the past the scene would adopt whatever codec gave the highest compression efficiency with little regard for anything else. You could see this in the adoption of MPEG4 ASP even though it was not widely adopted by the commercial market. Today compatibility with set-top boxes is much more of a consideration than it used to be. The increased speed of internet service and reduced cost of storage have also lessened pressure to pursue ultimate efficiency.
- amyjess 8y ago> Today compatibility with set-top boxes is much more of a consideration than it used to be. My experience with the anime and tokusatsu fansubbing community is the opposite. There's a lot of "you must use mpv or CCCP", and a ton of disdain for people who watch on something other than a PC. A small handful of groups will provide alternate "toaster-friendly" downloads for people on set-top boxes. For example, for ongoing TV shows, the main release will be a 720p or 810p softsubbed MKV with Hi10P video, and the "toaster-friendly" release will be a 480p hardsubbed MP4 with 8-bit video. This is mostly in the tokusatsu scene, though; for set-top boxes, the anime community mostly relies on dedicated encoding groups like DeadFish who provide "toaster-friendly" versions of other groups' releases because most groups won't even consider releasing something that's set-top-box-friendly. Also, there is an assumption that if you don't want to watch on a PC, then you don't mind SD video. For fansubs that use Blu-ray-sourced video, there are no "toaster-friendly" options. You can basically expect groups to do a 720p Hi10P release alongside a 1080p release which is either Hi10P or HEVC, both of which are softsubs-only and in MKV containers. The audio is often, but not always, FLAC. For those unfamiliar with how subtitles work, softsubs are incompatible with pretty much every set-top box. And there are some groups that will use intricate typesetting that can bring even decent PCs to their knees. For example, Commie is notorious for releasing an episode of JoJo's Bizarre Adventures with typesetting so over the top that it crashed most people's computers (I've never seen the episode myself, but I understand it involved hundreds of lines of text all continuously zooming in and out). But even the anime/toku community doesn't use AV1, and HEVC is only for 1080p releases sourced from Blu-ray video (and to reiterate, a lot of groups will still use Hi10P even for 1080p).
- doubleorseven 8y ago"in theory, it does not matter, but MP4 is recommended and seems to be the most popular at the moment." If I'm not mistaking, the <video> tag can't play MOV[0] so MP4 is the way to go. [0] https://developer.mozilla.org/en-US/docs/Web/HTML/Supported_media_formats#File_formats https://developer.mozilla.org/en-US/docs/Web/HTML/Supported_...
- iskin 8y agoYeap. But technically, you can use WebM container (a subset of MKV) for AV1. Chrome and Firefox support it. But size is a little bigger and WebM container seems like is not really official for AV1.
- favorited 8y agoHuh. That's kinda surprising, since MP4 containers are really just a standardized extension of QuickTime. IIRC, it reads like they took the QuickTime spec, did a find-and-replace to change the word "atom" to "box," then added a couple of MPEG-specific enhancements.
- Wowfunhappy 8y agoOne thing jumps out to me in the article: they're recommending crf 30 as a starting point for the x264 encode, and they suggest experimenting with values as high as 40. Unless there's some detail I'm missing... crf 30 is going to look awful for anything ≤ 1080p, and I can't think of a time I'd ever use a value that high. Maybe for 4K content it would be alright, but I don't think that was specified. 40 is just ridiculous. (I have no idea what the crf scale is like for x265 or av1, so no comment there.)
- AndrewUnmuted 8y agoYou're correct. An x264 CRF of 30 would look pretty miserable on almost anything compared to the source. The article also uses the Main profile in that `-crf 30` example, negating quality even more. The author writes that this must be done to enable compatibility with Safari, but AFAIK Safari has supported H.264@High 5.1 for a while now. Using High profile would help reduce some of the compression artifacts that will result from using a CRF of 30. EDIT: Looking at this "Evil Martians" webpage, it appears this blog post is just marketing for some generalized programming contracting company. I doubt they have actual video experts under their employ - these guys are just web devs who know enough bash to use FFmpeg from the CLI. I doubt they understand the implications of the commands they're running.
- iskin 8y ago> I doubt they understand the implications of the commands they're running. I put a description for every arguments used by me in FFmpeg commands. https://evilmartians.com/chronicles/better-web-video-with-av1-codec#understand-compression-options https://evilmartians.com/chronicles/better-web-video-with-av... Is it not enough?
- Terretta 8y agoNot really, no. Encode quality has become a science: https://medium.com/netflix-techblog/dynamic-optimizer-a-perceptual-video-encoding-optimization-framework-e19f1e3a277f https://medium.com/netflix-techblog/dynamic-optimizer-a-perc... For a deeper dive on FFmpeg options you can crib from the ‘scene’ community: https://scenerules.org/t.html?id=tvx2642k16.nfo https://scenerules.org/t.html?id=tvx2642k16.nfo Or grab Handbrake, pick some built-in device or streaming target, and see the tuned default CLI options.
- steeve 8y agoHuge shout out to the VideoLan team for writing dav1d, possibly the best AV1 decoder right now. https://code.videolan.org/videolan/dav1d https://code.videolan.org/videolan/dav1d
- ElijahLynn 8y agoAV1 has source code from VP10 (never published) of the VP8/VP9 fame. It is essentially what VP10 was going to be plus Daala and Thor. https://en.wikipedia.org/wiki/Daala https://en.wikipedia.org/wiki/Daala (Xiph/Mozilla) https://en.wikipedia.org/wiki/Thor_(video_codec) https://en.wikipedia.org/wiki/Thor_(video_codec) (Cisco) https://en.wikipedia.org/wiki/VP9#Successor:_from_VP10_to_AV1 https://en.wikipedia.org/wiki/VP9#Successor:_from_VP10_to_AV... (Google) Updated: to clarify that AV1 is not only VP10 but also Daala and Thor, credit to iskin.
- iskin 8y agoNot only. It is also based on Xiph's/Mozilla's Daala and Cisco's Thor.
- ElijahLynn 8y agoThanks, I updated my comment.
- weugek 8y agoWow this font is too large for my screen and it doesn't change if I zoom out, great!