The officially official Devuan Forum!

You are not logged in.

#1 2025-10-23 00:02:12

igorzwx
Member
Registered: 2024-05-06
Posts: 342  

How to debug crappy resamplers of Chromium and Brave

Media: View and debug media players information
_https://developer.chrome.com/docs/devtools/media-panel
Chromium: chrome://media-internals
Brave: brave://media-internals

Brave is a great browser. It has a resampler inside, a sort of low quality linear interpolation, perhaps, because it is faster than "medium crap".

The brave://media-internals page is an official debugging tool

    1. Open a new tab and navigate to brave://media-internals
    2. Start playing an audio or video source in another tab.
    3. Go back to media-internals and click on the player entry for your media.
    4. Examine the kAudioTracks, etc.

NOTE: In YouTube and RuTube, "Hi-Res Music" means a sort of low quality mp3 (e.g., mp4a.40.2).

Reference media files:

Hi-Res Music 32 Bit - Greatest Audiophile Collection - Natural Beat Records
_https://rutube.ru/video/b54c962301787eb1f2758ac8ba97f5bf/

Best Audiophile Vocal 24 bit - Hi-Res Music 2025 - Audiophile Voices
_https://www.youtube.com/watch?v=uO6jfQ5tQHM
_https://youtu.be/uO6jfQ5tQHM

$ youtube-dl -F "https://youtu.be/uO6jfQ5tQHM" | grep "audio only"
249          webm       audio only audio_quality_low   54k , webm_dash container, opus  (48000Hz), 30.39MiB
250          webm       audio only audio_quality_low   71k , webm_dash container, opus  (48000Hz), 39.87MiB
140          m4a        audio only audio_quality_medium  129k , m4a_dash container, mp4a.40.2 (44100Hz), 72.39MiB
251          webm       audio only audio_quality_medium  137k , webm_dash container, opus  (48000Hz), 76.97MiB

RuTube: Hi-Res Music 32 Bit - Greatest Audiophile Collection - Natural Beat Records

brave://media-internals
kFrameTitle			"Hi-Res Music 32 Bit - Greatest Audiophile Collection - Natural Beat Records"
kFrameUrl			"https://rutube.ru/video/b54c962301787eb1f2758ac8ba97f5bf/"
kAudioTracks
[
  {
    "bytes per channel": 2,
    "bytes per frame": 4,
    "channel layout": "STEREO",
    "channels": 2,
    "codec": "aac",
    "codec delay": 0,
    "discard decoder delay": false,
    "encryption scheme": "Unencrypted",
    "has extra data": true,
    "profile": "unknown",
    "sample format": "Signed 16-bit",
    "samples per second": 44100,
    "seek preroll": "0us"
  }
]
"Selected FFmpegAudioDecoder for audio decoding, config: codec: aac, profile: unknown, bytes_per_channel: 2, channel_layout: STEREO, channels: 2, samples_per_second: 44100, sample_format: Signed 16-bit, bytes_per_frame: 4, seek_preroll: 0us, codec_delay: 0, has extra data: true, encryption scheme: Unencrypted, discard decoder delay: false, target_output_channel_layout: STEREO, target_output_sample_format: Unknown sample format"

[ALSA] Brave is upsampling (44100 → 48000 Hz) this particular "Hi-Res Music" of RuTube.

$ brave-browser-stable 2>&1 --audio-buffer-size=8192 rutube.ru/video/b54c962301787eb1f2758ac8ba97f5bf
Input:  48000 Hz, 2 ch, 's16_le' (0x2): dummy = 0, period = 1920
Output: 48000 Hz, 2 ch, 's16_le' (0x2): dummy = 0, period = 1920
Rates:  48000 --> 48000 (J: 0.00%, T: None, W: Planar)
Ok.

[apulse] Brave is not resampling (44100 → 44100 Hz) this particular "Hi-Res Music" of RuTube.

