hzeller / gmrender-resurrect

Resource efficient UPnP/DLNA renderer, optimal for Raspberry Pi, CuBox or a general MediaServer. Fork of GMediaRenderer to add some features to make it usable.
GNU General Public License v2.0
834 stars 202 forks source link

Grating/popping sound at the end of wav file #39

Closed hjheins closed 10 years ago

hjheins commented 10 years ago

Hi HZeller,

not sure you can do anything about this, but here goes: At the end of playing a .wav file, there is an audible grating or popping noise. This seems to be related to metadata that is added to the wav file. More on this here: http://www.psaudio.com/vanilla/discussion/3135/white-noise-at-end-of-wav-files/p1

It seems this is not only happening to gmrender-resurrect, but to more devices. The solution is to disable meta information in the wav, which is a problem again on the dlna "remote" side in finding the right song.

Is there anything you can do about this?

thanks,

Hendrik-Jan

hjheins commented 10 years ago

The below might be a clue, though I have no idea how to achieve this. http://yabb.jriver.com/interact/index.php?topic=74972.0

Hendrik-Jan

hzeller commented 10 years ago

So according to the wav specification, there is no meta data (as the spec is from the early 90ies or so). But maybe some CD grabbers do that nowadays. My assumption is, that the file says something in the header how many samples it contains and then appends stuff beyond that; while gstreamer attempts to just play everything as sound.

Two things I'd try a) did you actually use the current version of gstreamer (1.0.x) ? The old 0.10 version is not maintained anymore and maybe the newer version can deal with that b) Can you convert the files to *.flac ? That is also lossless, but more compact and knows about metadata.

hjheins commented 10 years ago

Agreed. 1) Doing that. The issue is there. 2) indeed converting to flac seems to help. However it would be nice to also be able to have this in wav. By your comment, are you basically pointing me to gstreamer for this?

As I found in the second comment: this seems indeed to be related to some header or footer data that should not be read as part of the wav stream.

hzeller commented 10 years ago

Yes, this must be somewhere in gstreamer, as gmrender-resurrect passes all sound-file handling directly to gstreamer (gmrender never touches the raw audio stream; it essentially just passes the URL to gstreamer).

If you can create a minimal *.wav file and can create a gst-launch pipeline ( http://gstreamer.freedesktop.org/data/doc/gstreamer/head/faq/html/chapter-using.html ) that exposes that problem, then you should file a bug with them: http://gstreamer.freedesktop.org/bugs/

hjheins commented 10 years ago

OK, filed it against gstreamer. Bug is: Bug 707757

hjheins commented 10 years ago

After more than a month, we found out the issue: gmrender is used in our setup as renderer for a combination of library twonky or minidlna, and remote jRiver. When using a different bit of remote software, all of a sudden the noise at the end of the wav dissapeared. So it looks like jRiver is the culprit here. (that should not even be possible, right?)

hzeller commented 10 years ago

Glad it works now. Enjoy!