Transcoding to WAV

Cool stuff you can do with MPD. A place for you to put your hacks and patches, or be inspired by others'.
Post Reply
nbpf
Posts: 56
Joined: June 17th, 2014, 6:45 am

Transcoding to WAV

Post by nbpf » October 14th, 2015, 6:47 am

Is it possible with MPD? If yes, how? Thanks, nbpf

max
Forum team
Posts: 854
Joined: January 15th, 2013, 3:43 pm

Re: Transcoding to WAV

Post by max » October 16th, 2015, 3:29 pm

Yes, with the "wave" encoder plugin.

nbpf
Posts: 56
Joined: June 17th, 2014, 6:45 am

Re: Transcoding to WAV

Post by nbpf » October 16th, 2015, 9:07 pm

max wrote:Yes, with the "wave" encoder plugin.
Is this done by adding encoder "wave" to the audio_output section? Would

Code: Select all

audio_output {
        type                "alsa"
        name                "M2Tech hiFace Evo USB-SPDIF Interface"
        device              "hw:2,0"
        auto_resample       "no"
        auto_format         "no"
        mixer_type          "none"
        replay_gain_handler "none"
        use_mmap            "yes"
        encoder             "wave"
}
just do the job? Thanks, nbpf

max
Forum team
Posts: 854
Joined: January 15th, 2013, 3:43 pm

Re: Transcoding to WAV

Post by max » October 16th, 2015, 10:13 pm

No. The "alsa" output plugin doesn't use encoders. Why would it? That doesn't make any sense.

nbpf
Posts: 56
Joined: June 17th, 2014, 6:45 am

Re: Transcoding to WAV

Post by nbpf » October 17th, 2015, 7:05 am

max wrote:No. The "alsa" output plugin doesn't use encoders. Why would it?
Many observers have reported small but not negligible improvement in sound quality when storing .wav files in place of their correspondent .flac files. Many users not willing to loose the convenience of .flac (for tags management and storage) have adopted the practice of storing their data in .flac but converting them on the fly (transcoding) to .wav prior sending to dac / streamers. I thought I would give it a try. Best, nbpf

nbpf
Posts: 56
Joined: June 17th, 2014, 6:45 am

Re: Transcoding to WAV

Post by nbpf » October 17th, 2015, 7:15 am

max wrote:No. The "alsa" output plugin doesn't use encoders. Why would it? That doesn't make any sense.
Why doesn't it make any sense for the "alsa" output plugin to use encoders? Sorry for the possibly trivial question. I have no whatsoever idea what an "alsa" output plugin is (and in which sense it differs from other plugins) but I do not see any means of acquiring this understanding except for asking here (yes, I have read the MPD documentation carefully). Thanks a lot, nbpf.

max
Forum team
Posts: 854
Joined: January 15th, 2013, 3:43 pm

Re: Transcoding to WAV

Post by max » October 17th, 2015, 11:44 am

nbpf wrote:Many observers have reported small but not negligible improvement in sound quality when storing .wav files in place of their correspondent .flac files.
Oh, we're talking about this kind of esoteric bullshit. No, thanks, I'm out of this thread.

nbpf
Posts: 56
Joined: June 17th, 2014, 6:45 am

Re: Transcoding to WAV

Post by nbpf » October 17th, 2015, 1:51 pm

max wrote:
nbpf wrote:Many observers have reported small but not negligible improvement in sound quality when storing .wav files in place of their correspondent .flac files.
Oh, we're talking about this kind of esoteric bullshit. No, thanks, I'm out of this thread.
Max, I do not see what is esoteric in comparing the effects (be these void, negligible or significant) of different file formats on sound quality. You might consider such a comparison a waste of time but then, this is not your time, is it?

The core of my post was a precise question: you posit that it doesn't make any sense for the "alsa" output plugin to use encoders? I would be interested to know why this is the case and I would be grateful if you could post an answer. Thanks, nbpf

max
Forum team
Posts: 854
Joined: January 15th, 2013, 3:43 pm

Re: Transcoding to WAV

Post by max » October 18th, 2015, 11:41 am

nbpf wrote:I do not see what is esoteric in comparing the effects (be these void, negligible or significant) of different file formats on sound quality.
From here, it is obvious that you have not the slightest idea what you are talking about.

Yes, different lossy codecs (not file formats!) do have different sound quality. The point is that WAV is not a lossy codec. Transcoding to WAV and back does not affect quality at all. Sorry, you're completely wrong here.

If you still believe you're right, say so, and I'll ignore all of your posts from now on, as they would only waste my time.

nbpf
Posts: 56
Joined: June 17th, 2014, 6:45 am

Re: Transcoding to WAV

Post by nbpf » October 18th, 2015, 11:15 pm

max wrote:
nbpf wrote:I do not see what is esoteric in comparing the effects (be these void, negligible or significant) of different file formats on sound quality.
From here, it is obvious that you have not the slightest idea what you are talking about.

Yes, different lossy codecs (not file formats!) do have different sound quality. The point is that WAV is not a lossy codec. Transcoding to WAV and back does not affect quality at all. Sorry, you're completely wrong here.

If you still believe you're right, say so, and I'll ignore all of your posts from now on, as they would only waste my time.
Max, I honestly do not understand what I should (or shouldn't) believe I am right about. And yes, for your peace of mind I guess you had better ignoring my posts! Alternatively, you could also try answering my specific questions. That would not be a complete waste of time, I do believe. Best, nbpf

java
Posts: 4
Joined: January 2nd, 2016, 1:23 pm

Re: Transcoding to WAV

Post by java » January 4th, 2016, 4:32 pm

A FLAC file, is a losslessly encoded WAVE file - the only scenario where a WAVE file, might sound better than a FLAC file, is if the processor, uncompressing the FLAC file, before playback, is so slow, it cannot uncompress, and playback the uncompressed audio, that gets passed to the audio player, whatever that might be, simultaneously ...

My take on the whole issue.

I may be wrong ... , shrug ...

nbpf
Posts: 56
Joined: June 17th, 2014, 6:45 am

Re: Transcoding to WAV

Post by nbpf » January 15th, 2016, 10:59 am

java wrote:A FLAC file, is a losslessly encoded WAVE file - the only scenario where a WAVE file, might sound better than a FLAC file, is if the processor, uncompressing the FLAC file, before playback, is so slow, it cannot uncompress, and playback the uncompressed audio, that gets passed to the audio player, whatever that might be, simultaneously ...

My take on the whole issue.

I may be wrong ... , shrug ...
I have compared replay of .flac files and .wav files through MPD on my system and I cannot perceive any difference. I understand that, in this setup, differences in sound quality could be explained in terms of differences in CPU load and related electric noise. A similar argument holds for replay from memory which is adopted by some server + renderer systems, e.g., Audirvana on OS X. Here one could argue that reducing the data exchange between memory and HDD at replay time could have a beneficial effect on electric noise and pehaps free some resources on the usb bus.

The situation is slightly different if the server and the renderer are running on different machines. Here one could argue that sending uncompressed files implies, on the one hand, more work on the server side (where CPU resources are usually abounding) and less work on the renderer side (where CPU and memory resources might be tight) which might (or not, of course) result in better sound quality.

I think there is no point in being dogmatic about these issues. If one can setup a server for replaying from memory or transcoding, one can test the different options. If they all sound the same and they all sound very good, the better! MPD supports setting the size of the memory buffer. But this size cannot be increased beyond a relatively small (undocumented) value and replay from memory is, to the best of my understanding, not possible.

Post Reply