HydrogenAudio

Hydrogenaudio Forum => General Audio => Topic started by: Richard Kimber on 2012-04-10 15:25:42

Title: Gapless playback with a Linux DLNA server
Post by: Richard Kimber on 2012-04-10 15:25:42
Virtually all the music I buy now comes in the form of downloaded flac files.  These have no cue sheets with them.

Some of the music needs to be played gaplessly, and I'm under the impression that flac files + cue sheets is a solution to this.  If this is so, can anyone recommend a linux program that would enable me to generate cue sheets from the flac files on my hard disk?  I have seen software that creates cue files from music on a CD, but I can't find anything that does it from a folder of flac files on the hard disk.
Title: Gapless playback with a Linux DLNA server
Post by: Porcus on 2012-04-10 16:03:09
Some of the music needs to be played gaplessly, and I'm under the impression that flac files + cue sheets is a solution to this.


Shouldn't be. If you have a player which does not offer gapless playback without cuesheets, then I'd be surprised if it does with, as long as you use one file per track. (I could be wrong though.)
Title: Gapless playback with a Linux DLNA server
Post by: Dario on 2012-04-10 16:05:18
As far as I know, lossless formats are inherently gapless and a cue sheet is definitely not your solution.

Gapless playback has nothing to do with the pregaps (the zero indices) that are found on the CD, or in the cue sheet. It is about ignoring the padding/delay that is added by certain lossy codecs.

EDIT: As for your actual question, there's shntool (http://www.etree.org/shnutils/shntool/) and its cue mode.
Title: Gapless playback with a Linux DLNA server
Post by: trout on 2012-04-10 16:12:33
FLAC, as most any lossless format, should playback gaplessly by default. Why exactly do you need cue sheets?

Are you using VLC or some other player that does not properly decode FLAC? If so, you need to change the playback software, as in such a case I can't imagine cue sheets being of any help.
Title: Gapless playback with a Linux DLNA server
Post by: greynol on 2012-04-10 16:27:34
Gapless playback is not a requirement of proper decoding regardless of the format. It has to do with how the player handles the audio stream during file changes as well as some system to tell the player what part of the decoded stream to ignore during playback if that's also a necessary requirement (as it is with mp3, but not with flac, for example).

When used with a media player and audio encoded as one track per file, cue sheets are nothing more than playlists. There is nothing inherent in them to promote gapless playback. Cue sheets were intended to provide a way to add additional information that isn't present in a data file or files in order to create a more complete copy onto optical media.  In the case of redbook audio, the data is already inherently gapless, so with respect to this a cue sheet only provides indexing.
Title: Gapless playback with a Linux DLNA server
Post by: Richard Kimber on 2012-04-10 17:42:14
FLAC, as most any lossless format, should playback gaplessly by default. Why exactly do you need cue sheets?

Are you using VLC or some other player that does not properly decode FLAC? If so, you need to change the playback software, as in such a case I can't imagine cue sheets being of any help.


The problem with gapless is that some music, although intended to be heard as a continuous piece, is divided into more than one flac file.

Some players will play this music as intended (as continuous music) while others have a short hiatus when moving from one file to the next. MPC is an example of a gapless player.  However, I'm actually wanting to stream my music to a DLNA device because I don't want the computer to be resampling or otherwise messing around with my high res files.  The DLNA device (Pioneer N50) does not play gaplessly, and I haven't yet found a working DLNA server that will (neither miniDLNA nor Mediatomb appear to do gapless).  Some googling suggested that cue sheets were the answer, but obviously from what people are saying that's not so.

Of course, if anyone knows of a DLNA server that will stream gaplessly, then that would be my solution, and I'd be eternally grateful 
Title: Gapless playback with a Linux DLNA server
Post by: Richard Kimber on 2012-04-10 18:00:11
Gapless playback is not a requirement of proper decoding regardless of the format. It has to do with how the player handles the audio stream during file changes as well as some system to tell the player what part of the decoded stream to ignore during playback if that's also a necessary requirement (as it is with mp3, but not with flac, for example).

Are you saying that it's largely a matter of buffering?  Would increasing buffer sizes work (not that I'm sure how to do this, but I guess I could find out, if that's the solution)?
Title: Gapless playback with a Linux DLNA server
Post by: trout on 2012-04-10 18:05:54
Some googling suggested that cue sheets were the answer

Maybe, *IF* also using a single audio file per album.
Title: Gapless playback with a Linux DLNA server
Post by: benski on 2012-04-10 18:15:44
Gapless playback is not a requirement of proper decoding regardless of the format. It has to do with how the player handles the audio stream during file changes as well as some system to tell the player what part of the decoded stream to ignore during playback if that's also a necessary requirement (as it is with mp3, but not with flac, for example).

Are you saying that it's largely a matter of buffering?  Would increasing buffer sizes work (not that I'm sure how to do this, but I guess I could find out, if that's the solution)?


There are a number of common issues that some media players have that effect track transitions.  Hardware decoders are notoriously bad, but even common PC software doesn't always get it right.

