The Marilyn Manson Wiki:Audio track probing guidelines
Contents
Audio track length[edit]
Different popular tools like players report different length for the same audio or video track if the track length is reported in seconds. Some of them round the track length to the lower bound, whilst the rest round the track length to the upped bound.
Source[edit]
Despite digital releases come in various formats, these all formats can be divided in two major categories: lossless and lossy. It is always preferred to probe the track length in loseless format. First, this is the format the digital release comes with on CDs or digital platforms. Second, lossy-encoded audio track may(Confirm) result in a track of different length depending on the codec used to encode the audio.
Loseless encoding is preferred.
Methods[edit]
Rounding length floor vs length ceil[edit]
If different tools report the track length differently reporting a delta of 1 s, it's recommended to round the length to the upper bound (ceil). The rule is that the track length must have enough time root for the last incomplete second.
For example, "Raise the Red Flag" single published on YouTube and YouTube music as of September 2024 report different track length:
- 4:49 (floor) - YouTube (web version), VLC Media Player
- 4:50 (ceil) - YouTube Music (web version)
Ceiling, as said above, can hold the last milliseconds of the track (regardless the first n milliseconds of the track is considered silence) and can fit only if there's the last second "room". In this case, 4:50 is better than 4:49.
Ceiling is preferred.
Exact track length[edit]
Digital releases have precise length for each track, usually in milliseconds. Audio or video players usually don't report the exact length to the user, but the exact length is reported by specialized tools like audio or video editors where a millisecond matters.
The swiss-knife of audio and video processing in the digital world is a command-line tool ffmpeg
and a few its companion tools like ffprobe
. The latter can probe a video or an audio file reporting as much meta information as possible. Both feature a rich set of options, but the track exact length in centiseconds can be identiffied using ffprobe
like this (assuming the tool is run in a terminal on Unix-like systems, or Windows command prompt):
$ ffprobe -hide_banner './Raise the Red Flag.flac' ... Duration: 00:04:49.49, start: 0.000000, bitrate: 3105 kb/s Stream #0:0: Audio: flac, 96000 Hz, stereo, s32 (24 bit) ...
Or shorter providing only the length of the media file:
$ ffprobe -hide_banner -i './Raise the Red Flag.flac' -show_entries format='duration' -v quiet -of csv='p=0' -sexagesimal 0:04:49.486521
The complete ffprobe
reference is available at https://ffmpeg.org/ffprobe.html
Length of a track having silence on both ends of the track[edit]
Some audio records, including digital, may have silence in the beginning of the audio track and/or in the ending of the track. This also affects the track length reported by variety of tools.
ffmpeg
can be used to detect silence with some threshold in dB. Assuming that -50 dB is the level that can be considered the "start" of silence, ffmpeg
can trim it at the beginning and at the ending of track:
$ ffmpeg -hide_banner -i './Raise the Red Flag.flac' -af silencedetect=n=-50dB:d=0.5 -f null - ... [silencedetect @ 0x5afbabbceb00] silence_start: 286.7010.00 bitrate=N/A speed= 0x [out#0/null @ 0x5afbabba3880] video:0kB audio:108557kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: unknown
frame= 1 fps=0.0 q=-0.0 Lsize=N/A time=00:04:49.44 bitrate=N/A speed= 824x
[silencedetect @ 0x5afbabbceb00] silence_end: 289.487 | silence_duration: 2.78578 ...
As seen in the output above, the official track length contains 2.79 s of about-silent noise in total resulting in 4:46.487 s of the track itself.
The complete reference for ffmpeg
is available at https://ffmpeg.org/ffmpeg.html
Summary[edit]
The actual length of "Raise the Red Flag" is:
- 04:50 (ceiled, as reported to the user)
- 04:49.49 (as reported with a specialized tool,
ffprobe
in this case) - 04:46.487 (the real track length with trimmed silence, reported by
ffmpeg
)
These length values are all indicated in the song infobox, Special:Permalink/126994.