How to normalize audio in a bunch of videos

I have some experience in audio processing, not professionally, but as a hobby. However, I always approach this topic with full responsibility. Currently, I am learning the German language, and one of the programs I use includes short video recordings with correct pronunciation of words and phrases by native speakers. I noticed that these videos have a significant difference in volume. With my experience in sound engineering and knowledge of audio standards and how sound is perceived by humans, I decided to find an effective solution to this issue. Now, I am sharing my experience with the community in the hope that it will be useful to someone.

After conducting some research, I came across the FFmpeg library, which offers capabilities for video file processing. On the library's website, I found an article explaining how audio can be processed automatically without affecting the video stream. To achieve this, they recommend using the open-source Python program called "ffmpeg-normalization".

Disclaimer: I am not affiliated with the development team of this software.

This program utilizes the EBU R128 standard, which is widely recognized for its effectiveness in achieving balanced and consistent audio levels across various media platforms.

The EBU R128 standard, established by the European Broadcasting Union, aims to ensure consistent and balanced loudness levels in audio content. It utilizes Loudness Units Full Scale (LUFS) to measure audio volume, providing a more accurate and perceptually balanced loudness perception. LUFS provides a standardized way of measuring and comparing audio loudness levels, taking into account the characteristics of human hearing. In accordance with the EBU R128 standard, the accepted loudness level is "-23 LUFS".

Steps to solve the issue

1. Install a recent version of ffmpeg (https://ffmpeg.org/download.html)
2. Install Python (https://www.python.org/downloads/)
3. Install ffmpeg-normalize using Python, to do this - run in the command line:
    `pip3 install ffmpeg-normalize`
4. Process normalization over the video files.

Process normalization over the video files

For example, process only one file:

ffmpeg-normalize input.mp4 --audio-codec aac --output output.mp4
or shorter version:
ffmpeg-normalize input.mp4 -c:a aac -o output.mp4

 Option "--audio-codec aac" is mandatory to process the mp4 files.

This command will process input.mp4 file, normalizing the audio track according to the EBU R128 standard, and write the result to the output.mp4 file. The software processes audio only, leaving the video unchanged.

If you want, you can specify the output audio bitrate using the option "--audio-bitrate" or shorter: "-b:a":

ffmpeg-normalize input.mp4 -c:a aac -b:a 192k -o output.mp4

To process a bunch of files, you can use any solution. I am providing you with an example of how to do it using the Windows command line:

for %i in (path_to_the_files\*.mp4) do ffmpeg-normalize "%i" -c:a aac -o %~dpi..\normalized\%~nxi
where:

  • %~dpi - is a programmatically taken path to the current file
  • %~nxi - is a programmatically taken current file name without path

For example, all files are in a directory:

D:\videos\

run:

for %i in (D:\videos\*.mp4) do ffmpeg-normalize "%i" -c:a aac -o %~dpi..\normalized\%~nxi

so all the videos will be processed and the result will be placed in the directory:

D:\videos\..\normalized\
which also means:
D:\normalized\

Links

Setting up mcedit as the default text editor

Open file in edit mode:


$  mcedit ~/.bash_profile

Add line:


. . .
export VISUAL="mcedit"

Reload profile settings:


$  . ~/.bash_profile

Как в Firefox настроить "Открыть новую вкладку вслед за текущей"?

В поле ввода адреса вводим: about:config, чтобы войти в расширенный режим настроек

В поиске вводим: insertAfterCurrent

Меняем значение на: true

Розмір кристалу світлодіоду в mil

Розмір кристалів світлодіодів вимірюється у mil'ах, тобто у тисячних долях дюйму.

Один mil - це 0,0254мм

Типовий розмір кристалу - 30*30mil та 45*45mil, або 0,762*0,762мм та 1,143*1,143мм

Відповідність розміру та потужності:

  • 1W — 45*45mil;
  • 1W — 30*30mil;
  • 0,75W — 24*40mil;
  • 0,5W — 24*24mil.
Параметр Китайский 2835 2835 0,2W 2835 0,5W 2835 1W
Світловий потік, лм 8 20 50 100
Потужність 0,09 вт 0,2 вт 0,5 вт 1 вт
Температура +60 +80 +80 +110
Струм, ампер 25 мА 60 мА 150 мА 300 мА
Напруга, Вольт 3,2 3,2 3,2 3,2
Габарити, мм 2,8мм на 3,5мм

Блокінг-генератор високої змінної напруги

Як перетворити постійний струм в змінний,
або як зробити найпростіший інвертор


Даний генератор можна виготовити із трансформатора від зарядки для телефону.

У трансформатора є три обмотки: дві з невеликим опором та одна – побільше. Та що більше – буде вихідною.

Важливо визначити фазування (напрямок) первинних обмоток. Як це зробити – читайте в іншій статті. Або методом "тику" - при неправильному підключенні схема просто не запрацює.

Транзистор можна взяти практично будь-який, але для деяких трансформаторів генерація не запускається з деякими транзисторами, тому якщо на виході немає напруги – спробуйте інший транзистор (іншу модель). Важливо, щоб транзистор був досить великої потужності, оскільки він дуже гріється, бажано використовувати радіатор.

На виході виходить близько 40-60В високочастотної змінної напруги, можна підключити неонову лампочку або використовувати для запалювання спалаху від фотоапарата (про це читайте в іншій статті).


Як визначити напрямок обмоток трансформатора.

Для фазування обмоток можна використовувати стрілочний вольтметр постійного струму та батарейку (хімічний елемент живлення), включені за наведеною схемою.

Діапазон вимірюваної напруги вольтметра потрібно підібрати так, щоб було добре помітно рух стрілки. Починати краще з більшого діапазону.

Якщо при замиканні вимикача, стрілка вольтметра відхилилася в прямому напрямку, то за початок обмоток, що фазуються, потрібно прийняти «+» (плюс) батарейки та «+» вольтметра.

Якщо стрілка відхилилася у зворотному напрямку, обмотки підключені у протифазі відносно «+» батарейки та «+» вольтметра.

Потрібно мати на увазі, що при замиканні вимикача, стрілка вольтметра відхилятиметься в одну сторону, а при розмиканні в протилежну, через ЕРС самоіндукції, що виникла. Орієнтуватися потрібно за відхиленням стрілки саме в момент включення вимикача.

При використанні осцилографа:

  • фазування обмоток однакове, коли перший імпульс - позитивний
  • фазування протилежне, коли перший імпульс - негативний
Напрям обмоток співпадає
Напрям обмоток протилежний

Акумулятор MS614SE

Літій-іонний (Li-ion, літій-марганець-кремній (LiMnSi)) акумулятор у вигляді маленької таблетки. Можна сплутати зі звичайною батарейкою, але це все-таки акумулятор, що перезаряджається. Використовується в різній електроніці, наприклад, усередині цифрового фотоапарата для підтримки роботи годинника. З обох боків проштамповані "клеми" для паяння, тому маркування не завжди видно повністю, так, наприклад, може бути видно тільки: S614S, S614SE, MS614, MS614SE, S614SF.

Ємність: 3,4 мАч

Номінальна напруга: 3,1 В

Напруга заряджання: 3,3 В

Розміри: 1.5 x 6,8 мм.

Desperate Housewives Susan's Art s05 e16

Desperate Housewives Susan's Art s05 e16