The most common issues are:
1) filling out the last buffer with zeroes on the end of a track.  Most audio output APIs require audio to be fed in fixed-size buffers, e.g. 1024 samples at a time.  If the song is not an even multiple of the fixed buffer size, some players might fill up the remainder of the buffer with silence (zeroes) instead of appending the start of the next song.  This will introduce an audible drop-out or click on song transition
2) letting the buffers exhaust before starting parsing/decoding of the next song.  Audio output is often heavily buffered (e.g. 2 seconds) to deal with I/O congestion, CPU spikes from other running applications and thread pre-emption.  In practical terms, this means that the song has been decoded 2 seconds ahead of what you are hearing out of the speakers.  Many players will let the buffer 'play out' before switching to the next song.  Since playback of the next song does not always happen immediately (the file must be opened [or network connection established], non-audio portions such as audio information, metadata and seek-tables be parsed and interpreted, etc).  This will lead to an audible gap between songs.
3) On hardware devices, the decoding might be done via some onboard chip.  Sometimes this prevents the software/firmware from having any access to the audio stream in order to add in needed logic to handle song transitions properly and to handle padding information embedded in formats such as MP3.  Even if the chip would theoretically allow this, the device manufacturer might be using code developed by the chip manufacturer to do playback and might be unwilling or unable to make modification to that code.
Title: Gapless playback with a Linux DLNA server
Post by: Richard Kimber on 2012-04-10 18:53:45
Maybe, *IF* also using a single audio file per album.


But then, of course, there wouldn't be a problem. The issue is one of the sequential playing of files that are all part of the same piece of music.
Title: Gapless playback with a Linux DLNA server
Post by: JimH on 2012-04-11 15:23:27
Gapless playback is not a requirement of proper decoding regardless of the format. It has to do with how the player handles the audio stream during file changes as well as some system to tell the player what part of the decoded stream to ignore during playback if that's also a necessary requirement (as it is with mp3, but not with flac, for example).

This is accurate.  The playback software determines whether playback is gapless or not.

When you use DLNA, it is the software on the DLNA Renderer that determines whether playback is gapless.  It may not be capable of gapless playback, in other words.  I don't think gapless playback is part of the DLNA standard.

I did a quick search for Panasonic N50 and didn't find it.  Do you have a link?
Title: Gapless playback with a Linux DLNA server
Post by: JimH on 2012-04-11 15:30:44
I did a search for "gapless DLNA" and found this thread on our site:
http://yabb.jriver.com/interact/index.php?topic=68934.0 (http://yabb.jriver.com/interact/index.php?topic=68934.0)

AndrewFG is the developer of Whitebear, which provides a DLNA interface to the Squeezebox
Matt is our CTO
Bob is our developer for DLNA
Title: Gapless playback with a Linux DLNA server
Post by: Richard Kimber on 2012-04-11 16:13:16
I did a search for "gapless DLNA" and found this thread on our site:
http://yabb.jriver.com/interact/index.php?topic=68934.0 (http://yabb.jriver.com/interact/index.php?topic=68934.0)

AndrewFG is the developer of Whitebear, which provides a DLNA interface to the Squeezebox
Matt is our CTO
Bob is our developer for DLNA


Thanks.  But unfortunately this seems to be a Windows application.  I'm running Linux and am not keen to get into running Virtualbox or Wine.
Title: Gapless playback with a Linux DLNA server
Post by: Richard Kimber on 2012-04-11 16:19:44
When you use DLNA, it is the software on the DLNA Renderer that determines whether playback is gapless.  It may not be capable of gapless playback, in other words.  I don't think gapless playback is part of the DLNA standard.

I did a quick search for Panasonic N50 and didn't find it.  Do you have a link?


It's a Pioneer N50, recently released (I got one of the early deliveries to the UK about a fortnight ago).

http://www.pioneerelectronics.com/PUSA/Hom...i-Fi+Audio/N-50 (http://www.pioneerelectronics.com/PUSA/Home/Audio-Components/Hi-Fi+Audio/N-50)
Title: Gapless playback with a Linux DLNA server
Post by: Wombat on 2012-04-11 16:29:21
I have a network player myself and read some reviews here and there but can´t remember even one Airplay unit that does gapless correctly.

Edit: I remember right. You may translate this german review http://www.digital-room.de/news/airplay-mehr-pioneer-n30-n50 (http://www.digital-room.de/news/airplay-mehr-pioneer-n30-n50)
Pioneer can´t offer gapless due to chipset limitations for Airplay.
Title: Gapless playback with a Linux DLNA server
Post by: Richard Kimber on 2012-04-11 16:47:05
I have a network player myself and read some reviews here and there but can´t remember even one Airplay unit that does gapless correctly.


I'm not using Airplay.  I just want to serve flac files from my HD.  I thought I'd found an answer with xmbc, which will do gapless and is supposed to "stream your multimedia from anywhere in the house or directly from the internet using practically any protocol available", but I couldn't get the Pioneer N-50 to see it, though it sees miniDLNA and Mediatomb.
Title: Gapless playback with a Linux DLNA server
Post by: Wombat on 2012-04-11 16:50:12
Ops, you responded while i was editing my last answer, please read above.
Seems like Pioneer had to give up gapless to make its device Airplay compatible.
Title: Gapless playback with a Linux DLNA server
Post by: Richard Kimber on 2012-04-11 16:57:04
Ops, you responded while i was editing my last answer, please read above.
Seems like Pioneer had to give up gapless to make its device Airplay compatible.

Sorry.

