Option to revert to v14.x.x transcoding settings

Feature description

i am using navidrome with Symfonium. I have a transcoding script in Navidrome to convert dsf to flac. All other media types play natively When I was on v14.x.x, this script worked perfectly but since upgrading to Symfonium v15.1.0B2, it not longer transcodes dsf files, just sends them as dsf.

As far as I can see; my only options now are transcode nothing or transcode everything (even if input is the same as output).

It would be good to be able to revert to v14.x.x transcoding when just listening on the phone or in the car but have native dsf if using USB DAC

The transcoding command is:

ffmpeg -i %s -ss %t -map 0:a:0 -ar 44100 -sample_fmt s16 -c:a flac -f flac -

Problem solved

Having to transcode nothing or transcode everything

Brought benefits

Minimise network congestion by not steaming high-bitrate files when the device being used is not capable of producing high-quality output (eg: phone/bluetooth speaker)

Device type

Phone

I searched existing feature requests

on

I tried to ping @deluan a couple of time recently for the forced rules applied with the new engine when it should not without success. Maybe if you request directly on it’s Github it would have more attention.

Transcoding is done based on the device support, phone now support DSD so there’s no transcoding.

I still think it’s useful as, AFAIK, there are no phones or bluetooth devices than will play dsf natively.

Also, and I admit I may be wrong here, I have added replay gain values to the tags of the dsf files but any native dsf player will just ignore them. When transcoded to flac at source, RG seems to work.

Previously DSD was not supported by Symfonium so was always transcoded that not an option …

Symfonium support DSD natively and decode to PCM when necessary, you can also force DSD to PCM per output to actually enable RG on DSD too.

Fix coming in Navidrome…

Good timing, I fixed this today.

One correction first. Symfonium is not ignoring your command. Navidrome decides. Symfonium v15 tells the server it can play DSD natively, so Navidrome stops transcoding, which is the correct answer to what it was asked. v14 never advertised DSD, so dsf always got converted. Your command still works, the client just started asking for something different.

The Players transcoding setting is the right place to do what you want. The problem is the thing you already ran into:

I tried setting the transcode option in Players but then it transcodes everything, even if input=output.

That is a bug. When a player forces a format, Navidrome was turning off direct play for everything, so a flac source on a player set to “transcode to flac” got re-encoded flac to flac. Wasted CPU and bandwidth, and the result is not even seekable once you download it, because the FLAC header comes out with no duration. #6105 fixes both.

With that PR, setting the player’s Transcoding to flac gives you:

  • dsf: transcoded to flac
  • flac: served as-is, no re-encode

I tested it with real DSD64 files from my own library.

One thing I noticed while doing that: the sample rate and bit depth Navidrome computes for DSD look wrong. It ends up at 44100 and reports 8 bit, while ffmpeg actually writes 24. It lands where you want by accident, but I want to fix it properly. That one is separate from #6105.

So I don’t think you need an enforce option here. It would still matter for forcing a format the client genuinely cannot play, which is a different problem. Tell me if you have a case like that.

Can you test the build from #6105? Let me know how it goes.

Good, I guess he no more visit here then, I’ll send users again to him. Did he answer on discord or GitHub?

It was on Github. Deluan had already fixed it before I asked. I guess he must have seen it here

Quote:

“Two fixes for the same report from the Symfonium author (14877, 14944).”

1 Like

Hey @Tolriq, I do visit from time to time, but wanted to investigate the issue first and forgot to reply.

This one is on me though, you pinged twice in 14877 and I did not answer.

Both things you raised are in #6105:

  • a source already in the forced format is no longer re-encoded to itself
  • piped FLAC output now carries a real total_samples, so an offline copy is
    seekable

@glennza tested the build and his setup does what he wanted: dsf transcodes to
flac, everything else is served as-is.

One thing I found while testing his files that is not fixed yet. The sample rate
and bit depth Navidrome computes for DSD are wrong. It reports 44100 and 8 bit
while ffmpeg actually writes 24. It lands on a playable result by accident.

Separate fix, not in #6105.

No problem, glad you fixed and we can keep handling things here as it’s easier to have the user tests.

Not sure to follow on that one. The profile Symfonium sends have no limits on sample rate or bitDepth .

This is a bug in Navidrome, Symfonium is behaving fine :slight_smile:

1 Like