Skip to main content

Notice

Please note that most of the software linked on this forum is likely to be safe to use. If you are unsure, feel free to ask in the relevant topics, or send a private message to an administrator or moderator. To help curb the problems of false positives, or in the event that you do find actual malware, you can contribute through the article linked here.
Topic: Gapless playback with a Linux DLNA server (Read 34342 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Gapless playback with a Linux DLNA server

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.

Gapless playback with a Linux DLNA server

Reply #1
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.)

Gapless playback with a Linux DLNA server

Reply #2
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 and its cue mode.

Gapless playback with a Linux DLNA server

Reply #3
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.

Gapless playback with a Linux DLNA server

Reply #4
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.

Gapless playback with a Linux DLNA server

Reply #5
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 

Gapless playback with a Linux DLNA server

Reply #6
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)?

Gapless playback with a Linux DLNA server

Reply #7
Some googling suggested that cue sheets were the answer

Maybe, *IF* also using a single audio file per album.

Gapless playback with a Linux DLNA server

Reply #8
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.

Gapless playback with a Linux DLNA server

Reply #9
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.

Gapless playback with a Linux DLNA server

Reply #10
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?

Gapless playback with a Linux DLNA server

Reply #11
I did a search for "gapless DLNA" and found this thread on our site:
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

Gapless playback with a Linux DLNA server

Reply #12
I did a search for "gapless DLNA" and found this thread on our site:
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.

Gapless playback with a Linux DLNA server

Reply #13
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

Gapless playback with a Linux DLNA server

Reply #14
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
Pioneer can´t offer gapless due to chipset limitations for Airplay.
Is troll-adiposity coming from feederism?
With 24bit music you can listen to silence much louder!

Gapless playback with a Linux DLNA server

Reply #15
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.

Gapless playback with a Linux DLNA server

Reply #16
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.
Is troll-adiposity coming from feederism?
With 24bit music you can listen to silence much louder!

Gapless playback with a Linux DLNA server

Reply #17
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.

Gapless playback with a Linux DLNA server

Reply #18
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.


Gapless playback with a Linux DLNA server

Reply #20
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.
... I live by long distance.

Gapless playback with a Linux DLNA server

Reply #21
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.
Is troll-adiposity coming from feederism?
With 24bit music you can listen to silence much louder!

Gapless playback with a Linux DLNA server

Reply #22
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... 
... I live by long distance.

Gapless playback with a Linux DLNA server

Reply #23
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.

Gapless playback with a Linux DLNA server

Reply #24
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.
Is troll-adiposity coming from feederism?
With 24bit music you can listen to silence much louder!