But earlier posts here have suggested that it's not the hardware that is necessarily the determining factor.  It's the software that provideds the music to it that can control the gaps.

Indeed, I can play gaplessly on the Pioneer using certain music players.  The problem with these is that they are not independent of the PC's sound card, and I want to find a streamer that will do it gaplessly.  So long as the Pioneer can see it that's all that matters to me.  I'm happy to ignore the Airplay potential.
Title: Gapless playback with a Linux DLNA server
Post by: JimH on 2012-04-11 17:14:37
Ops, you responded while i was editing my last answer, please read above.
Seems like Pioneer had to give up gapless to make its device Airplay compatible.

Sorry.

But earlier posts here have suggested that it's not the hardware that is necessarily the determining factor.  It's the software that provideds the music to it that can control the gaps.

There's some confusion.  Gapless playback in your case is probably limited by the DLNA Renderer (software) on your N-50.  At least, that's my guess.
Title: Gapless playback with a Linux DLNA server
Post by: JimH on 2012-04-11 17:19:34
Here's a thread on the N-50 at computeraudiophile.com.
http://www.computeraudiophile.com/content/...ew-Pioneer-N-50 (http://www.computeraudiophile.com/content/Has-anyone-tried-new-Pioneer-N-50)
Title: Gapless playback with a Linux DLNA server
Post by: Nessuno on 2012-04-11 19:08:25
can´t remember even one Airplay unit that does gapless correctly.
[...]
Pioneer can´t offer gapless due to chipset limitations for Airplay.


My Apple Airport Express, using AirPlay, is perfectly capable of gapless playing.
Title: Gapless playback with a Linux DLNA server
Post by: Wombat on 2012-04-11 19:32:06
I only repeated what i read on that review that claims the chipset used in the Pioneer is produced by Apple-Partner Bridgeco and this can´t play gapless. They may speak about DLNA usage can´t be gapless.
Maybe some iTunes interaction with the Airplay feature may be able to play perfectly gapless.
Title: Gapless playback with a Linux DLNA server
Post by: Nessuno on 2012-04-12 07:59:01
I only repeated what i read on that review that claims the chipset used in the Pioneer is produced by Apple-Partner Bridgeco and this can´t play gapless. They may speak about DLNA usage can´t be gapless.
Maybe some iTunes interaction with the Airplay feature may be able to play perfectly gapless.


I may be wrong, but from the little I know about it, Airplay has nothing to do with DLNA: is not a file server system, simply a streaming protocol and as such has not the concept itself of "songs" and gap between them.

I'm not blaming it on you, of course, but today on the internet everybody and his dog has become a reviewer... 
Title: Gapless playback with a Linux DLNA server
Post by: Richard Kimber on 2012-04-12 13:41:30
There's some confusion.  Gapless playback in your case is probably limited by the DLNA Renderer (software) on your N-50.  At least, that's my guess.

Yes, I admit to being somewhat confused.

What I don't understand is: if a single flac file can be played continuously by a DLNA renderer, why can't the software at the PC end be made to organise things such that a series of files looks like a single file when served to the DLNA renderer?

It seems to a naive user like me that if a music player (e.g. Sonata + mpd) can play gaplessly, then it's not rocket science to devise a system whereby files can be served gaplessly. In other words maybe the DLNA server could have a stage (perhaps a gapless plugin) which collects the files together in the right manner - i.e. it conforms to the DLNA standards but has this extra facility.  But maybe there are hidden complexities of which I'm not aware.
Title: Gapless playback with a Linux DLNA server
Post by: Wombat on 2012-04-12 13:54:20
When i read the thread at CA that jimH linked to it seems the people over there also only were able to play gapless with Airplay.
My theory is that With Airplay you push a stream from the Airplay application to the player and Airplay creates a gapless stream at that.
If acting as DLNA the player requests music at the DLNA server. If the player has no way to tell the server what song is played next on the list the server has this little timeout during track changes.
I guess there are better DLNA player implementations that create themself some kind of buffer to work around this. This may be the limitation of this Chipset the reviewer talks about.
Title: Gapless playback with a Linux DLNA server
Post by: soulsearchingsun on 2012-04-12 14:22:55
What I don't understand is: if a single flac file can be played continuously by a DLNA renderer, why can't the software at the PC end be made to organise things such that a series of files looks like a single file when served to the DLNA renderer?

Because usually DLNA software is just a control point. It tells the renderer which file to render by giving a path (the file resides on the server). So DLNA is by default not streaming, but client-server. There are applications that can output a stream via DLNA. Foobar2000 with foo_upnp is able to stream the ouput (AFAIK everything that would be sent to your speakers - not just foobar audio) to a DLNA renderer. This would, obviously, be gapless.
edit: of course, this doesn't help you on linux. But it's possible.
Title: Gapless playback with a Linux DLNA server
Post by: Richard Kimber on 2012-04-12 14:29:11
I may be wrong, but from the little I know about it, Airplay has nothing to do with DLNA: is not a file server system, simply a streaming protocol and as such has not the concept itself of "songs" and gap between them.

Yes, the Airplay functions and normal DLNA music server functions seem to be quite separate on the device itself.
Title: Gapless playback with a Linux DLNA server
Post by: Nessuno on 2012-04-12 17:11:18
Yes, the Airplay functions and normal DLNA music server functions seem to be quite separate on the device itself.


