Opened 18 months ago

Last modified 17 months ago

#11528 new defect

Intermittent sound loss playing DSD (".dsf") in FFplay and harmonoid

Reported by: bleak8197 Owned by:
Priority: important Component: avcodec
Version: git-master Keywords: dsd dsf
Cc: bleak8197, MasterQuestionable Blocked By:
Blocking: Reproduced by developer: yes
Analyzed by developer: no

Description (last modified by bleak8197)

Operating system and version: Windows 11 Pro x64 24H2 3rd batch update

How to reproduce:

% ffplay *.dsf
ffmpeg version: BtbN Latest Auto-Build (2025-03-24 13:01) --> ffmpeg-master-latest-win64-gpl-shared

(Pop) [LP] [DSD 5.6 MHz] Ed Sheeran - = (Equals) - 2021, DSD 5.6 MHz (image+.cue)
Name of the index:
Ed Sheeran - = (Equals) (2021)
Name of the file:
ed_sheeran-equals_0190296657061_side_A.dsf
and _B.dsf

Intermittent sound with ffplay command:
https://drive.google.com/file/d/1k_mwSBRshf1VxqcEJUpIS1gBIui8UsKJ/view?usp=sharing
mkv screen recording media infos:
image stream: AVS
Image resolution: 1920x1080p 60FPS
Audio stream: 48kHz 2 channel stereo AAC LC

I downloaded yuri_korzunov-through-moon_ring-128fs.dsf and the same problem persists.

This file also has a scratchy and rustling sound in audacious.
audacity won't import, “Failed to open file. File type is invalid.” and ”Audacity failed to recognize file type ....... Try installing FFmpeg. For uncompressed files, try File > Import > Raw Data.”
I selected raw data because it couldn't import. I clicked OK. I checked the options, no DSD. I clicked Detect and it detected Unsigned 8-bit PCM, 44.1kHz. I clicked OK. Imported it. Played it. It's scratchy and raspy.
DeaDBeaF can't play it at all, it gives an error.

I installed ffmpeg as in this video but it was already installed. because the ffplay command worked in my 2 previous attempts. i installed it anyway. tried again.
same error again.

Here's the real problem:

It loops by doing pause and play. works like pause-play-pause-play-pause-play...... But it doesn't pause and play. It just pauses as if it is in a pause play loop and the sound is intermittent.
I wanted to listen to the Ed Sheeran Equals 2021 album. I played it. It worked. A dsf file is ~2GB, B dsf file is ~1.9GB.
(Pop) [LP] [DSD 5.6 MHz] Ed Sheeran - = (Equals) - 2021, DSD 5.6 MHz (image+.cue)
Name of the index:
Ed Sheeran - = (Equals) (2021)
Name of the file:
ed_sheeran-equals_0190296657061_side_A.dsf

