Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DSD files not playing #152

Closed
wcasanova opened this issue May 7, 2019 · 17 comments
Closed

DSD files not playing #152

wcasanova opened this issue May 7, 2019 · 17 comments

Comments

@wcasanova
Copy link

Hi all,
great player, I can not play dsf-DSD files.
says "the audio file does not seem valid"

  • Archlinux
  • strawberry-full-git 0.5.5.r4.g89ff7d6-1
  • GStreamer versions
    gst-libav 1.16.0-1
    gst-plugins-bad 1.16.0-1
    gst-plugins-base 1.16.0-2
    gst-plugins-base-libs 1.16.0-2
    gst-plugins-good 1.16.0-1
    gst-plugins-ugly 1.16.0-1
    gstreamer 1.16.0-1
@digititus
Copy link

Similar issue. However, I have no error when playing files. They just don't play when I select play.

  • Fedora 30

  • gstreamer1-libav-1.16.0-1

  • gstreamer 1.16.0-1

  • gstreamer1-plugins-ugly-1.16.0-1

  • Strawberry 0.5.5-7-g2b9f153

@jonaski
Copy link
Member

jonaski commented May 8, 2019

@b1tl0rd
My understanding is that the file shows up in the playlist or collection, but still won't play?
That error message isn't created from strawberry, so my guess is it's from gstreamer itself.
Arch/AUR does not follow my recommendation to use the updated static taglib, so they use taglib 1.11.1 without DSF/DSD support, so I assume you compiled with source for the file to show up. Otherwise you would get the message "File filename is not recognized as a valid audio file".

@digititus @b1tl0rd
Try play the file on the command line to see if it's a gstreamer issue or not:
gst-launch-1.0 filesrc location=filename ! decodebin ! audioconvert ! alsasink
If that doesn't work it's most likely a gstreamer problem.
But if that works try running strawberry from the terminal to see if there is any log output on the terminal.
On Fedora you need to specifically enable the debug output, see https://brendanwhitfield.wordpress.com/2016/06/08/enabling-qdebug-on-fedora/

@wcasanova
Copy link
Author

wcasanova commented May 8, 2019

@jonaski
files dsf http://www.2l.no/hires/index.html
taglib 1.11.1-3 install official repository- https://www.archlinux.org/packages/extra/x86_64/taglib/
gst-launch-1.0 filesrc location=2L-106_mch_DSD-2822k_MAGNIFICAT_04.dsf ! decodebin ! audioconvert ! alsasink
Setting pipeline to PAUSED ...
Pipeline is PREROLLING ...
ERROR: from element /GstPipeline:pipeline0/GstAlsaSink:alsasink0: The stream is in the wrong format.
Additional debug info:
../gst-plugins-base/gst-libs/gst/audio/gstaudiobasesink.c(1117): gst_audio_base_sink_wait_event (): /GstPipeline:pipeline0/GstAlsaSink:alsasink0:
Sink not negotiated before eos event.
ERROR: pipeline doesn't want to preroll.
Setting pipeline to NULL ...
Freeing pipeline ...

@digititus
Copy link

I get an error using gst-launch

gst-launch-1.0 filesrc location=track01.dsf ! decodebin ! audioconvert ! alsasink
Setting pipeline to PAUSED ...
Pipeline is PREROLLING ...
ERROR: from element /GstPipeline:pipeline0/GstAlsaSink:alsasink0: The stream is in the wrong format.
Additional debug info:
gstaudiobasesink.c(1115): gst_audio_base_sink_wait_event (): /GstPipeline:pipeline0/GstAlsaSink:alsasink0:
Sink not negotiated before eos event.
ERROR: pipeline doesn't want to preroll.
Setting pipeline to NULL ...
Freeing pipeline ...

@jonaski
Copy link
Member

jonaski commented May 21, 2019

The output gst-launch-1.0 look like you are missing the DSD/DSF support in gstlibav, just because you got libgstlibav 1.16 does not mean it was compiled with dsf/dsd support, there are many compilation options, so it depends on what your distro did.
opensuse did not yet update to 1.16 but I have compiled 1.16 with base, good and libav from source and I can play the files with gst-launch-1.0, but when playing in strawberry it does not work, it plays but there is no sound. I have tested with the same file I used when I added the support and it definitely worked then, but that was the previous development version 1.15, when I get some more time I will compile that version again just to verify it still works.