By the way: just made a fast Google search and it seems that there is some AirPlay support on Linux via pulseaudio modules. If it works (can't try myself now as I haven't a Linux box at hand here at home), then you can use one of the many Linux gapless FLAC players and stream his output to the receiver.
Title: Gapless playback with a Linux DLNA server
Post by: Richard Kimber on 2012-04-13 15:23:12
By the way: just made a fast Google search and it seems that there is some AirPlay support on Linux via pulseaudio modules. If it works (can't try myself now as I haven't a Linux box at hand here at home), then you can use one of the many Linux gapless FLAC players and stream his output to the receiver.


Thanks.  I don't know anything about Airplay.  Does it handle 24bit 192kHz files?

Edit:  Actually, I think I found the answer.  As I now understand it Airplay is 16 bit and anything else is converted to 16 bit.  That's no good to me unfortunately, since I want to deliver high res files to my DAC unsullied by the PC.
Title: Gapless playback with a Linux DLNA server
Post by: greynol on 2012-04-13 15:47:03
It's a shame that you seem to be held up by things you cannot hear, unless you are able to demonstrate that you can (http://www.hydrogenaudio.org/forums/index.php?showtopic=16295).
Title: Gapless playback with a Linux DLNA server
Post by: Nessuno on 2012-04-13 19:25:17
Edit:  Actually, I think I found the answer.  As I now understand it Airplay is 16 bit and anything else is converted to 16 bit.

Where have you got this information? Don't mistake protocol specifications with capability of single devices that implement it.
And even if, the tradeoff is between gapless and something you very very very very probably cannot hear!

Anyway, best that you can do is to have a try and verify if you hear any difference (and if you feel like reporting back us, please follow the rules greynol pointed you to )

Title: Gapless playback with a Linux DLNA server
Post by: Richard Kimber on 2012-04-14 11:52:35
It's a shame that you seem to be held up by things you cannot hear, unless you are able to demonstrate that you can (http://www.hydrogenaudio.org/forums/index.php?showtopic=16295).

I'm not sure I understand this.  I can detect a quality difference between the 16bit/44100 and 24bit/96000 files that I have.  It's because I want to find out whether 192k makes any difference that I'm looking for an appropriate way to play the files. Having Airplay downgrade them to 16bit doesn't seems to me like a good way of doing this.
Title: Gapless playback with a Linux DLNA server
Post by: Richard Kimber on 2012-04-14 12:26:55
Edit:  Actually, I think I found the answer.  As I now understand it Airplay is 16 bit and anything else is converted to 16 bit.

Where have you got this information? Don't mistake protocol specifications with capability of single devices that implement it.
And even if, the tradeoff is between gapless and something you very very very very probably cannot hear!

Anyway, best that you can do is to have a try and verify if you hear any difference (and if you feel like reporting back us, please follow the rules greynol pointed you to )

My source may well not be reliable but FWIW it was a posting here:-
http://www.computeraudiophile.com/content/...s-it-make-sense (http://www.computeraudiophile.com/content/iPad-Airplay-directly-Airport-Express-Does-it-make-sense)
I suppose some devices may well exceed the specification.  The N-50 manual doesn't give any guidance about its performance in this respect. But I do have a way of testing it, so I could do that in due course.
Title: Gapless playback with a Linux DLNA server
Post by: Richard Kimber on 2012-04-14 13:10:33
It's a shame that you seem to be held up by things you cannot hear, unless you are able to demonstrate that you can (http://www.hydrogenaudio.org/forums/index.php?showtopic=16295).


Actually, I support the aims of the document mentioned, in principle, though in the home environment it's hard to meet the requirements fully.  I also think that the reproducibility requirement is formulated too strictly.
"If someone passes the test, others must check if this is possible, by passing the test in their turn." seems to imply that anyone must be able to pass the test, whereas I would only require people who have the same or better hearing abilities to pass the test. Also, some of the links in the FAQ need to be looked at. Linabx doesn't seem to be available, and the links to:
WinABX
FF123's samples For Testing Audio Codecs
ABC/Hidden Reference Audio Comparison Tool
Roberto's public listening tests page
are broken.  I haven't checked all of them - maybe it's worth running the page through a linkchecker.  I could do that if you wanted.
Title: Gapless playback with a Linux DLNA server
Post by: JimH on 2012-04-14 14:24:30
It's a shame that you seem to be held up by things you cannot hear, unless you are able to demonstrate that you can (http://www.hydrogenaudio.org/forums/index.php?showtopic=16295).


Actually, I support the aims of the document mentioned, in principle, though in the home environment it's hard to meet the requirements fully.  I also think that the reproducibility requirement is formulated too strictly.

I agree that the standards for what can be said here are sometimes a little too tight.  With regard to audio quality, a rational approach is important, but this rationality shouldn't be applied absolutely.
Title: Gapless playback with a Linux DLNA server
Post by: Nessuno on 2012-04-14 14:29:08
As I now understand it Airplay is 16 bit and anything else is converted to 16 bit.

Where have you got this information? Don't mistake protocol specifications with capability of single devices that implement it.

My source may well not be reliable but FWIW it was a posting here:-
http://www.computeraudiophile.com/content/...s-it-make-sense (http://www.computeraudiophile.com/content/iPad-Airplay-directly-Airport-Express-Does-it-make-sense)