Screencast of a player that works like a pause-play loop, but doesn't pause, plays at 0.5x speed even though it runs at 1x speed:
[​https://drive.google.com/file/d/1orqugwxR45dse5t_1xTtyVaSOblnqcY8/view?usp=sharing]

I have a similar problem with ffmpeg's ffplay.exe.
But the pause-play cycle is faster.
Intermittent sound with ffplay command:
[​https://drive.google.com/file/d/1k_mwSBRshf1VxqcEJUpIS1gBIui8UsKJ/view?usp=sharing]

I downloaded yuri_korzunov-through-moon_ring-128fs.dsf from ​https://samplerateconverter.com/free-audio-downloads and the same problem persists.

This file also has a scratchy and rustling sound in audacious.
audacity won't import, “Failed to open file. File type is invalid.” and ”Audacity failed to recognize file type ....... Try installing FFmpeg. For uncompressed files, try File > Import > Raw Data.”
I selected raw data because it couldn't import. I clicked OK. I checked the options, no DSD. I clicked Detect and it detected Unsigned 8-bit PCM, 44.1kHz. I clicked OK. Imported it. Played it. It's scratchy and raspy.
DeaDBeaF can't play it at all, it gives an error.
foobar2000, MPC-HC plays fine.
This also applies to ed sheeran dsf

I also added my music folder by going to Settings > Add New Folder. It doesn't see the .dsf files and .cue file inside the Ed Sheeran - = (Equals) (2021) folder. It does not add it to albums.

To run .dsf files, right click on the file > open with > choose another application > choose an application on your computer > C:\Users*\AppData\Local\Programs\Harmonoid > harmonoid.exe > OK
and you can play it.

This intermittent playback problem occurs in harmonoid and ffplay.exe.

It does not happen with foobar2000, MPC-HC, MPC-BE, haruna (kde's software), VuPlayer, mpv, Hi-Res Audio Player (Sony's software).

Windows Media Player legacy, New Media Player(Windows's), VLC, Elisa (kde's software), Clementine, DeadBeef don't play.

audacious in WSL Almalinux doesn't play.

audacious in Windows plays scratchy and wheezy, not intermittent.

strawberry in WSL Almalinux plays.

Change History (13)

comment:2 by bleak8197, 18 months ago

Description: modified (diff)

comment:3 by MasterQuestionable, 18 months ago

Cc: MasterQuestionable added
Component: ffplayavcodec
Keywords: dsd added; DSD removed

͏    Well... seems scarcely used niche format:
͏    https://www.google.com/search?hl=en&gl=ca&num=10&q=Direct+Stream+Digital

͏    Potential sources:
͏    https://github.com/FFmpeg/FFmpeg/blob/master/libavcodec/dsddec.c
͏    https://github.com/FFmpeg/FFmpeg/blob/master/libavformat/dsfdec.c

͏    Is it working in certain old versions?

comment:4 by cgbug, 18 months ago

It is not a problem with FFmpeg decoding, as MPC-HC also uses FFmpeg.

The cause is the audio renderers of those players not supporting high samplerate audio.

MPC-HC internal renderer has automatic resampling ability.

comment:5 by bleak8197, 18 months ago

I have this problem on lenovo laptop. audio codec is Realtek® ALC257. It supports 24 bit 96kHz stereo.

Also ffplay.exe is problematic. If you watch the first video ffplay also hangs when playing.

The problem also happened on my desktop pc gigabyte z170 motherboard. Then I changed the setting to 24bit 196kHz and it was fixed. The audio microchip on the motherboard is Realtek® ALC887 codec. it supports stereo, 4, 5.1 and 7.1-channel. It supports 24bit 196kHz studio sound.

The laptop has no problems with drivers etc. I also tested with the drivers that windows auto-installs. the problem persists. i also tested with the drivers i downloaded from lenovo's support website. the problem persists.

I installed audacious on WSL almalinux, it doesn't support DSD.
Audacious on Windows 11 does support it with ffmpeg, but it makes a scratchy, rustling sound.

I can't figure out what is causing this problem. Is it the audio microchip (codec) that doesn't support it?

Correction: I misspelled the title and confused it with Audacious's problem.

The problem with FFMpeg and ffplay is not sizzle. It hangs like in a loop like play-pause. The sound is intermittent.

I didn't know how to change the title.

Last edited 18 months ago by bleak8197 (previous) (diff)

comment:6 by bleak8197, 18 months ago

The title should be:

The sound is intermittent, as if in a pause-play loop. Problem playing DSD (.dsf) files with ffplay.exe.

comment:7 by bleak8197, 18 months ago

This sounds similar to the problem I had with harmonoid:

https://github.com/harmonoid/harmonoid/issues/502

comment:8 by bleak8197, 18 months ago

.

Last edited 17 months ago by bleak8197 (previous) (diff)

comment:9 by MasterQuestionable, 18 months ago

Analyzed by developer: set
Reproduced by developer: unset
Summary: High sizzle problem when playing 5.6MHz DSD (.dsf) audio fileIntermittent sound loss playing DSD (".dsf") in FFplay

͏    I guess for most systems the DSD would be first converted to PCM..?
͏    Is the conversion working normally for FF-* tools?

͏    ----

͏    @bleak8197,
͏    Actually you may edit comment:1 and make use of that instead.
͏    E.g. https://trac.ffmpeg.org/ticket/10920

Last edited 17 months ago by MasterQuestionable (previous) (diff)

comment:10 by bleak8197, 18 months ago

Analyzed by developer: unset
Reproduced by developer: set
Summary: Intermittent sound loss playing DSD (".dsf") in FFplayHigh sizzle problem when playing 5.6MHz DSD (.dsf) audio file

..

Last edited 18 months ago by bleak8197 (previous) (diff)

comment:11 by bleak8197, 18 months ago

I'm sorry. You corrected the title, but I messed it up by mistake.
I don't know how I did it. I didn't understand how the site works. I'm very, very sorry.

comment:12 by bleak8197, 18 months ago

Description: modified (diff)
Summary: High sizzle problem when playing 5.6MHz DSD (.dsf) audio fileIntermittent sound loss playing DSD (".dsf") in FFplay and harmonoid

comment:13 by bleak8197, 18 months ago

Description: modified (diff)

.

Last edited 17 months ago by bleak8197 (previous) (diff)
Note: See TracTickets for help on using tickets.