From 8824afb494e5398bc0efcf5f7eb78782096fc90c Mon Sep 17 00:00:00 2001 From: A1lo Date: Fri, 18 Mar 2022 21:53:46 +0800 Subject: Replace marco `anch` with `` tag for `zh-CN` (#4668) * replace anch with tag `` * auto replace anch with scripts * fix: resolve some incorrect anchors * replace anch with markdown link in markdown files * sync with english version for `Properties` * fix: resolve some incorrect anchors * using `Specifications` marco to replace `` * fix: resolve some incorrect anchors * remove the `noteCard` and add a `h2` head * fix: resolve some incorrect anchors * remove the duplicated content * fix: resolve some incorrect anchors * fix: resolve some incorrect anchors * revert the content change and replace anch * revert the content change and replace anch * revert the content chang * fix: correct the `href` * revert content changes and replace the anch * fix: resolve some incorrect anchors * fix: resolve some incorrect anchors * fix: resolve some incorrect anchors --- .../zh-cn/web/media/formats/containers/index.html | 16 ++++---- .../zh-cn/web/media/formats/image_types/index.html | 44 +++++++++++----------- .../web/media/formats/video_codecs/index.html | 34 ++++++++--------- 3 files changed, 47 insertions(+), 47 deletions(-) (limited to 'files/zh-cn/web/media/formats') diff --git a/files/zh-cn/web/media/formats/containers/index.html b/files/zh-cn/web/media/formats/containers/index.html index 0821e05a3d..5e0a5cd9b2 100644 --- a/files/zh-cn/web/media/formats/containers/index.html +++ b/files/zh-cn/web/media/formats/containers/index.html @@ -29,42 +29,42 @@ translation_of: Web/Media/Formats/Containers - + - + - + - + - + - + - + - + diff --git a/files/zh-cn/web/media/formats/image_types/index.html b/files/zh-cn/web/media/formats/image_types/index.html index 29b8a69cb3..5abcecd58a 100644 --- a/files/zh-cn/web/media/formats/image_types/index.html +++ b/files/zh-cn/web/media/formats/image_types/index.html @@ -33,7 +33,7 @@ translation_of: Web/Media/Formats/Image_types - + @@ -41,7 +41,7 @@ translation_of: Web/Media/Formats/Image_types - + @@ -49,7 +49,7 @@ translation_of: Web/Media/Formats/Image_types - + @@ -57,7 +57,7 @@ translation_of: Web/Media/Formats/Image_types - + @@ -65,7 +65,7 @@ translation_of: Web/Media/Formats/Image_types - + @@ -73,7 +73,7 @@ translation_of: Web/Media/Formats/Image_types - + @@ -81,7 +81,7 @@ translation_of: Web/Media/Formats/Image_types - + @@ -89,7 +89,7 @@ translation_of: Web/Media/Formats/Image_types - + @@ -97,7 +97,7 @@ translation_of: Web/Media/Formats/Image_types - + @@ -105,7 +105,7 @@ translation_of: Web/Media/Formats/Image_types - + @@ -126,7 +126,7 @@ translation_of: Web/Media/Formats/Image_types

APNG (Animated Portable Network Graphics)

-

APNG is a file format first introduced by Mozilla which extends the {{anch("PNG")}} standard to add support for animated images. Conceptually similar to the animated GIF format which has been in use for decades, APNG is more capable in that it supports a variety of {{interwiki("wikipedia", "color depth", "color depths")}}, whereas animated GIF supports only 8-bit {{interwiki("wikipedia", "indexed color")}}.

+

APNG is a file format first introduced by Mozilla which extends the PNG standard to add support for animated images. Conceptually similar to the animated GIF format which has been in use for decades, APNG is more capable in that it supports a variety of {{interwiki("wikipedia", "color depth", "color depths")}}, whereas animated GIF supports only 8-bit {{interwiki("wikipedia", "indexed color")}}.

APNG is ideal for basic animations that do not need to synchronize to other activities or to a sound track, such as progress indicators, activity {{interwiki("wikipedia", "throbber", "throbbers")}}, and other animated sequences. For example, APNG is one of the formats supported when creating animated stickers for Apple's iMessage application (and the Messages application on iOS). They're also commonly used for the animated portions of web browsers' user interfaces.

@@ -216,7 +216,7 @@ translation_of: Web/Media/Formats/Image_types

While other data representations are defined in the specification, they are not widely used and often completely unimplemented. These features include: support for different bit depths, indexed color, alpha channels, and different pixel orders (by default, BMP is written from bottom-left corner toward the right and top, rather than from the top-left corner toward the right and bottom).

-

Theoretically, several compression algorithms are supported, and the image data can also be stored in {{anch("JPEG")}} or {{anch("PNG")}} format within the BMP file.

+

Theoretically, several compression algorithms are supported, and the image data can also be stored in JPEG or PNG format within the BMP file.

{{anch("3GP")}}3GP Third Generation Partnership Firefox for Android
{{anch("ADTS")}}ADTS Audio Data Transport Stream Firefox2
{{anch("FLAC")}}FLAC Free Lossless Audio Codec Chrome 56, Edge 16, Firefox 51, Safari 11
{{anch("MPEG", "MPEG / MPEG-2")}}MPEG / MPEG-2 Moving Picture Experts Group (1 and 2)
{{anch("MP4", "MPEG-4 (MP4)")}}MPEG-4 (MP4) Moving Picture Experts Group 4 Chrome 3, Edge 12, Firefox, Internet Explorer 9, Opera 24, Safari 3.1
{{anch("Ogg")}}Ogg Ogg Chrome 3, Firefox 3.5, Edge 173 (desktop only), Internet Explorer 9, Opera 10.50
{{anch("QuickTime", "QuickTime (MOV)")}}QuickTime (MOV) Apple QuickTime movie Only older versions of Safari, plus other browsers that supported Apple's QuickTime plugin
{{anch("WebM")}}WebM Web Media Chrome 6, Edge 173 (desktop only), Firefox 4, Opera 10.6, Safari (WebRTC only)
{{anch("APNG")}}APNG Animated Portable Network Graphics
动态便携式网络图像
image/apngChrome, Edge, Firefox, Opera, Safari
{{anch("AVIF")}}AVIF AV1 Image File Format
AV1 图像文件格式
image/avifChrome, Opera, Firefox (feature flag)
{{anch("BMP")}}BMP Bitmap file
位图文件
image/bmpChrome, Edge, Firefox, Internet Explorer, Opera, Safari
{{anch("GIF")}}GIF Graphics Interchange Format
图像互换格式
image/gifChrome, Edge, Firefox, Internet Explorer, Opera, Safari
{{anch("ICO")}}ICO Microsoft Icon
微软图标
image/x-iconChrome, Edge, Firefox, Internet Explorer, Opera, Safari
{{anch("JPEG")}}JPEG Joint Photographic Expert Group image
联合影像专家小组图像
image/jpegChrome, Edge, Firefox, Internet Explorer, Opera, Safari
{{anch("PNG")}}PNG Portable Network Graphics
便携式网络图像
image/pngChrome, Edge, Firefox, Internet Explorer, Opera, Safari
{{anch("SVG")}}SVG Scalable Vector Graphics
可缩放矢量图形
image/svg+xmlChrome, Edge, Firefox, Internet Explorer, Opera, Safari
{{anch("TIFF")}}TIFF Tagged Image File Format
标签图像文件格式
image/tiffSafari
{{anch("WebP")}}WebP Web Picture format
万维网图像格式
image/webp
@@ -294,7 +294,7 @@ translation_of: Web/Media/Formats/Image_types

GIF (Graphics Interchange Format)

-

In 1987, the CompuServe online service provider introduced the {{interwiki("wikipedia", "GIF")}} (Graphics Interchange Format) image file format to provide a compressed graphics format that all members of their service would be able to use. GIF uses the {{interwiki("wikipedia", "Lempel-Ziv-Welch")}} (LZW) algorithm to losslessly compress 8-bit indexed color graphics. GIF was one of the first two graphics formats supported by {{Glossary("HTML")}}, along with {{anch("XBM")}}.

+

In 1987, the CompuServe online service provider introduced the {{interwiki("wikipedia", "GIF")}} (Graphics Interchange Format) image file format to provide a compressed graphics format that all members of their service would be able to use. GIF uses the {{interwiki("wikipedia", "Lempel-Ziv-Welch")}} (LZW) algorithm to losslessly compress 8-bit indexed color graphics. GIF was one of the first two graphics formats supported by {{Glossary("HTML")}}, along with XBM.

Each pixel in a GIF is represented by a single 8-bit value serving as an index into a palette of 24-bit colors (8 bits each of red, green, and blue). The length of a color table is always a power of 2 (that is, each palette has 2, 4, 8, 16, 32, 64, or 256 entries). To simulate more than 255 or 256 colors, {{interwiki("wikipedia", "dithering")}} is generally used. It is technically possible to tile multiple image blocks, each with its own color palette, to create truecolor images, but in practice this is rarely done.

@@ -306,7 +306,7 @@ translation_of: Web/Media/Formats/Image_types

Another popular feature of GIF is support for {{interwiki("wikipedia", "Interlacing_(bitmaps)", "interlacing")}}, where rows of pixels are stored out of order so that partially-received files can be displayed in lower quality. This is particularly useful when network connections are slow.

-

GIF is a good choice for simple images and animations, although converting full color images to GIF can result in unsatisfactory dithering. Typically, modern content should use {{anch("PNG")}} for lossless and indexed still images, and should consider using {{anch("APNG")}} for lossless animation sequences.

+

GIF is a good choice for simple images and animations, although converting full color images to GIF can result in unsatisfactory dithering. Typically, modern content should use PNG for lossless and indexed still images, and should consider using APNG for lossless animation sequences.

@@ -387,7 +387,7 @@ translation_of: Web/Media/Formats/Image_types

The ICO (Microsoft Windows icon) file format was designed by Microsoft for desktop icons of Windows systems. However, early versions of Internet Explorer introduced the ability for a web site to provide a ICO file named favicon.ico in a web site's root directory to specify a favicon — an icon to be displayed in the Favorites menu, and other places where an iconic representation of the site would be useful.

-

An ICO file can contain multiple icons, and begins with a directory listing details about each. Following the directory comes the data for the icons. Each icon's data can be either a {{anch("BMP")}} image without the file header, or a complete {{anch("PNG")}} image (including the file header). If you use ICO files, you should use the BMP format, as support for PNG inside ICO files wasn't added until Windows Vista and may not be well supported.

+

An ICO file can contain multiple icons, and begins with a directory listing details about each. Following the directory comes the data for the icons. Each icon's data can be either a BMP image without the file header, or a complete PNG image (including the file header). If you use ICO files, you should use the BMP format, as support for PNG inside ICO files wasn't added until Windows Vista and may not be well supported.

ICO files should not be used in web content. Additionally, their use for favicons has subsided in favor of using a PNG file and the {{HTMLElement("link")}} element, as described in {{SectionOnPage("/en-US/docs/Web/HTML/Element/link", "Providing icons for different usage contexts")}}.

@@ -584,7 +584,7 @@ translation_of: Web/Media/Formats/Image_types

PNG (Portable Network Graphics)

-

The {{Glossary("PNG")}} (pronounced "ping") image format uses lossless or lossy compression to provide more efficient compression, and supports higher color depths than {{anch("GIF")}}, as well as full alpha transparency support.

+

The {{Glossary("PNG")}} (pronounced "ping") image format uses lossless or lossy compression to provide more efficient compression, and supports higher color depths than GIF, as well as full alpha transparency support.

PNG is widely supported, with all major browsers offering full support for its features. Internet Explorer, which introduced PNG support in versions 4–5, did not fully support it until IE 9, and had many infamous bugs for many of the intervening years, including in the once-omnipresent Internet Explorer 6. This slowed PNG adoption, but it is now commonly used, especially when precise reproduction of the source image is needed.

@@ -960,7 +960,7 @@ translation_of: Web/Media/Formats/Image_types

WebP also supports animation: in a lossy WebP file, the image data is represented by a VP8 bitstream, which may contain multiple frames. Lossless WebP holds the ANIM chunk, which describes the animation, and the ANMF chunk, which represents a frame of an animation sequence. Looping is supported.

-

WebP now has broad support in the latest versions of major web browsers, although it does not have deep historical support. Provide a fallback in either {{anch("JPEG")}} or {{anch("PNG")}} format, such as with the <picture> element.

+

WebP now has broad support in the latest versions of major web browsers, although it does not have deep historical support. Provide a fallback in either JPEG or PNG format, such as with the <picture> element.

@@ -1142,7 +1142,7 @@ static unsigned char square8_bits[] = {

Photographs

-

Photographs typically fare well with lossy compression (depending on the encoder's configuration). This makes {{anch("JPEG")}} and {{anch("WebP")}} good choices for photographs, with JPEG being more compatible but WebP perhaps offering better compression. To maximize quality and minimize download time, consider providing both {{anch("Providing image fallbacks", "using a fallback")}} with WebP as the first choice and JPEG as the second. Otherwise, JPEG is the safe choice for compatibility.

+

Photographs typically fare well with lossy compression (depending on the encoder's configuration). This makes JPEG and WebP good choices for photographs, with JPEG being more compatible but WebP perhaps offering better compression. To maximize quality and minimize download time, consider providing both using a fallback with WebP as the first choice and JPEG as the second. Otherwise, JPEG is the safe choice for compatibility.

@@ -1161,9 +1161,9 @@ static unsigned char square8_bits[] = {

Icons

-

For smaller images such as icons, use a lossless format to avoid loss of detail in a size-constrained image. While lossless WebP is ideal for this purpose, support is not widespread yet, so PNG is a better choice unless you offer a {{anch("Providing image fallbacks", "fallback")}}. If your image contains fewer than 256 colors, GIF is an option, although PNG often compresses even smaller with its indexed compression option (PNG-8).

+

For smaller images such as icons, use a lossless format to avoid loss of detail in a size-constrained image. While lossless WebP is ideal for this purpose, support is not widespread yet, so PNG is a better choice unless you offer a fallback. If your image contains fewer than 256 colors, GIF is an option, although PNG often compresses even smaller with its indexed compression option (PNG-8).

-

If the icon can be represented using vector graphics, consider {{anch("SVG")}}, since it scales across various resolutions and sizes, so it's perfect for responsive design. Although SVG support is good, it may be worth offering a PNG fallback for older browsers.

+

If the icon can be represented using vector graphics, consider SVG, since it scales across various resolutions and sizes, so it's perfect for responsive design. Although SVG support is good, it may be worth offering a PNG fallback for older browsers.

@@ -1210,8 +1210,8 @@ static unsigned char square8_bits[] = { - - + +
Fallback
{{anch("SVG")}}{{anch("PNG")}}SVGPNG
diff --git a/files/zh-cn/web/media/formats/video_codecs/index.html b/files/zh-cn/web/media/formats/video_codecs/index.html index b520cca7b6..4c659e89e7 100644 --- a/files/zh-cn/web/media/formats/video_codecs/index.html +++ b/files/zh-cn/web/media/formats/video_codecs/index.html @@ -55,17 +55,17 @@ original_slug: Web/Media/Formats/视频编解码器 MP4 - {{anch("MP4V-ES")}} + MP4V-ES MPEG-4 Video Elemental Stream 3GP, MP4 - {{anch("MPEG-1")}} + MPEG-1 MPEG-1 Part 2 Visual MPEG, QuickTime - {{anch("MPEG-2")}} + MPEG-2 MPEG-2 Part 2 Visual MP4, MPEG, QuickTime @@ -116,7 +116,7 @@ original_slug: Web/Media/Formats/视频编解码器 Frame rate - Primarily affects the perceived smoothness of the motion in the image. To a point, the higher the frame rate, the smoother and more realistic the motion will appear. Eventually the point of diminishing returns is reached. See {{anch("Frame rate")}} below for details. + Primarily affects the perceived smoothness of the motion in the image. To a point, the higher the frame rate, the smoother and more realistic the motion will appear. Eventually the point of diminishing returns is reached. See Frame rate below for details. Assuming the frame rate is not reduced during encoding, higher frame rates cause larger compressed video sizes. @@ -235,7 +235,7 @@ original_slug: Web/Media/Formats/视频编解码器

Example of the ringing effect

-

Note the blue and pink fringes around the edges of the star above (as well as the stepping and other significant compression artifacts). Those fringes are the ringing effect. Ringing is similar in some respects to {{anch("Mosquito noise", "mosquito noise")}}, except that while the ringing effect is more or less steady and unchanging, mosquito noise shimmers and moves.

+

Note the blue and pink fringes around the edges of the star above (as well as the stepping and other significant compression artifacts). Those fringes are the ringing effect. Ringing is similar in some respects to mosquito noise, except that while the ringing effect is more or less steady and unchanging, mosquito noise shimmers and moves.

RInging is another type of artifact that can make it particularly difficult to read text contained in your images.

@@ -257,7 +257,7 @@ original_slug: Web/Media/Formats/视频编解码器

Mosquito noise

-

Mosquito noise is a temporal artifact which presents as noise or edge busyness that appears as a flickering haziness or shimmering that roughly follows outside the edges of objects with hard edges or sharp transitions between foreground objects and the background. The effect can be similar in appearance to {{anch("Ringing", "ringing")}}.

+

Mosquito noise is a temporal artifact which presents as noise or edge busyness that appears as a flickering haziness or shimmering that roughly follows outside the edges of objects with hard edges or sharp transitions between foreground objects and the background. The effect can be similar in appearance to ringing.

@@ -316,7 +316,7 @@ original_slug: Web/Media/Formats/视频编解码器

AV1

-

The AOMedia Video 1 (AV1) codec is an open format designed by the Alliance for Open Media specifically for internet video. It achieves higher data compression rates than {{anch("VP9")}} and {{anch("HEVC", "H.265/HEVC")}}, and as much as 50% higher rates than AVC. AV1 is fully royalty-free and is designed for use by both the {{HTMLElement("video")}} element and by WebRTC.

+

The AOMedia Video 1 (AV1) codec is an open format designed by the Alliance for Open Media specifically for internet video. It achieves higher data compression rates than VP9 and H.265/HEVC, and as much as 50% higher rates than AVC. AV1 is fully royalty-free and is designed for use by both the {{HTMLElement("video")}} element and by WebRTC.

AV1 currently offers three profiles: main, high, and professional with increasing support for color depths and chroma subsampling. In addition, a series of levels are specified, each defining limits on a range of attributes of the video. These attributes include frame dimensions, image area in pixels, display and decode rates, average and maximum bit rates, and limits on the number of tiles and tile columns used in the encoding/decoding process.

@@ -689,7 +689,7 @@ original_slug: Web/Media/Formats/视频编解码器

HEVC (H.265)

-

The High Efficiency Video Coding (HVEC) codec is defined by ITU's H.265 as well as by MPEG-H Part 2 (the still in-development follow-up to MPEG-4). HEVC was designed to support efficient encoding and decoding of video in sizes including very high resolutions (including 8K video), with a structure specifically designed to let software take advantage of modern processors. Theoretically, HEVC can achieve compressed file sizes half that of {{anch("AVC")}} but with comparable image quality.

+

The High Efficiency Video Coding (HVEC) codec is defined by ITU's H.265 as well as by MPEG-H Part 2 (the still in-development follow-up to MPEG-4). HEVC was designed to support efficient encoding and decoding of video in sizes including very high resolutions (including 8K video), with a structure specifically designed to let software take advantage of modern processors. Theoretically, HEVC can achieve compressed file sizes half that of AVC but with comparable image quality.

For example, each coding tree unit (CTU)—similar to the macroblock used in previous codecs—consists of a tree of luma values for each sample as well as a tree of chroma values for each chroma sample used in the same coding tree unit, as well as any required syntax elements. This structure supports easy processing by multiple cores.

@@ -1268,7 +1268,7 @@ original_slug: Web/Media/Formats/视频编解码器

VP8

-

The Video Processor 8 (VP8) codec was initially created by On2 Technologies. Following their purchase of On2, Google released VP8 as an open and royalty-free video format under a promise not to enforce the relevant patents. In terms of quality and compression rate, VP8 is comparable to {{anch("AVC")}}.

+

The Video Processor 8 (VP8) codec was initially created by On2 Technologies. Following their purchase of On2, Google released VP8 as an open and royalty-free video format under a promise not to enforce the relevant patents. In terms of quality and compression rate, VP8 is comparable to AVC.

If supported by the browser, VP8 allows video with an alpha channel, allowing the video to play with the background able to be seen through the video to a degree specified by each pixel's alpha component.

@@ -1375,7 +1375,7 @@ original_slug: Web/Media/Formats/视频编解码器

VP9's main profile supports only 8-bit color depth at 4:2:0 chroma subsampling levels, but its profiles include support for deeper color and the full range of chroma subsampling modes. It supports several HDR imiplementations, and offers substantial freedom in selecting frame rates, aspect ratios, and frame sizes.

-

VP9 is widely supported by browsers, and hardware implementations of the codec are fairly common. VP9 is one of the two video codecs mandated by WebM (the other being {{anch("VP8")}}). Of note, however, is that Safari supports neither WebM nor VP9, so if you choose to use VP9, be sure to offer a fallback format such as AVC or HEVC for iPhone, iPad, and Mac users.

+

VP9 is widely supported by browsers, and hardware implementations of the codec are fairly common. VP9 is one of the two video codecs mandated by WebM (the other being VP8). Of note, however, is that Safari supports neither WebM nor VP9, so if you choose to use VP9, be sure to offer a fallback format such as AVC or HEVC for iPhone, iPad, and Mac users.

Aside from the lack of Safari support, VP9 is a good choice if you are able to use a WebM container and are able to provide a fallback video in a format such as AVC or HEVC for Safari users. This is especially true if you wish to use an open codec rather than a proprietary one. If you can't provide a fallback and aren't willing to sacrifice Safari compatibility, VP9 in WebM is a good option. Otherwise, you should probably consider a different codec.

@@ -1525,13 +1525,13 @@ original_slug: Web/Media/Formats/视频编解码器
  1. -

    A WebM container using the {{anch("VP8")}} codec for video and the Opus codec for audio. These are all open, royalty-free formats which are generally well-supported, although only in quite recent browsers, which is why a fallback is a good idea.

    +

    A WebM container using the VP8 codec for video and the Opus codec for audio. These are all open, royalty-free formats which are generally well-supported, although only in quite recent browsers, which is why a fallback is a good idea.

    <video controls src="filename.webm"></video>
     
  2. -

    An MP4 container and the {{anch("AVC")}} (H.264) video codec, ideally with AAC as your audio codec. This is because the MP4 container with AVC and AAC codecs within is a broadly-supported combination—by every major browser, in fact—and the quality is typically good for most use cases. Make sure you verify your compliance with the license requirements, however.

    +

    An MP4 container and the AVC (H.264) video codec, ideally with AAC as your audio codec. This is because the MP4 container with AVC and AAC codecs within is a broadly-supported combination—by every major browser, in fact—and the quality is typically good for most use cases. Make sure you verify your compliance with the license requirements, however.

    <video controls>
       <source type="video/webm"
    @@ -1559,7 +1559,7 @@ original_slug: Web/Media/Formats/视频编解码器
     
  3. -

    An MP4 container using the {{anch("HEVC")}} codec using one of the advanced Main profiles, such as Main 4:2:2 with 10 or 12 bits of color depth, or even the Main 4:4:4 profile at up to 16 bits per component. At a high bit rate, this provides excellent graphics quality with remarkable color reproduction.  In addition, you can optionally include HDR metadata to provide high dynamic range video. For audio, use the AAC codec at a high sample rate (at least 48 kHz but ideally 96kHz) and encoded with complex encoding rather than fast encoding.

    +

    An MP4 container using the HEVC codec using one of the advanced Main profiles, such as Main 4:2:2 with 10 or 12 bits of color depth, or even the Main 4:4:4 profile at up to 16 bits per component. At a high bit rate, this provides excellent graphics quality with remarkable color reproduction.  In addition, you can optionally include HDR metadata to provide high dynamic range video. For audio, use the AAC codec at a high sample rate (at least 48 kHz but ideally 96kHz) and encoded with complex encoding rather than fast encoding.

    <video controls>
       <source type="video/webm"
    @@ -1579,7 +1579,7 @@ original_slug: Web/Media/Formats/视频编解码器
     
     

    Preparing video externally

    -

    To prepare video for archival purposes from outside your web site or app, use a utility that performs compression on the original uncompressed video data. For example, the free x264 utility can be used to encode video in {{anch("AVC")}} format using a very high bit rate:

    +

    To prepare video for archival purposes from outside your web site or app, use a utility that performs compression on the original uncompressed video data. For example, the free x264 utility can be used to encode video in AVC format using a very high bit rate:

    x264 --crf 18 -preset ultrafast --output outfilename.mp4 infile
    @@ -1587,7 +1587,7 @@ original_slug: Web/Media/Formats/视频编解码器

    Recording video

    -

    Given the constraints on how close to lossless you can get, you might consider using {{anch("AVC")}} or {{anch("AV1")}}. For example, if you're using the MediaStream Recording API to record video, you might use code like the following when creating your {{domxref("MediaRecorder")}} object:

    +

    Given the constraints on how close to lossless you can get, you might consider using AVC or AV1. For example, if you're using the MediaStream Recording API to record video, you might use code like the following when creating your {{domxref("MediaRecorder")}} object:

    const kbps = 1024;
     const Mbps = kbps*kbps;
    @@ -1599,7 +1599,7 @@ const options = {
     
     let recorder = new MediaRecorder(sourceStream, options);
    -

    This example creates a MediaRecorder configured to record {{anch("AV1")}} video using BT.2100 HDR in 12-bit color with 4:4:4 chroma subsampling and FLAC for lossless audio. The resulting file will use a bit rate of no more than 800 Mbps shared between the video and audio tracks. You will likely need to adjust these values depending on hardware performance, your requirements, and the specific codecs you choose to use. This bit rate is obviously not realistic for network transmission and would likely only be used locally.

    +

    This example creates a MediaRecorder configured to record AV1 video using BT.2100 HDR in 12-bit color with 4:4:4 chroma subsampling and FLAC for lossless audio. The resulting file will use a bit rate of no more than 800 Mbps shared between the video and audio tracks. You will likely need to adjust these values depending on hardware performance, your requirements, and the specific codecs you choose to use. This bit rate is obviously not realistic for network transmission and would likely only be used locally.

    Breaking down the value of the codecs parameter into its dot-delineated properties, we see the following:

    @@ -1613,7 +1613,7 @@ let recorder = new MediaRecorder(sourceStream, options);
    av01 - The four-character code (4CC) designation identifying the {{anch("AV1")}} codec. + The four-character code (4CC) designation identifying the AV1 codec. 2 -- cgit v1.2.3-54-g00ecf