The only reference to bitdepth and sampling frequency I see there is to the analog output of Airport Express. That, you understand, is different than speaking about AirPlay as a protocol.

The truth is that, AFAIK, as every Apple technology, AirPlay is largely undocumented, so the only reliable result is the one you obtain when you try with your device (and of course it is valid only for that device).


Title: Gapless playback with a Linux DLNA server
Post by: Richard Kimber on 2012-04-14 15:42:10
The only reference to bitdepth and sampling frequency I see there is to the analog output of Airport Express. That, you understand, is different than speaking about AirPlay as a protocol.


Yes. You're right. I didn't really look hard enough. FWIW I've just found an unofficial protocol here http://nto.github.com/AirPlay.html (http://nto.github.com/AirPlay.html) which I'll have a look at. But you're right, I just need to try it on my kit.
Title: Gapless playback with a Linux DLNA server
Post by: greynol on 2012-04-14 16:37:14
I agree that the standards for what can be said here are sometimes a little too tight.  With regard to audio quality, a rational approach is important, but this rationality shouldn't be applied absolutely.

The link was given so that the OP could learn about DBT. It was not given as a rule which should be applied absolutely. The one to be applied absolutely is #8 here (http://www.hydrogenaudio.org/forums/index.php?showtopic=3974). Whether you agree with it is not up for debate in this discussion. If you wish to express such a sentiment you can attempt to start a new topic. Further posts about it in this one will be binned. I hope I have made myself clear.

I can detect a quality difference between the 16bit/44100 and 24bit/96000 files that I have.

If you are talking about audible sound quality, you are not allowed to make such a claim unless you also substantiate it with objective evidence per the rule I linked above.  Do you have such evidence?
Title: Gapless playback with a Linux DLNA server
Post by: Richard Kimber on 2012-04-14 16:48:29
I can detect a quality difference between the 16bit/44100 and 24bit/96000 files that I have.

If you are talking about audible sound quality, you are not allowed to make such a claim unless you also substantiate it with objective evidence per the rule I linked above.  Do you have such evidence?

It would be helpful for me to read the objective support that others have submitted for their subjective statements about sound quality. Also it would be interesting to hear the test samples.  Can you point me to some links?
Title: Gapless playback with a Linux DLNA server
Post by: db1989 on 2012-04-14 16:53:42
What does that have to do with it? You made a claim, so you provide evidence for it. How is anyone else relevant? If this is your attempt to dodge a valid challenge to your unsubstantiated and, frankly, very unlikely claim, then it’s a terrible effort. Abide by the rules to which you agreed during registration in your posts, or don’t make them.
Title: Gapless playback with a Linux DLNA server
Post by: Light-Fire on 2012-04-14 17:13:39
It's a shame that you seem to be held up by things you cannot hear, unless you are able to demonstrate that you can (http://www.hydrogenaudio.org/forums/index.php?showtopic=16295).

I'm not sure I understand this.  I can detect a quality difference between the 16bit/44100 and 24bit/96000 files that I have.  It's because I want to find out whether 192k makes any difference that I'm looking for an appropriate way to play the files. Having Airplay downgrade them to 16bit doesn't seems to me like a good way of doing this.


It is extremely unlikely that you can hear a difference between the 16bit/44100 and 24bit/96000 files. But the proper way to find out is to perform a double blind test because it eliminates the placebo effect from your sound quality evaluations.