$ apulse brave-browser-stable 2>&1 rutube.ru/video/b54c962301787eb1f2758ac8ba97f5bf
Input:  44100 Hz, 2 ch, 's32_le' (0xa): dummy = 0, period = 1764
Output: 48000 Hz, 2 ch, 's16_le' (0x2): dummy = 0, period = 1920
Rates:  44100 --> 48000 (J: 0.00%, T: FFT, W: Vorbis)
Ok.

YouTube: Best Audiophile Vocal 24 bit - Hi-Res Music 2025 - Audiophile Voices

brave://media-internals
kFrameTitle		"YouTube"
kFrameUrl		"https://www.youtube.com/watch?v=uO6jfQ5tQHM"
kAudioDecoderName	"FFmpegAudioDecoder"
kAudioTracks	
[
  {
    "bytes per channel": 4,
    "bytes per frame": 8,
    "channel layout": "STEREO",
    "channels": 2,
    "codec": "opus",
    "codec delay": 312,
    "discard decoder delay": true,
    "encryption scheme": "Unencrypted",
    "has extra data": true,
    "profile": "unknown",
    "sample format": "Float 32-bit",
    "samples per second": 48000,
    "seek preroll": "80000us"
  }
]
"Selected FFmpegAudioDecoder for audio decoding, config: codec: opus, profile: unknown, bytes_per_channel: 4, channel_layout: STEREO, channels: 2, samples_per_second: 48000, sample_format: Float 32-bit, bytes_per_frame: 8, seek_preroll: 80000us, codec_delay: 312, has extra data: true, encryption scheme: Unencrypted, discard decoder delay: true, target_output_channel_layout: STEREO, target_output_sample_format: Unknown sample format"

[ALSA] Brave is not resampling (48000 → 48000 Hz) "Hi-Res Music" of YouTube.

$ brave-browser-stable 2>&1 --audio-buffer-size=8192 youtube.com/watch?v=uO6jfQ5tQHM
Input:  48000 Hz, 2 ch, 's16_le' (0x2): dummy = 0, period = 1920
Output: 48000 Hz, 2 ch, 's16_le' (0x2): dummy = 0, period = 1920
Rates:  48000 --> 48000 (J: 0.00%, T: None, W: Planar)
Ok.

[apulse] Brave is downsampling (48000 → 44100 Hz) "Hi-Res Music" of YouTube.

$ apulse brave-browser-stable 2>&1 youtube.com/watch?v=uO6jfQ5tQHM
Input:  44100 Hz, 2 ch, 's32_le' (0xa): dummy = 0, period = 1764
Output: 48000 Hz, 2 ch, 's16_le' (0x2): dummy = 0, period = 1920
Rates:  44100 --> 48000 (J: 0.00%, T: FFT, W: Vorbis)
Ok.
brave://media-internals
kFrameUrl		"https://www.youtube.com/watch?v=uO6jfQ5tQHM"
kFrameTitle		"Best Audiophile Vocal 24 bit - Hi-Res Music 2025 - Audiophile Voices - YouTube"
kAudioTracks	
[
  {
    "bytes per channel": 4,
    "bytes per frame": 8,
    "channel layout": "STEREO",
    "channels": 2,
    "codec": "opus",
    "codec delay": 312,
    "discard decoder delay": true,
    "encryption scheme": "Unencrypted",
    "has extra data": true,
    "profile": "unknown",
    "sample format": "Float 32-bit",
    "samples per second": 48000,
    "seek preroll": "80000us"
  }
]
"Selected FFmpegAudioDecoder for audio decoding, config: codec: opus, profile: unknown, bytes_per_channel: 4, channel_layout: STEREO, channels: 2, samples_per_second: 48000, sample_format: Float 32-bit, bytes_per_frame: 8, seek_preroll: 80000us, codec_delay: 312, has extra data: true, encryption scheme: Unencrypted, discard decoder delay: true, target_output_channel_layout: STEREO, target_output_sample_format: Unknown sample format"

CONCLUSION: Chromium developers are certainly deaf.

Last edited by igorzwx (2025-10-23 00:07:51)

Offline

Board footer