| rms_curve | R Documentation |
Runs one ffmpeg astats pass over file and returns the RMS level
of each fixed-size window. Quieter windows (more-negative dB) mark pauses, so
the curve is a cheap way to find good places to cut. About 140x realtime.
rms_curve(file, window = 1024L)
file |
Path to an audio (or audio-bearing video) file. |
window |
Window size in samples (default 1024; ~64ms at 16kHz). Smaller windows give finer time resolution at more rows. |
A list with numeric time (window centre, seconds) and
rms (RMS level in dB; digital silence is -120). Empty vectors if the
pass ran but produced no metadata. Errors if ffmpeg itself fails.
## Not run:
cur <- rms_curve("speech.mp3")
plot(cur$time, cur$rms, type = "l") # dips are pauses
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.