If downgrading on the fly from 24/96 to 16/44.1 can help you with the gapless streaming problem you should consider it (because, you can't hear the difference anyways) and you still have your original file preserved at 24/96 (for whatever the reason you want it like that).
Title: Gapless playback with a Linux DLNA server
Post by: Nessuno on 2012-04-14 18:08:57
It is extremely unlikely that you can hear a difference between the 16bit/44100 and 24bit/96000 files. But the proper way to find out is to perform a double blind test because it eliminates the placebo effect from your sound quality


@OP: consider that for such a test to have real value you should use the highest bitrate track and a properly downsampled version YOU make of the same: it is also possible that you actually hear differences between two different downloaded versions of the same track at different sampling rates simply because the seller has tweaked one of them to play different (e.g. louder @24/96) to increase perceived quality.
Title: Gapless playback with a Linux DLNA server
Post by: greynol on 2012-04-14 18:17:35
It's possible that two downloaded versions of the same track originated from different masters.  It's also possible that there are conversion problems with the hardware being used to audition the two versions.

However, none of this is relevant unless/until the OP is aware of our rules and our expectation that be followed.
Title: Gapless playback with a Linux DLNA server
Post by: Richard Kimber on 2012-04-14 18:54:12
What does that have to do with it? You made a claim, so you provide evidence for it. How is anyone else relevant? If this is your attempt to dodge a valid challenge to your unsubstantiated and, frankly, very unlikely claim, then it’s a terrible effort. Abide by the rules to which you agreed during registration in your posts, or don’t make them.

I just want to see what's passed the test.
What's wrong with that? It's all supposed to be public, and publicly verifiable isn't it?
Title: Gapless playback with a Linux DLNA server
Post by: greynol on 2012-04-14 19:00:08
Feel free to search the forum for ABX logs generated by foobar2000 as examples.

http://www.hydrogenaudio.org/forums/index.php?act=Search (http://www.hydrogenaudio.org/forums/index.php?act=Search)
Title: Gapless playback with a Linux DLNA server
Post by: Richard Kimber on 2012-04-14 21:09:58
Feel free to search the forum for ABX logs generated by foobar2000 as examples.

http://www.hydrogenaudio.org/forums/index.php?act=Search (http://www.hydrogenaudio.org/forums/index.php?act=Search)

Thank you for your help.  I tried that, but just got a whole series of general links.  Can you point me to just one double blind result that I can look at?
Title: Gapless playback with a Linux DLNA server
Post by: greynol on 2012-04-14 21:49:11
http://www.hydrogenaudio.org/forums/index....lite=%2Bfoo_abx (http://www.hydrogenaudio.org/forums/index.php?act=Search&CODE=show&searchid=fbf4c1496693b54f09bd96981fcc1533&search_in=posts&result_type=posts&highlite=%2Bfoo_abx)

A whole sub-forum dedicated to the topic:
http://www.hydrogenaudio.org/forums/index.php?showforum=40 (http://www.hydrogenaudio.org/forums/index.php?showforum=40)
Title: Gapless playback with a Linux DLNA server
Post by: Roseval on 2012-04-14 21:50:16
Gapless
First of all the audio format must support is.
FLAC does and as far as I know MP3 doesn’t
Secondly the media player must support it.
As far as I know, gapless playback is not part of the DLNA standard.

A simple solution to get gapless playback is to rip to single file +cue sheet.
This assumes you’re media player supports cue sheets.
Don’t know if this is the case with DLNA
Title: Gapless playback with a Linux DLNA server
Post by: db1989 on 2012-04-14 22:52:48
What does that have to do with it? You made a claim, so you provide evidence for it. How is anyone else relevant? If this is your attempt to dodge a valid challenge to your unsubstantiated and, frankly, very unlikely claim, then it’s a terrible effort. Abide by the rules to which you agreed during registration in your posts, or don’t make them.
I just want to see what's passed the test.
What's wrong with that? It's all supposed to be public, and publicly verifiable isn't it?
I read your post as being more about dodging the obligation that you provide evidence for your specific case. Of course there’s nothing wrong with what you’re saying here, and I hope you find the material interesting. I apologise if I seemed hostile. However, the main point raised by greynol and myself still stands, as well as the recently mentioned possibility that you were comparing apples to oranges.
Title: Gapless playback with a Linux DLNA server
Post by: julf on 2012-04-15 10:51:37
Thank you for your help.  I tried that, but just got a whole series of general links.  Can you point me to just one double blind result that I can look at?


For one random data point:  CA: Julf's Blog - Listening test (http://www.computeraudiophile.com/blogs/Listening-test-bits-and-kiloherz) and Listening Test Results (http://www.computeraudiophile.com/blogs/Listening-test-results)

I guess that limited test was one of the reasons for me getting thrown off CA...
Title: Gapless playback with a Linux DLNA server
Post by: Nessuno on 2012-04-15 11:47:13
I guess that limited test was one of the reasons for me getting thrown off CA...


So, correct me if I'm wrong, your point in issuing that test was not to show people plain and simple that they can't hear differences between different resampling of a same track, but that they attribute qualities to them in an apparently random way and so, in the end, demonstrating that if differencies exist, they are... well... different to every ear?

A sort of reductio ad absurdum, indeed... 
Title: Gapless playback with a Linux DLNA server
Post by: smok3 on 2012-04-15 12:06:28
to the original question: I find it amazing that no server/client playback tech is actually gapless natively, because this is not something that a user (or webmaster) is to hack around, should ne native (same thing now with html5 video).

For example i can easily write a script that will know what the next clip is (or possible next clips), but i can't really do anything sane with that info.
Title: Gapless playback with a Linux DLNA server
Post by: julf on 2012-04-15 12:10:15
So, correct me if I'm wrong, your point in issuing that test was not to show people plain and simple that they can't hear differences between different resampling of a same track, but that they attribute qualities to them in an apparently random way and so, in the end, demonstrating that if differencies exist, they are... well... different to every ear?


Well, originally I set out with the assumption that some people would actually be able to accurately identify at least the extremes, and I was curious about how accurately the "middle" ground could be identified. The +1 dB one and the MP3 file were there just as rough controls. But during the time I spent following CA while I was first preparing and then running the test, I came to realize that yes, it is all subjective. Unless you are a subjectivist, and then the subjective is the absolute.
Title: Gapless playback with a Linux DLNA server
Post by: Richard Kimber on 2012-04-15 13:25:37
What does that have to do with it? You made a claim, so you provide evidence for it. How is anyone else relevant? If this is your attempt to dodge a valid challenge to your unsubstantiated and, frankly, very unlikely claim, then it’s a terrible effort. Abide by the rules to which you agreed during registration in your posts, or don’t make them.
I just want to see what's passed the test.
What's wrong with that? It's all supposed to be public, and publicly verifiable isn't it?
I read your post as being more about dodging the obligation that you provide evidence for your specific case. Of course there’s nothing wrong with what you’re saying here, and I hope you find the material interesting. I apologise if I seemed hostile. However, the main point raised by greynol and myself still stands, as well as the recently mentioned possibility that you were comparing apples to oranges.

That's OK. And I accept your main point, in principle. In practice it's very hard to know how to go about devising a good test that would be acceptable to people. I doubt if I could persuade my wife to sit and listen to the same piece of music over and over again, and my friends would not be inclined to do so either, so any test I could do would involve just me.  If I can learn how to do streaming from the linux command line I could easily write an abx test program.  Maybe I'll have a go, but I only have copyrighted music so I couldn't publish the files.
Title: Gapless playback with a Linux DLNA server
Post by: Richard Kimber on 2012-04-15 13:47:02
Thank you for your help.  I tried that, but just got a whole series of general links.  Can you point me to just one double blind result that I can look at?


For one random data point:  CA: Julf's Blog - Listening test (http://www.computeraudiophile.com/blogs/Listening-test-bits-and-kiloherz) and Listening Test Results (http://www.computeraudiophile.com/blogs/Listening-test-results)

I guess that limited test was one of the reasons for me getting thrown off CA...

Thanks. Your experience highlights the problem of devising a good test. Once the files are published and others are invited to do the test it's not only hard to know whether they cheat by analysis of the file, but also unless they are very explicit about their equipment it's hard to tell whether they are listening to the files as intended (e.g. not resampled). One has the feeling that, short of an expensively funded research project in which a large number of people is tested in very controlled conditions, there is no practical way of anyone conducting a test that satisfies anyone but themselves.
Title: Gapless playback with a Linux DLNA server
Post by: Nessuno on 2012-04-15 14:17:43
If I can learn how to do streaming from the linux command line I could easily write an abx test program.


If you have ALSA installed, maybe aplay from CLI is what you are searching for.

Edit: julf is right, in fact I unconsciously read "playing" in place of "streaming"...
Title: Gapless playback with a Linux DLNA server
Post by: julf on 2012-04-15 14:17:48
If I can learn how to do streaming from the linux command line I could easily write an abx test program.


In what way/why do you need to *stream* from the command line (as opposed to just playing a file with mpg123 or something)?
Title: Gapless playback with a Linux DLNA server
Post by: julf on 2012-04-15 14:22:40
Your experience highlights the problem of devising a good test.


Not really. It highlights the problems involved in a purely on-line test where you have no control over what the test subjects do with the files. It is very easy to do one if you have the test subjects in a physical location where you can control the playback process.
Title: Gapless playback with a Linux DLNA server
Post by: greynol on 2012-04-15 17:30:00
http://www.hydrogenaudio.org/forums/index....showtopic=57406 (http://www.hydrogenaudio.org/forums/index.php?showtopic=57406)

http://www.hydrogenaudio.org/forums/index....showtopic=93853 (http://www.hydrogenaudio.org/forums/index.php?showtopic=93853)

...among many many other discussions about hi-res audio.

Anyway, my point wasn't to rehash the same old discussion; rather it's to help the OP feel better about a gapless solution that might not preserve the original bitdepth and samplerate of his files. If we're getting to the point where we're saying that because the tests can't show what is obvious during sighted listening then there must be something wrong with the test, then there is no point in continuing down that path.  As 2Bdecided suggested recently, there are better things to do than try to fix the world one audiophile at a time.  If we aren't going down that path and are getting through, then I think this was a worthwhile endeavor.
Title: Gapless playback with a Linux DLNA server
Post by: Richard Kimber on 2012-04-15 23:11:27
If I can learn how to do streaming from the linux command line I could easily write an abx test program.


In what way/why do you need to *stream* from the command line (as opposed to just playing a file with mpg123 or something)?

Well that way I know that the PC is not doing anything to the music.
Title: Gapless playback with a Linux DLNA server
Post by: db1989 on 2012-04-16 06:07:33
That just seems paranoid to me.

What kind of interference could be introduced by the presence of a GUI? How incompetently or subversively do you think media players, especially those offering relatively advanced features such as ABXing (e.g. foobar2000), are programmed?
Title: Gapless playback with a Linux DLNA server
Post by: greynol on 2012-04-16 06:17:19
That was my initial impression as well. However, it appears that the OP is interested in a Linux ABX solution and just wants to make sure that it is implemented properly.
Title: Gapless playback with a Linux DLNA server
Post by: julf on 2012-04-16 06:42:13
Well that way I know that the PC is not doing anything to the music.


Could you remind me  - what does your playback chain look like?
Title: Gapless playback with a Linux DLNA server
Post by: Nessuno on 2012-04-16 08:38:59
Well that way I know that the PC is not doing anything to the music.


Could you remind me  - what does your playback chain look like?


Let's try to summarize: the OP asked for a solution to gapless stream under Linux.
We proposed a possible solution, whose feasibility is jet to be verified, using Airplay.
He didn't find it suitable for his needs because, according to him: A) Airplay is limited to 16/44.1 and B) he can hear differencies between two tracks at 16/44.1 and at 24/96.

Regarding A: no evidence has been found that Airplay as a protocol has such a limitation. Being only a transport layer, very likely this characteristic is left to be defined by the specific implementation. The OP has to try if and how it works for him. That's all about the gapless and streaming issues.

Regarding B: as far as we know, there is not in the world a single objective proof that a human ear can differentiate between two musical tracks whose only difference is in bitdepth and/or sampling frequency when both are above Redbook standards. This has nothing to do with issue A).
If the OP wants to try for himself, he has to set up an ABX test, doing it as simple as possible and so not complicating it with streaming issues: if he states B) this means at least that he already has the possibility to listen to 24/96 materials natively with his hardware. Because he is running Linux, a possible way to setup a simple and fast ABX test is to use aplay and a few bash lines: as far as I know, ALSA can be configured to be bitperfect and aplay can pipe a bitstream (for example the output of a flac CLI executable) directly to the sound hardware.

