Aleksoid1978 / MPC-BE

MPC-BE – универсальный проигрыватель аудио и видеофайлов для операционной системы Windows.
GNU General Public License v3.0
2.32k stars 92 forks source link

[Feature] Option to exclude DRC audio from YouTube #412

Closed Comitant closed 7 months ago

Comitant commented 7 months ago

YouTube has new formats for DRC audio. Unfortunately, MPC-BE will randomly pick between DRC or no DRC.

Making an option to exclude it would be useful, because DRC (dynamic range compression) severely affects how the audio sounds. It is very bad for any kind of music, and drastically reduces the listening experience.

Example: YT audio format "251-drc" is for DRC, and "251" for no DRC.

Aleksoid1978 commented 7 months ago

As far as I could understand, YouTube does not provide any information regarding the DRC. How then can you distinguish ?

Comitant commented 7 months ago

Right clicking on a video and opening "stats for nerds" will show that you're being given DRC audio. In extreme cases it will show somewhere around 30db normalization.

You can only compare the difference by downloading the formats externally through yt-dlp.

Aleksoid1978 commented 7 months ago

There is no way to know that a particular audio stream is DRC. Well, it wouldn’t be bad to provide at least a couple of links from YouTube with DRC.

v0lt commented 7 months ago

Нашел легкую трешанину со звуком DRC https://www.youtube.com/watch?v=pNwBeKfGOzQ

Аудио потоки, которые видет yt-dlp:

233     mp4   audio only        |                    m3u8  | audio only           unknown             [en] Default
234     mp4   audio only        |                    m3u8  | audio only           unknown             [en] Default
249-drc webm  audio only      2 |     1.00MiB    50k https | audio only           opus        50k 48k [en] low, DRC, webm_dash
250-drc webm  audio only      2 |     1.33MiB    66k https | audio only           opus        66k 48k [en] low, DRC, webm_dash
139     m4a   audio only      2 |  1007.38KiB    49k https | audio only           mp4a.40.5   49k 22k [en] low, m4a_dash
249     webm  audio only      2 |  1021.06KiB    50k https | audio only           opus        50k 48k [en] low, webm_dash
250     webm  audio only      2 |     1.32MiB    66k https | audio only           opus        66k 48k [en] low, webm_dash
140-drc m4a   audio only      2 |     2.61MiB   130k https | audio only           mp4a.40.2  130k 44k [en] medium, DRC, m4a_dash
251-drc webm  audio only      2 |     2.63MiB   131k https | audio only           opus       131k 48k [en] medium, DRC, webm_dash
140     m4a   audio only      2 |     2.61MiB   130k https | audio only           mp4a.40.2  130k 44k [en] medium, m4a_dash
251     webm  audio only      2 |     2.62MiB   130k https | audio only           opus       130k 48k [en] medium, webm_dash

С нашим парсером нет звука на DASH форматах.

Aleksoid1978 commented 7 months ago

Нашел легкую трешанину со звуком DRC https://www.youtube.com/watch?v=pNwBeKfGOzQ

Аудио потоки, которые видет yt-dlp:

233     mp4   audio only        |                    m3u8  | audio only           unknown             [en] Default
234     mp4   audio only        |                    m3u8  | audio only           unknown             [en] Default
249-drc webm  audio only      2 |     1.00MiB    50k https | audio only           opus        50k 48k [en] low, DRC, webm_dash
250-drc webm  audio only      2 |     1.33MiB    66k https | audio only           opus        66k 48k [en] low, DRC, webm_dash
139     m4a   audio only      2 |  1007.38KiB    49k https | audio only           mp4a.40.5   49k 22k [en] low, m4a_dash
249     webm  audio only      2 |  1021.06KiB    50k https | audio only           opus        50k 48k [en] low, webm_dash
250     webm  audio only      2 |     1.32MiB    66k https | audio only           opus        66k 48k [en] low, webm_dash
140-drc m4a   audio only      2 |     2.61MiB   130k https | audio only           mp4a.40.2  130k 44k [en] medium, DRC, m4a_dash
251-drc webm  audio only      2 |     2.63MiB   131k https | audio only           opus       131k 48k [en] medium, DRC, webm_dash
140     m4a   audio only      2 |     2.61MiB   130k https | audio only           mp4a.40.2  130k 44k [en] medium, m4a_dash
251     webm  audio only      2 |     2.62MiB   130k https | audio only           opus       130k 48k [en] medium, webm_dash

С нашим парсером нет звука на DASH форматах.

У меня нет никакого DRC на этом ролике, видимо еще и от региона зависит )

Comitant commented 7 months ago

It's extremely rare for the player to pick the DRC track but I still decided to give it a mention. It seems to be more common with non-music videos, though. With that being said, I couldn't actually replicate what had happened before to give a solid example.

The normalization is particularly aggressive on content like quiet songs, ambience and asmr, such as these: https://www.youtube.com/watch?v=_8ZcmsgK2Y4 & https://www.youtube.com/watch?v=gcnLYrxLlhU

Aleksoid1978 commented 7 months ago

How do you determine that a track with DRC is being used? I understand that you are using the yt-dlp parser?

Aleksoid1978 commented 7 months ago

Done - ignoring DRC audio for yt-dlp.

Comitant commented 7 months ago

How do you determine that a track with DRC is being used? I understand that you are using the yt-dlp parser?

I can tell depending on if it is unusually loud at my normal listening volume, it also typically has amplified background static. I verify it by downloading both tracks with yt-dlp.

Done - ignoring DRC audio for yt-dlp.

Awesome, thanks!