On this page
DocsGuides
Loudness
Bring the sound to a target loudness in LUFS with EBU R128, keeping the picture as it is.
audio.normalize brings the sound to a target loudness with the EBU R128 filter, so every video in
a feed or episode of a podcast plays at the same volume.
The request#
true is -16 LUFS with peaks under -1.5 dBTP. The picture is copied, so only the sound is
re-encoded.
curl "$VIDEXO_API_URL/v1/transcode" \
-H "Authorization: Bearer $VIDEXO_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"input": "https://example.com/talk.mp4",
"filename": "talk-normal.mp4",
"video": {
"codec": "copy"
},
"audio": {
"normalize": true,
"bitrate": "192k"
}
}'Copy failed. The text is selected; copy it with your keyboard.
const response = await fetch(`${process.env.VIDEXO_API_URL}/v1/transcode`, {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.VIDEXO_API_KEY}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({
"input": "https://example.com/talk.mp4",
"filename": "talk-normal.mp4",
"video": {
"codec": "copy"
},
"audio": {
"normalize": true,
"bitrate": "192k"
}
}),
});
const job = await response.json();Copy failed. The text is selected; copy it with your keyboard.
ffmpeg \
-i https://example.com/talk.mp4 \
-map 0:v:0 \
-c:v copy \
-map "0:a:0?" \
-af loudnorm=I=-16:LRA=11:TP=-1.5 \
-c:a aac -b:a 192k -movflags +faststart \
talk-normal.mp4Copy failed. The text is selected; copy it with your keyboard.
talk-normal.mp4: the same picture, the sound at -16 LUFS with peaks under -1.5 dBTP.
Your own target#
curl "$VIDEXO_API_URL/v1/transcode" \
-H "Authorization: Bearer $VIDEXO_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"input": "https://example.com/talk.mp4",
"filename": "talk-broadcast.mp4",
"video": {
"codec": "copy"
},
"audio": {
"normalize": {
"loudness": -23,
"true_peak": -1,
"range": 7
}
}
}'Copy failed. The text is selected; copy it with your keyboard.
const response = await fetch(`${process.env.VIDEXO_API_URL}/v1/transcode`, {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.VIDEXO_API_KEY}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({
"input": "https://example.com/talk.mp4",
"filename": "talk-broadcast.mp4",
"video": {
"codec": "copy"
},
"audio": {
"normalize": {
"loudness": -23,
"true_peak": -1,
"range": 7
}
}
}),
});
const job = await response.json();Copy failed. The text is selected; copy it with your keyboard.
ffmpeg \
-i https://example.com/talk.mp4 \
-map 0:v:0 \
-c:v copy \
-map "0:a:0?" \
-af loudnorm=I=-23:LRA=7:TP=-1 \
-c:a aac -b:a 128k -movflags +faststart \
talk-broadcast.mp4Copy failed. The text is selected; copy it with your keyboard.
A podcast file#
The podcast-audio preset writes an MP3 at 128k, 44.1 kHz stereo, normalised to -16 LUFS.
curl "$VIDEXO_API_URL/v1/audio" \
-H "Authorization: Bearer $VIDEXO_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"input": "https://example.com/talk.mp4",
"preset": "podcast-audio"
}'Copy failed. The text is selected; copy it with your keyboard.
const response = await fetch(`${process.env.VIDEXO_API_URL}/v1/audio`, {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.VIDEXO_API_KEY}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({
"input": "https://example.com/talk.mp4",
"preset": "podcast-audio"
}),
});
const job = await response.json();Copy failed. The text is selected; copy it with your keyboard.
ffmpeg \
-i https://example.com/talk.mp4 \
-vn \
-map 0:a:0 \
-af loudnorm=I=-16:LRA=11:TP=-1.5 \
-c:a libmp3lame -b:a 128k -ar 44100 -ac 2 \
audio.mp3Copy failed. The text is selected; copy it with your keyboard.
Normalising needs an audio track: a silent input fails the job with processing_failed.