No rocket science involved here, or so it seems to me... 
Title: Gapless playback with a Linux DLNA server
Post by: Richard Kimber on 2012-04-16 12:31:26
That just seems paranoid to me.

What kind of interference could be introduced by the presence of a GUI? How incompetently or subversively do you think media players, especially those offering relatively advanced features such as ABXing (e.g. foobar2000), are programmed?

Most players play through the sound card and rarely offer a facility to bypass it. The sound card resamples everything to a default sample rate. The sounds cards on computers are not that good. It's nothing to do with the GUI.  I'm surprised I have to explain that.
Title: Gapless playback with a Linux DLNA server
Post by: Richard Kimber on 2012-04-16 13:11:43
Quote from: nessuno link=msg=0 date=
Regarding A: no evidence has been found that Airplay as a protocol has such a limitation. Being only a transport layer, very likely this characteristic is left to be defined by the specific implementation. The OP has to try if and how it works for him. That's all about the gapless and streaming issues.

Yes we've already been over this:  I mis-interpreted a posting from another forum, and given that I've not come across any non-16bit implementations I thought that was the limit.  More importantly, I've not (yet) been able to get Airplay working on my Linux machine with the N-50, so maybe that won't be a solution anyway.

Quote
If the OP wants to try for himself, he has to set up an ABX test, doing it as simple as possible and so not complicating it with streaming issues: if he states B) this means at least that he already has the possibility to listen to 24/96 materials natively with his hardware.

