| ffm_loudnorm | R Documentation |
Add FFmpeg's loudnorm (EBU R128) audio filter. It normalizes the
input's perceived loudness toward a target integrated loudness, true-peak
ceiling and loudness range. The filter compiles to -af, or joins an
existing audio filter chain in the order the filters were added. The glossary
in vignette("tidymedia") explains media terms such as LUFS and true
peak.
ffm_loudnorm(
object,
target_loudness = -23,
true_peak = -1,
loudness_range = 7,
measured_i = NULL,
measured_tp = NULL,
measured_lra = NULL,
measured_thresh = NULL,
offset = NULL,
linear = FALSE,
print_format = NULL
)
object |
An FFmpeg pipeline ( |
target_loudness |
The target integrated loudness, in LUFS
(a number in |
true_peak |
The maximum true peak, in dBTP
(a number in |
loudness_range |
The target loudness range, in LU
(a number in |
measured_i, measured_tp, measured_lra, measured_thresh |
Measured input
values from an earlier |
offset |
The |
linear |
A logical. |
print_format |
The format of the measurement report for an analysis
pass: |
This is single-pass (dynamic) loudnorm. The pipeline stays one
reproducible command, with no measurement pass. The defaults follow EBU
Recommendation R 128 (2014): target_loudness = -23 LUFS and
true_peak = -1 dBTP. Loudness is measured per ITU-R BS.1770-4. The
default
loudness_range = 7 is FFmpeg's own loudnorm default. EBU
R128 does not prescribe a single value.
Two filters are added, not one. loudnorm is followed by
asetnsamples, which regroups the filtered audio into frames of 4096
samples and does not pad the last one. Dynamic loudnorm resamples to
192 kHz and gives frames of 192000 samples. Some encoders accept whatever
frame they are given, FLAC and Vorbis among them. Even those encoders refuse
to open at all on frames of 192000 samples.
object with an added instruction to normalize loudness.
EBU Recommendation R 128 (2014), Loudness normalisation and permitted maximum level of audio signals; ITU-R BS.1770-4. https://ffmpeg.org/ffmpeg-filters.html#loudnorm
normalize_audio(), the task function built on this filter.
Other pipeline functions:
ffm_batch(),
ffm_codec(),
ffm_compile(),
ffm_concat(),
ffm_copy(),
ffm_crop(),
ffm_drawbox(),
ffm_drop(),
ffm_files(),
ffm_fps(),
ffm_hstack(),
ffm_jobs(),
ffm_map(),
ffm_output_options(),
ffm_overlay(),
ffm_pixel_format(),
ffm_run(),
ffm_scale(),
ffm_seek(),
ffm_trim(),
ffm_vstack(),
print.tidymedia_ffm()
video <- system.file("extdata", "sample.mp4", package = "tidymedia")
ffm_files(video, "output.mp4") |>
ffm_loudnorm() |>
ffm_compile()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.