From patchwork Fri Mar 22 17:01:03 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Antoine Soulier X-Patchwork-Id: 47321 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a21:1014:b0:1a3:ac71:9534 with SMTP id nk20csp42436pzb; Fri, 22 Mar 2024 10:01:55 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCVVkiXPH0Ec72n9Gv0IBN30PYKrk1ORLou64mhWSDzndb9sGs9DC9srYx0n3QRLkSi1obsdwxJtX7E7uJg2mpc6zrU1EG5BMCmJcg== X-Google-Smtp-Source: AGHT+IGYi80CH04DVmKjvZHjpfYDESfiE3rhmRVvCR7tdErlCXifgd9nxC5wDL9TR5mPL6ivO+26 X-Received: by 2002:a17:906:5651:b0:a47:e19:81c7 with SMTP id v17-20020a170906565100b00a470e1981c7mr227621ejr.21.1711126915079; Fri, 22 Mar 2024 10:01:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1711126915; cv=none; d=google.com; s=arc-20160816; b=IRqXINjGGXeOaXI2bin6JKo6vVtWPWsxfszu7XQzX0ob23ToJHip+H6cx7Bx+VF/uc w6ZofcUM20CHTeW9/nIOtfCMECjxAcvXG8sD28mWN8o187q1ZDq9KElYhwuX5fHGvZkh kQ1L3/Q0vWg8h4BpNuQnwxOn5AxdQgTI1KK0EbW7ghx8tMtxKLSb0XkvrRZbTo4T//cy Q4bT8fRfqLoR60Z+BsSf163yF/PY5nEB/F0eVtOLc0dgKfBAyPd9JWUPOrICiRMziBKv MjHdpVHpMsCw28WqTmP8BydqoBMzfnJOEEsSu4qvy/2D5Zz16kZcB7G6EBIj5AAU/3J0 iMqQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:cc:reply-to:from :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:to:message-id:references:mime-version :in-reply-to:date:delivered-to; bh=hEhDC3XLg8omChZ2bp2ojy/FS51aL4WfgrIlTmHg6Bg=; fh=eZJQwGgFNmhG1aNRPvwNmWJ7Br90d3O+ZTyD+wYtFmA=; b=OxlSwnX4xx49rcOnnESuuFPPcCKnwE5OLTzGMd/VxTA1YTWqxnU+C5cdqRNyRp+ngf zFD0MwCTltBrqG30htpnzxV7GZ5WqsB3RrPLCguCMfJWJ4aAUTHwzaAMtoolccghO0fK eYmPIIMMmPGiiexJMSTHl4T/h6w0lJv48ohiaJCHt6ZW2ZWYizSliV2w9cyrnuWFGxru wtDbLnZP01DH5ZJhf0Dr1w8OpIApccCGvoqGcsiwVJLrwJdXwc7hOJKNY3zXq5XEP3O+ fOTrFdw2qBxt7FKUWRkB6kYpNvdRhcwUq9SaG9CLhOR2cD9TqsX3RdjR4BpVR8S/7lg7 6DYA==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) smtp.mailfrom=ffmpeg-devel-bounces@ffmpeg.org Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id oz11-20020a170906cd0b00b00a4737a8d237si13974ejb.429.2024.03.22.10.01.54; Fri, 22 Mar 2024 10:01:55 -0700 (PDT) Received-SPF: pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) client-ip=79.124.17.100; Authentication-Results: mx.google.com; spf=pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) smtp.mailfrom=ffmpeg-devel-bounces@ffmpeg.org Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 9E07C68D5B6; Fri, 22 Mar 2024 19:01:26 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-yw1-f201.google.com (mail-yw1-f201.google.com [209.85.128.201]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 6346F68D583 for ; Fri, 22 Mar 2024 19:01:20 +0200 (EET) Received: by mail-yw1-f201.google.com with SMTP id 00721157ae682-60a03635590so46785767b3.0 for ; Fri, 22 Mar 2024 10:01:20 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1711126879; x=1711731679; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=D0q+k+pGLdrQOIpZN7DAdogbdscKqBi42Dwt+mUlQoc=; b=H3ffIoGInO/f3OT7qtZOswLDugmOJxvEcM4NOnOg3+EvqU26GLTfC99Bv9sWnhwyYx x18LF2ckedZdNvHWW5rge8KpI73EMCZ2NkJ46XzlEfHXRGEeAdIfPsLwroeaKb3PEgb+ sn3P7qMDHGdH8C6NxPT0xK7zj6SB6rzz1b/6KIxAgOZx/qDsD/vqmhNA8jUjG9KchK0K LoCbS+QPPhxqLykgHV4mgVCM0RsdZ/xI9dpfXrKJhtk/EqzAFwbFdosOvZ9JSI+M7n0v 7vfO3kFc74hzb1ckOOo/LxH3fHLsgwUl+wpz442ciWg0XWW3I0DJ/4lCPZyB6A58ocPm ncVA== X-Gm-Message-State: AOJu0YwEn8d9Nlo+1arzxLquRZGpTrHI8vIgQBs+DvSiljYdUfQeYqhM vZGubYJgL8Vbj+itpFHJW2HcYMuQOhBS0tFJvYkVePkP1glAlV9Soba5ECL4BFoYgJEPaYxdspr 1g5JoOwf5O8A37qDYnqy6fffmeaJyW16iB9ApfM+jqwqslqK6ZgQjoHUELdzRn2YlaUTAb/BWz4 TUdIrKnAkMUwH2uELZQ3nxxfZ4AIqja+Zzt87bL+l4YaFh X-Received: from asoulier-us.c.googlers.com ([fda3:e722:ac3:cc00:20:ed76:c0a8:f79]) (user=asoulier job=sendgmr) by 2002:a0d:ea8a:0:b0:60c:c36d:1ea3 with SMTP id t132-20020a0dea8a000000b0060cc36d1ea3mr39558ywe.3.1711126879104; Fri, 22 Mar 2024 10:01:19 -0700 (PDT) Date: Fri, 22 Mar 2024 17:01:03 +0000 In-Reply-To: <20240322170106.2243608-1-asoulier@google.com> Mime-Version: 1.0 References: <20240322170106.2243608-1-asoulier@google.com> X-Mailer: git-send-email 2.44.0.396.g6e790dbe36-goog Message-ID: <20240322170106.2243608-4-asoulier@google.com> To: ffmpeg-devel@ffmpeg.org Subject: [FFmpeg-devel] [PATCH 4/6] doc: Add LC3/LC3plus muxer and encoder parameters documentation X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: FFmpeg development discussions and patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Antoine Soulier via ffmpeg-devel From: Antoine Soulier Reply-To: FFmpeg development discussions and patches Cc: Antoine Soulier Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: JH/ycguffc7Y Signed-off-by: Antoine Soulier Signed-off-by: Antoine SOULIER --- doc/encoders.texi | 57 +++++++++++++++++++++++++++++++++++++++ doc/general_contents.texi | 12 ++++++++- doc/muxers.texi | 4 +++ 3 files changed, 72 insertions(+), 1 deletion(-) diff --git a/doc/encoders.texi b/doc/encoders.texi index 7c223ed74c..0719ba13cc 100644 --- a/doc/encoders.texi +++ b/doc/encoders.texi @@ -814,6 +814,63 @@ ffmpeg -i input.wav -c:a libfdk_aac -profile:a aac_he -b:a 64k output.m4a @end example @end itemize +@anchor{liblc3-enc} +@section liblc3 + +liblc3 LC3 (Low Complexity Communication Codec) encoder wrapper. + +Requires the presence of the liblc3 headers and library during configuration. +You need to explicitly configure the build with @code{--enable-liblc3}. + +This encoder has support for the Bluetooth SIG LC3 codec for the LE Audio +protocol, and the following features of LC3plus: +@itemize @minus +@item +Frame duration of 2.5 and 5ms. +@item +High-Resolution mode, 48 KHz, and 96 kHz sampling rates. +@end itemize + +For more information see the liblc3 project at +@url{https://github.com/google/liblc3}. + +@subsection Options + +The following options are mapped on the shared FFmpeg codec options. + +@table @option +@item b +Set the bit rate in bits/s. This will determine the fixed size of the encoded +frames, for a selected frame duration. + +@item ar +Set the audio sampling rate (in Hz). + +@item channels +Set the number of audio channels. + +@item frame_duration +Set the audio frame duration in milliseconds. Default value is 10ms. +Allowed frame durations are 2.5ms, 5ms, 7.5ms and 10ms. +LC3 (Bluetooth LE Audio), allows 7.5ms and 10ms; and LC3plus 2.5ms, 5ms +and 10ms. + +The 10ms frame duration is available in LC3 and LC3 plus standard. +In this mode, the produced bitstream can be referenced either as LC3 or LC3plus. + +@item high_resolution +Enable the high-resolution mode if set to 1. The high-resolution mode is +available with all LC3plus frame durations and for a sampling rate 48 KHz, +and 96 KHz. + +The encoder automatically turns off this mode at lower sampling rates and +activates it at 96 KHz. + +This mode should be preferred at high bitrates. In this mode, the audio +bandwidth is always up to the Nyquist frequency, compared to LC3 at 48 KHz, +which limits the bandwidth to 20 KHz. +@end table + @anchor{libmp3lame} @section libmp3lame diff --git a/doc/general_contents.texi b/doc/general_contents.texi index f269cbd1a9..9e340fce7b 100644 --- a/doc/general_contents.texi +++ b/doc/general_contents.texi @@ -237,6 +237,14 @@ Go to @url{http://sourceforge.net/projects/opencore-amr/} and follow the instructions for installing the library. Then pass @code{--enable-libfdk-aac} to configure to enable it. +@subsection LC3 library + +FFmpeg can make use of the Google LC3 library for LC3 decoding & encoding. + +Go to @url{https://github.com/google/liblc3/} and follow the instructions for +installing the library. +Then pass @code{--enable-liblc3} to configure to enable it. + @section OpenH264 FFmpeg can make use of the OpenH264 library for H.264 decoding and encoding. @@ -1300,7 +1308,9 @@ following image formats are supported: @tab encoding and decoding supported through external library libilbc @item IMC (Intel Music Coder) @tab @tab X @item Interplay ACM @tab @tab X -@item MACE (Macintosh Audio Compression/Expansion) 3:1 @tab @tab X +@item LC3 @tab E @tab E + @tab supported through external library liblc3 +@item LC3plus @tab E @tab E @item MACE (Macintosh Audio Compression/Expansion) 6:1 @tab @tab X @item Marian's A-pac audio @tab @tab X @item MI-SC4 (Micronas SC-4 Audio) @tab @tab X diff --git a/doc/muxers.texi b/doc/muxers.texi index d9dd72e613..43dabe4499 100644 --- a/doc/muxers.texi +++ b/doc/muxers.texi @@ -132,6 +132,10 @@ to Annex B syntax if it's in length-prefixed mode. ITU-T H.265 / MPEG-H Part 2 HEVC video. Bitstream shall be converted to Annex B syntax if it's in length-prefixed mode. +@item lc3 @emph{audio} (lc3) +Bluetooth SIG Low Complexity Communication Codec audio. +ETSI TS 103 634 Low Complexity Communication Codec plus (LC3plus). + @item m4v @emph{video} MPEG-4 Part 2 video