Yes.  I can stream 24/96, though not gaplessly.  In fact I find streaming more convenient, and in the long run if I can do it gaplessly that's how I shall play stuff, apart from CDs.

Quote
Because he is running Linux, a possible way to setup a simple and fast ABX test is to use aplay and a few bash lines: as far as I know, ALSA can be configured to be bitperfect and aplay can pipe a bitstream (for example the output of a flac CLI executable) directly to the sound hardware.

Yes, well I may end up doing this.  But I was really looking for a gapless streaming solution.
Title: Gapless playback with a Linux DLNA server
Post by: Richard Kimber on 2012-04-16 13:29:41
Well that way I know that the PC is not doing anything to the music.

Could you remind me  - what does your playback chain look like?

There are two methods:
  Music on HD
  miniDLNA, or a player that goes through PulseAudio/Alsa
thence to:
  Pioneer N-50
  Audiolab 8200A
  Audiolab 8200P
  Quad ESL 2805
I normally use an Audiolab MDAC for listening (it sounds better for most music - no I've not done a double blind test  ), but I wouldn't use that for any tests, as I don't think you can defeat the upsampling. The Pioneer has a method of switching off its upsampling.
Title: Gapless playback with a Linux DLNA server
Post by: julf on 2012-04-16 16:18:43
I normally use an Audiolab MDAC for listening (it sounds better for most music - no I've not done a double blind test  ), but I wouldn't use that for any tests, as I don't think you can defeat the upsampling. The Pioneer has a method of switching off its upsampling.


OK, but i don't see why you need streaming for the tests.
Title: Gapless playback with a Linux DLNA server
Post by: greynol on 2012-04-16 16:34:58
...well, no, that was not ok.
Title: Gapless playback with a Linux DLNA server
Post by: phofman on 2012-04-16 19:13:13
Most players play through the sound card and rarely offer a facility to bypass it.


In linux players play through alsa library (libasound) which offers flexible routing of their signal. 

Quote
The sound card resamples everything to a default sample rate.


Only older Creative soundcards and old AC97 cards resample everything to 48kHz, otherwise samplerate change is a functionality of the user-space playback chain, in linux easily configurable.
Title: Gapless playback with a Linux DLNA server
Post by: Wolwgang on 2012-05-17 20:40:30
Virtually all the music I buy now comes in the form of downloaded flac files.  These have no cue sheets with them.

Some of the music needs to be played gaplessly, and I'm under the impression that flac files + cue sheets is a solution to this.  If this is so, can anyone recommend a linux program that would enable me to generate cue sheets from the flac files on my hard disk?  I have seen software that creates cue files from music on a CD, but I can't find anything that does it from a folder of flac files on the hard disk.



Hi Kimber; guys;
I just got the Pioneer N50 and I know from Pioneer that gapless playback was out of their hands, at least for the time being, I hope they update this one day.
I have another much troubling issue with the player; it doesn't play FLAC files in sequential manner, the tracks are out of order most of the time. This is a problem with classical music as you can't listen to a symphony as if you are using shuffle play....

The problem doesn't exist with WAV files and is much less apparant if you use the front USB for my hard drive, it is very annoying when using DLNA, and as this is the better sound quality it is disturbing me so much, I can't change my >500GB music to WAV....
Any idea of a solution for this??? I wrote to pioneer but of course they never answered....