@Fef0
Copy link

Fef0 commented Aug 8, 2019

@jonaski any news regarding DSD/DSF files? I'm using strawberry-git from AUR and can't even import them (error: xxxxx.dsf is not recognized as a valid audio file)

@jonaski
Copy link
Member

jonaski commented Aug 8, 2019

Arch and AUR is using taglib 1.11.1 which don't support DSD∕DSF
So you have to ask them to package it using our shipped version of taglib with DSD/DSF support.
https://aur.archlinux.org/cgit/aur.git/tree/PKGBUILD?h=strawberry-full-git#n37
Change -DUSE_SYSTEM_TAGLIB=ON to -DUSE_SYSTEM_TAGLIB=OFF

As for the playback issues, it definitely worked for me with gstreamer 1.15 when I implemented it, so I'm not sure why it does not work with gstreamer 1.16, I have not had time to look more into it.

@mluizescu
Copy link

mluizescu commented Jun 26, 2020

Is there any progress with native DSD support under Linux? It seems that GStreamer has no interest in implementing native DSD support (see here). I tried it with GStreamer 1.16 compiled with DSD support (libav_dsd_lsbf) and am only able to play DSD files as PCM, both with Strawberry and with gst-launch-1.0. If i try to add libav_dsd_lsbf to the pipeline (gst-launch-1.0 ! filesrc=filename ! libav_dsd_lsbf ! alsasink device=hw1:0, i get an error "the stream is in the wrong format", so it is definitely a GStreamer issue. The DACs I tested with (FiiO K3 and Topping D50s) definitely support native DSD, as this is working with MPD using the same DACs.

@jonaski
Copy link
Member

jonaski commented Jun 26, 2020

No. You are probably better off using a different player for DSD, for example DeaDBeef.
It's not likely that we get native DSD anytime soon. Someone needs to implement it in GStreamer like you said. If I knew more about it I would attempt it myself.
Writing our own engine is not an alternative as it's too much work, and GStreamer is very good and works fine for everything else.
I removed DSD/DSF from the description of supported audio formats for Strawberry. I'm not sure how stable GStreamer is playing them as PCM either.

@Fef0
Copy link

Fef0 commented Jun 26, 2020

As I proposed before, I think that using MPD as an optional Engine would be the fastest (and the most solid) option we have right now. We might implement a wrapper to MPC in order to speed up the process and directly control MPD.

@jonaski
Copy link
Member

jonaski commented Jul 3, 2020

It's too much work for just making DSD work, I'd rather have native DSD in Strawberry.

@jonaski
Copy link
Member

jonaski commented Nov 29, 2020

Closing this as it currently isn't resolvable, no-one else has shown interest in implementing it or looking into it in over a year.

@jonaski jonaski closed this as completed Nov 29, 2020
@v-fox
Copy link

v-fox commented Sep 11, 2022

It's too much work for just making DSD work, I'd rather have native DSD in Strawberry.
Closing this as it currently isn't resolvable, no-one else has shown interest in implementing it or looking into it in over a year.

You have to use PipeWire API to send native DSD which will then take care of native ALSA API for switching formats.

@antonellocaroli
Copy link

Something is moving

https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3901

@mluizescu
Copy link

Using the latest GStreamer - 1.23.0 (GIT), I am able to play DSD files natively using gst-launch-1.0 filesrc location=filename.dsf ! avdemux_dsf ! dsdconvert ! alsasink device=hw:1,0 and gst-play-1.0 --verbose --gapless --audiosink="dsdconvert ! alsasink device=hw:K3" filename.dsf. However, Strawberry still converts the file to PCM 352800.

@jonaski: Is it possible to add ! dsdconvert to the GStreamer pipeline in Strawberry or have an option for a custom GStreamer pipeline?

@jonaski
Copy link
Member

jonaski commented Jul 29, 2023

Should be possible, maybe add it between audiosinkconverter and audiosink, or right before audiosinkconverter

if (!gst_element_link(element_link, audiosinkconverter)) {

@KingDuckZ
Copy link
Contributor

Bug report is closed but I don't think this is working for me, is there anything specific I should do? Btw just for reference, I just found that pw-play -d <path> can play dsd files, in case it's useful to anyone else

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

8 participants