Home of the Squeezebox™ & Transporter® network music players.
Page 3 of 8 FirstFirst 12345 ... LastLast
Results 21 to 30 of 73
  1. #21
    Senior Member
    Join Date
    Dec 2009
    Location
    Albinea (RE) Italy
    Posts
    729
    Quote Originally Posted by pippin View Post
    WAV is a file type (and not a well standardized one), not a stream container. What LMS streams is raw PCM, it's similar e.g. with AIFF, I believe.
    Wav is a standard file format, born for microsoft systems.

    Like AIFF (his counterpart for apple) is pure, uncompressed PCM plus an header that MUST contain information about the file itself and could contain tags. Is not in any way an "Audiofool" format,

    SB - in reality - is NOT streaming 'raw' pcm, but is sending the wav or aiff file instead - don't ask me why - under the 'pcm' format name.
    So the client receiving the stream could actually investigate it, but this result in a violation of the rules, since wav should not be streamed.
    I think this is actually causing some pop and click at the beginning of the song.

    Here - to be precise - SB is actually wrong, but the only reason why was developed the protocol extension that use strm_s to send 'real' information about the incoming stream to the clients is because using pcm they MUST NOT investigate the stream and thisi is like that just and only for PCM, flac don't need this.

    So why we have this in SB Server? Because is the only way to correctly stream pcm in different samplerate, samplesize, channels, allignement and bitorder. That's all, no audiofool matter here, just a development matter of broken functionalities.

    Did not want to be rude, but clear.
    __________________________________________________ ______________________
    Author of C-3PO plugin, Squeezelite-R2, Falcon Web interface - See www.marcoc1712.it

  2. #22
    Senior Member Julf's Avatar
    Join Date
    Dec 2010
    Posts
    2,509
    Quote Originally Posted by marcoc1712 View Post
    Wav is a standard file format, born for microsoft systems.
    Depends on your definition of "standard". It is a manufacturer-specific convention that hasn't been adopted by any standards organisation.

    Like AIFF (his counterpart for apple) is pure, uncompressed PCM plus an header that MUST contain information about the file itself and could contain tags.
    But unlike AIFF, WAV doesn't actually define the tag format. Different programs have adopted different conventions - one popular one just re-uses the mp3 file format specifications.

    Is not in any way an "Audiofool" format
    The only reason anyone still uses it, despite it being an arcane and primitive format, is either because they have almost no CPU capacity available to decode any more sophisticated standard, or because of audiophile folklore/hearsay.

    Did not want to be rude, but clear.
    Likewise.
    "To try to judge the real from the false will always be hard. In this fast-growing art of 'high fidelity' the quackery will bear a solid gilt edge that will fool many people" - Paul W Klipsch, 1953

  3. #23
    Senior Member
    Join Date
    Dec 2009
    Location
    Albinea (RE) Italy
    Posts
    729
    Quote Originally Posted by Mnyb View Post
    So if the WAV file is scanned it works , thanks for explaining why it has to be scanned .

    So it actually streams raw PCM not WAV is it not a slight difference here ? , but there is probably a reason for this too and was this not changed many moons back .
    That's wrong, is not like that.

    Quote Originally Posted by Mnyb View Post
    But as op explained it only affects folder browsing to a new unscannned file . So just scan the files then problem solved.
    Someone, not me, could argue that was like that BEFORE and now is broken...

    Quote Originally Posted by Mnyb View Post
    In the OP's personal use case ? Yeah right , but we should keep that in the audiophile sub forum , not a bug dev tread .
    It's a development bug, You could think is not important to you, but its a development bug, Where is in any matter an 'audiophool' opinion? Please, try to explain it to me...


    Quote Originally Posted by Mnyb View Post
    And I just don't think LMS should handle things differently regardless on which menu you use.

    But if you are right it can not be handled without a scan so this becomes a circle argument . So scan your files . And WAV will work regardless of what we think about it
    Ehmmm... I've just reported exactly this bug... What's added by this?

    Anyhow, I think the solution might cost less than the time spent in this discussion, as already happened with cue files... If Michael would like to look at this and needs or just would appreciate my help I'm here, just ask.
    __________________________________________________ ______________________
    Author of C-3PO plugin, Squeezelite-R2, Falcon Web interface - See www.marcoc1712.it

  4. #24
    Senior Member
    Join Date
    Dec 2009
    Location
    Albinea (RE) Italy
    Posts
    729
    Quote Originally Posted by Julf View Post
    Depends on your definition of "standard". It is a manufacturer-specific convention that hasn't been adopted by any standards organisation.



    But unlike AIFF, WAV doesn't actually define the tag format. Different programs have adopted different conventions - one popular one just re-uses the mp3 file format specifications.



    The only reason anyone still uses it, despite it being an arcane and primitive format, is either because they have almost no CPU capacity available to decode any more sophisticated standard, or because of audiophile folklore/hearsay.



    Likewise.
    From Wikipedia: Waveform Audio File Format (WAVE, or more commonly known as WAV due to its filename extension)[3][6][7][8] (rarely, Audio for Windows[9]) is a Microsoft and IBM audio file format standard for storing an audio bitstream on PCs.

    We are not talking about tagging, are we?

    That's your opinion, could mine be different? What about people that use apple systems that don't support flac at all? In my opinion, if someone want to use compressed audio format, we have many better solutions than flac, but this is my opinion and is not the actual matter of this THD, I belive.
    __________________________________________________ ______________________
    Author of C-3PO plugin, Squeezelite-R2, Falcon Web interface - See www.marcoc1712.it

  5. #25
    Senior Member Julf's Avatar
    Join Date
    Dec 2010
    Posts
    2,509
    Quote Originally Posted by marcoc1712 View Post
    From Wikipedia: Waveform Audio File Format (WAVE, or more commonly known as WAV due to its filename extension)[3][6][7][8] (rarely, Audio for Windows[9]) is a Microsoft and IBM audio file format standard for storing an audio bitstream on PCs.
    Last time I checked, Microsoft and IBM were vendors, not standards organisations.

    We are not talking about tagging, are we?
    I think you were:

    Like AIFF (his counterpart for apple) is pure, uncompressed PCM plus an header that MUST contain information about the file itself and could contain tags.
    That's your opinion, could mine be different?
    There are as many opinions as there are people on this planet. That doesn't mean they are all right.

    What about people that use apple systems that don't support flac at all? In my opinion, if someone want to use compressed audio format, we have many better solutions than flac, but this is my opinion and is not the actual matter of this THD, I belive.
    We are not debating which compressed file format is the best. I am OK with almost any lossless compressed file format that supports standard format for metadata. LMS supports many popular formats, so there is really no reason to use something as primitive as wav.
    "To try to judge the real from the false will always be hard. In this fast-growing art of 'high fidelity' the quackery will bear a solid gilt edge that will fool many people" - Paul W Klipsch, 1953

  6. #26
    Senior Member
    Join Date
    Dec 2009
    Location
    Albinea (RE) Italy
    Posts
    729

    Solution to Upsample Wav files runtime

    Hi,

    If someone is interested it seems I've found a working solution to let LMS upsample wav files and send them to squeezelite (or local player) ready to be played. Of course - if valid - will solve also the previous mentioned problem.

    DISCLAIMER: I've not tested the solution in every environment (I could compile squeezelite just for linux) and now I could try it only in the same machine of the server. Monday I'll test it in some more configurations, but I think could be the way to go.

    There is no needs of code modifications in LMS, even if in some point some 'default value' is settled to 44100 Hz and 16 bit, causing some confusion but not real limits, since there is no 'real' link between what is in the stream and what is said to be there by strm_s command, sure is not that elegant, but... works.

    Taking advantage of the fact that LMS is no sending real, raw PCM, but wav or aif 'marked' as PCM, so the header is still there, you could read it and verify the real format of the stream, as for 'real' files. To let squeezelite work this way, you just have to modify a single line of code:

    in pcm.c , line 170:

    if (decode.new_stream && stream.state == STREAMING_FILE) {
    _check_header();
    }

    become:

    if (decode.new_stream) {
    _check_header();
    }

    Some more investigation and test is needed, but I think it's safe.

    I think this solution is ideal for situation where the player is a very tiny hw (i.e. some router or other embedded devices), you can save it even the format conversion duty.

    If Michael or someone else would investigate or like help me in testing and maybe discuss some little adjustment in LMS code, just ask, sure I'm not going to mantain and distribute an alternate version of squeezelite for this.

    Marco.
    __________________________________________________ ______________________
    Author of C-3PO plugin, Squeezelite-R2, Falcon Web interface - See www.marcoc1712.it

  7. #27
    Senior Member pippin's Avatar
    Join Date
    Oct 2007
    Location
    Berlin
    Posts
    14,669
    Quote Originally Posted by marcoc1712 View Post
    SB - in reality - is NOT streaming 'raw' pcm, but is sending the wav or aiff file instead - don't ask me why - under the 'pcm' format name.

    I think this is actually causing some pop and click at the beginning of the song.
    I'm pretty sure that's not true. The player has no decoding for that so if it does it certainly will play nonsense since it will interpret your header as audio data.
    If it does, you have found another bug, the header should be stripped, the player does not interpret it.
    This is why using WAV the player needs to be instructed by the server about the exact stream format. Which it can't if you haven't scanned the file before.

    So the client receiving the stream could actually investigate it, but this result in a violation of the rules, since wav should not be streamed.
    There is no such rule. It's just the default setting that LMS transcodes to FLAC. The reason for this is that this way you can avoid a lot of issues. Such as the one discussed here.
    With FLAC there's a container transporting metadata about the stream which is being used by the player to update the stream information if the stream is different from what the server told the player it would be. Something quite common e.g. for remote streaming where information is often not known.
    This is why remote streaming of lossless data is also broken if you try to transcode to PCM on the server side.

    So why we have this in SB Server? Because is the only way to correctly stream pcm in different samplerate, samplesize, channels, allignement and bitorder. That's all, no audiofool matter here, just a development matter of broken functionalities.
    The "audiofool" thing is something you said, not me.
    I just point out that PCM is a bad format for streaming. Because it causes issues like this. And because it increases system load which causes more problems.
    And I am indeed mocking the "audiophiles" using the format for streaming because of the reasons they are bringing forward of why they are using PCM instead of FLAC. Such as that it would create less load which is a) irrelevant and b) wrong. All you get is trouble...

    In this thread alone you have already found that using PCM streaming causes some files to not play at all and breaks gapless playback. And all that just to achieve something that is - sorry - pure voodoo. Compare that to leaving LMS at it's default settings in which case it just works fine and gives you the best possible SQ.

    Quote Originally Posted by marcoc1712 View Post
    If someone is interested it seems I've found a working solution to let LMS upsample wav files and send them to squeezelite (or local player) ready to be played. Of course - if valid - will solve also the previous mentioned problem.
    You aren't serious, aren't you?
    This is spells trouble.
    What do you upsample to? 192kHz? So most players will no longer play at all.
    96kHz? Same. Most players only support 48kHz sample rate.

    Even IF the player supports it you now create an awful lot of completely unnecessary load on the server side plus an awful lot of network load. If you are ever concerned about load causing any sound quality issues you've now really spoilt your system.

    I think this solution is ideal for situation where the player is a very tiny hw (i.e. some router or other embedded devices), you can save it even the format conversion duty.
    See, that's what I mean. Now you are doing it too. There is no "format conversion duty". This is a myth, the actual load for processing PCM is higher than for decoding FLAC. People have measured this.
    The reason is that with FLAC you only have to process half the data, the actual FLAC decoding algorithm is very efficient by comparison.
    Now you even recommend upsampling, something that would further increase the amount of data easily some 7-fold (in the case of 192/24 vs. 44.1/16) or even 14-fold (compared to 44.1/16 FLAC).
    You are now using more bandwidth than an HD video stream just to play CD quality audio, that needs a lot of processing power on your client side plus all buffers fill up much faster increasing your chance of dropouts and increasing load in your network stack.
    Worst case you are even using WiFi in which case you now have to run all that data not only through the whole network protocol stack but also through a strong encryption that requires way more processing power than simple FLAC.

    Taking advantage of the fact that LMS is no sending real, raw PCM, but wav or aif 'marked' as PCM, so the header is still there, you could read it and verify the real format of the stream, as for 'real' files. To let squeezelite work this way, you just have to modify a single line of code:
    That will only work for SqueezeLite. Also: did you test it? Are you sure SqueezeLite has code to decode WAV and AIFF headers? SqueezePlay hasn't, it only decodes icy metadata or lets the decoder (FLAC, MP3, AAC,...) handle the header processing.
    Last edited by pippin; 2015-08-29 at 18:13.
    ---
    learn more about iPeng, the iPhone and iPad remote for the Squeezebox and
    Logitech UE Smart Radio as well as iPeng Party, the free Party-App,
    at penguinlovesmusic.com
    New: iPeng 9, the Universal App for iPhone, iPad and Apple Watch

  8. #28
    Senior Member Mnyb's Avatar
    Join Date
    Feb 2006
    Location
    Vństerňs Sweden
    Posts
    16,525
    Pippin this uppsamling thing has been goin on for years over at the audiophile forum you don't go there as offen as I do which is a very healthy thing.

    Why ? Note this is not my opinoins , you can poke a hole in these arguments any time

    Some don't trust the upsampling your DAC is doing anyway ,they usually do that.

    They are using NOS DAC without any filter , a special kind of broken dac for audiophiles the only way to make them sound half decent is to feed them their maximum sample rate.

    Appodising filters the new black among the true believers .

    What they really do in most case nothing audible in some cases they abuse SoX parameters to the extend that i does sound different ! For example a fillter that impacts the treble starting from 10k or somesuch . A resource intensive tone control.

    There is one reasonableuse case EQ and room compensation done by the server , you can choose to pipe the result directly to players .

    But most people doing this are quite happy to do this resulting in a flac stream especially if the player actually handles flac .
    --------------------------------------------------------------------
    Main hifi: Rasbery PI digi+ MeridianG68J MeridianHD621 MeridianG98DH 2 x MeridianDSP5200 MeridianDSP5200HC 2 xMeridianDSP3100 +Rel Stadium 3 sub.
    Bedroom/Office: Boom
    Loggia: Raspi hifiberry dac + Adams
    Bathroom : Radio (with battery)
    iPad with iPengHD & SqueezePad
    (spares Touch, SB3, reciever ,controller )
    server Intel NUC Esxi VM Linux mint 18 LMS 7.9.2

    http://people.xiph.org/~xiphmont/demo/neil-young.html

  9. #29
    Senior Member
    Join Date
    Oct 2005
    Location
    Ireland
    Posts
    17,914
    Quote Originally Posted by marcoc1712 View Post
    So the client receiving the stream could actually investigate it, but this result in a violation of the rules, since wav should not be streamed.
    WAV header has a file length field which meant originally a WAV file had a maximum time (with 441/16) of about 2.5hrs (I think). In the last few years the definition of the length field has been updated so that a value of zero means this is unlimited/undetermined i.e. streamed wav.

  10. #30
    Senior Member pippin's Avatar
    Join Date
    Oct 2007
    Location
    Berlin
    Posts
    14,669

    Disk and folder browsing

    Quote Originally Posted by Mnyb View Post
    Pippin this uppsamling thing has been goin on for years over at the audiophile forum you don't go there as offen as I do which is a very healthy thing.
    Yea, but that's a different story. Up sampling because you think your DAC sounds better if you do is one thing (I do understand people believe crappy designed DACs sound better for some weird reason).
    But this is about fixing an issue in a rare situation that's caused by using bad server settings through brute-forcing tons of load on your system for every playback...

    With this, you'd be fixing what's a non-issue for 99.9% of users by recommending to do something that's very likely to cause issues for a significant number of users, I hope no beginner ever reads this
    ---
    learn more about iPeng, the iPhone and iPad remote for the Squeezebox and
    Logitech UE Smart Radio as well as iPeng Party, the free Party-App,
    at penguinlovesmusic.com
    New: iPeng 9, the Universal App for iPhone, iPad and Apple Watch

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •