Home of the Squeezebox™ & Transporter® network music players.
Page 21 of 56 FirstFirst ... 11192021222331 ... LastLast
Results 201 to 210 of 554
  1. #201
    Senior Member
    Join Date
    Dec 2009
    Location
    Albinea (RE) Italy
    Posts
    816
    Quote Originally Posted by PasTim View Post
    Something is not quite right with C-3PO, 24 bits, pcm/wav and Squeezebox Touch acting as a digital (USB) interface to my player.

    1. Without C-3PO installed, with LMS FILE TYPES only allowing flc to pcm, all my flacs play well up to 24/192000 tracks.

    2. With C-3PO installed but not enabled for Touch, all is still OK. C-3PO reports the command (for a 24/192000 track) as:

    Code:
    flc-pcm-*-00:04:20:22:70:65
    Command:
    [flac] -dcs --force-raw-format --endian=little --sign=signed $START$ $END$ -- $FILE$
    
    Tokenized command:
    "/usr/share/squeezeboxserver/Bin/x86_64-linux/flac" -dcs --force-raw-format --endian=little --sign=signed -- "/storage/music/flac/Classical/B/Bach, JS/Well Tempered Clavier/Book I/Butt/1-01 - The Well-Tempered Clavier Book I - Prelude and Fugue No.21 in Bâ™* BWV.866 - 1. Prelude.flac" & |
    4. Resetting the LMS FILE TYPES to standard, with C-3PO installed and activated for Touch, output wav only, with 3 byte 24 bit, I get white noise (music still there) on all tracks. This is a CD quaility one.

    Code:
    Command:
    [C-3PO] -c $CLIENTID$ -p "/var/lib/squeezeboxserver/prefs/plugin/C3PO.prefs" -l "/var/log/squeezeboxserver/" -x "/usr/sbin" -i flc -o wav $START$ $END$ $RESAMPLE$ $FILE$ --nodebuglog --noinfolog
    
    Tokenized command:
    "/var/lib/squeezeboxserver/cache/InstalledPlugins/Plugins/C3PO/Bin/C-3PO" -c 00-04-20-22-70-65 -p "/var/lib/squeezeboxserver/prefs/plugin/C3PO.prefs" -l "/var/log/squeezeboxserver/" -x "/usr/sbin" -i flc -o wav "/storage/music/flac/Classical/B/Bruckner/Symphonies/7 (Nowak)/Klemperer/3-01 - Symphony No.7 in E (Nowak) - 1. Allegro moderato.flac" --nodebuglog --noinfolog & |
    
    Trasformed by C-3PO in:
    "/usr/share/squeezeboxserver/Bin/x86_64-linux/sox" -q -t flac "/storage/music/flac/Classical/B/Bruckner/Symphonies/7 (Nowak)/Klemperer/3-01 - Symphony No.7 in E (Nowak) - 1. Allegro moderato.flac" -t wav -b 24 --buffer 65536 --multi-threaded - gain -h
    5. With C-3PO installed and activated for Touch, wav only, 16 bit, CD quality plays OK, 24/192000 tracks get white noise (some music still there)

    Code:
    Command:
    [C-3PO] -c $CLIENTID$ -p "/var/lib/squeezeboxserver/prefs/plugin/C3PO.prefs" -l "/var/log/squeezeboxserver/" -x "/usr/sbin" -i flc -o wav $START$ $END$ $RESAMPLE$ $FILE$ --nodebuglog --noinfolog
    
    Tokenized command:
    "/var/lib/squeezeboxserver/cache/InstalledPlugins/Plugins/C3PO/Bin/C-3PO" -c 00-04-20-22-70-65 -p "/var/lib/squeezeboxserver/prefs/plugin/C3PO.prefs" -l "/var/log/squeezeboxserver/" -x "/usr/sbin" -i flc -o wav "/storage/music/flac/Classical/B/Bach, JS/Well Tempered Clavier/Book I/Butt/1-01 - The Well-Tempered Clavier Book I - Prelude and Fugue No.21 in Bâ™* BWV.866 - 1. Prelude.flac" --nodebuglog --noinfolog & |
    
    Trasformed by C-3PO in:
    "/usr/share/squeezeboxserver/Bin/x86_64-linux/sox" -q -t flac "/storage/music/flac/Classical/B/Bach, JS/Well Tempered Clavier/Book I/Butt/1-01 - The Well-Tempered Clavier Book I - Prelude and Fugue No.21 in Bâ™* BWV.866 - 1. Prelude.flac" -t wav -b 16 --buffer 65536 --multi-threaded - gain -h
    6. So I believe that C-3PO is missing options to match different versions of 3 byte 24 bit packing. I’ve had this problem with other plugins transcoding. I think the sox options are -L, -B , -x, -N and -X, but can't say I fully understand all the combinations of input and output format.

    7. Using C-3PO to output uncompressed flac works fine, so this isn't a problem for me, but it could be for others.
    Not sure to completely understand the problem, from what I could see sox with -b 16 works, -b 24 does not. If so, problem could be that your device is 24_3 not 24, meaning in reality is a 32 bit depth but only the most significant 24 is used. In that case yu should output 32 bit from SOX.

    Please tell me if I misunderstood something.
    __________________________________________________ ______________________
    Author of C-3PO plugin, Squeezelite-R2, Falcon Web interface - See www.marcoc1712.it

  2. #202
    Senior Member
    Join Date
    Nov 2010
    Location
    Hertfordshire, UK
    Posts
    3,067
    Quote Originally Posted by marcoc1712 View Post
    Not sure to completely understand the problem, from what I could see sox with -b 16 works, -b 24 does not. If so, problem could be that your device is 24_3 not 24, meaning in reality is a 32 bit depth but only the most significant 24 is used. In that case yu should output 32 bit from SOX.

    Please tell me if I misunderstood something.
    My limited understanding is that the 3 bytes can be in a different order, depending on the device. In the wrong order you get noise. So to be able to suit all devices you need to support different 'endian' options. See this from the sox 'man':


    -L, --endian little
    -B, --endian big
    -x, --endian swap
    These options specify whether the byte-order of the audio data is, respectively, 'little endian', 'big endian', or the opposite to that of the system on which SoX is being used. Endianness applies only to data encoded as signed or unsigned integers of 16 or more bits. It is often necessary to specify one of these options for headerless files, and sometimes necessary for (otherwise) self-describing files. A given endian-setting option may be ignored for an input file whose header contains a specific endianness identifier, or for an output file that is actually an audio device.
    N.B. Unlike normal format characteristics, the endianness (byte, nibble, & bit ordering) of the input file is not automatically used for the output file; so, for example, when the following is run on a little-endian system:
    sox -B audio.s2 trimmed.s2 trim 2
    trimmed.s2 will be created as little-endian;
    sox -B audio.s2 -B trimmed.s2 trim 2
    must be used to preserve big-endianness in the output file.
    The -V option can be used to check the selected orderings.
    LMS 7.9.3 on PC, Xubuntu 18.04, FLACs 16->24 bit, 44.1->192kbps. 2 Touchs & EDO.
    LMS plugin UPnP/DLNA Bridge to MF M1 CLiC (A308CR amp & ESLs) & Marantz CR603 UPnP renderers.
    Also Minimserver & Upplay to same & to upmpdcli/mpd PC renderers.
    Squeezelite to Meridian USB Explorer DAC to PC speakers/headphones.
    Wireless Xubuntu 18.04 laptop firefox/upplay or Android 'phone with Squeeze-Commander/BubbleUPnP controls LMS/Minimserver.

  3. #203
    Senior Member
    Join Date
    Nov 2010
    Location
    Hertfordshire, UK
    Posts
    3,067
    Quote Originally Posted by PasTim View Post
    My limited understanding is that the 3 bytes can be in a different order, depending on the device. In the wrong order you get noise. So to be able to suit all devices you need to support different 'endian' options. See this from the sox 'man':


    -L, --endian little
    -B, --endian big
    -x, --endian swap
    These options specify whether the byte-order of the audio data is, respectively, 'little endian', 'big endian', or the opposite to that of the system on which SoX is being used. Endianness applies only to data encoded as signed or unsigned integers of 16 or more bits. It is often necessary to specify one of these options for headerless files, and sometimes necessary for (otherwise) self-describing files. A given endian-setting option may be ignored for an input file whose header contains a specific endianness identifier, or for an output file that is actually an audio device.
    N.B. Unlike normal format characteristics, the endianness (byte, nibble, & bit ordering) of the input file is not automatically used for the output file; so, for example, when the following is run on a little-endian system:
    sox -B audio.s2 trimmed.s2 trim 2
    trimmed.s2 will be created as little-endian;
    sox -B audio.s2 -B trimmed.s2 trim 2
    must be used to preserve big-endianness in the output file.
    The -V option can be used to check the selected orderings.
    I managed to get a custom-convert to work for this, albeit in a limited way. The entry I made was:

    Code:
    flc pcm * 00:04:20:22:70:65
    	# FT:{START=--skip=%t}U:{END=--until=%v}D:{RESAMPLE=-r %d}
            [sox] -q -t flac $FILE$ -t wav -b 24 -B --buffer 65536 --multi-threaded -C 0 $RESAMPLE$  - gain -h rate -v -I -t -b 90.7 192000
    That worked for 16/44100, 24/9600 and 24/192000. I had to resample 16/44100 up before it would work without noise. I'd have preferred not to use 192000 (not a multiple), and using C-3PO would have more flexibility.

    Can I suggest that you could add 2 features that allow additional input sox parameters and additional output parameters - in my case I'd add -B as an output parameter and ensure the output was at least 48000 or higher, and then all would work (I think!). Such features would, of course, be at the user's risk. It would be easy for us to make mistakes and mess things up, but we could also get things to work in unusual circumstances, like mine.

    It would also be handy to allow the sox program location to be configurable (eg /usr/local/bin), so that C-3PO could use the revised one without fear of being overwritten. I tried editing the C-3PO prefs to do this, but the change got overwritten on each LMS restart.
    LMS 7.9.3 on PC, Xubuntu 18.04, FLACs 16->24 bit, 44.1->192kbps. 2 Touchs & EDO.
    LMS plugin UPnP/DLNA Bridge to MF M1 CLiC (A308CR amp & ESLs) & Marantz CR603 UPnP renderers.
    Also Minimserver & Upplay to same & to upmpdcli/mpd PC renderers.
    Squeezelite to Meridian USB Explorer DAC to PC speakers/headphones.
    Wireless Xubuntu 18.04 laptop firefox/upplay or Android 'phone with Squeeze-Commander/BubbleUPnP controls LMS/Minimserver.

  4. #204
    Senior Member
    Join Date
    Dec 2009
    Location
    Albinea (RE) Italy
    Posts
    816
    Quote Originally Posted by PasTim View Post
    I managed to get a custom-convert to work for this, albeit in a limited way. The entry I made was:

    Code:
    flc pcm * 00:04:20:22:70:65
    	# FT:{START=--skip=%t}U:{END=--until=%v}D:{RESAMPLE=-r %d}
            [sox] -q -t flac $FILE$ -t wav -b 24 -B --buffer 65536 --multi-threaded -C 0 $RESAMPLE$  - gain -h rate -v -I -t -b 90.7 192000
    That worked for 16/44100, 24/9600 and 24/192000. I had to resample 16/44100 up before it would work without noise. I'd have preferred not to use 192000 (not a multiple), and using C-3PO would have more flexibility.

    Can I suggest that you could add 2 features that allow additional input sox parameters and additional output parameters - in my case I'd add -B as an output parameter and ensure the output was at least 48000 or higher, and then all would work (I think!). Such features would, of course, be at the user's risk. It would be easy for us to make mistakes and mess things up, but we could also get things to work in unusual circumstances, like mine.

    It would also be handy to allow the sox program location to be configurable (eg /usr/local/bin), so that C-3PO could use the revised one without fear of being overwritten. I tried editing the C-3PO prefs to do this, but the change got overwritten on each LMS restart.

    Your line is imposing Big endianess, but before you wrote :


    With C-3PO installed but not enabled for Touch, all is still OK. C-3PO reports the command (for a 24/192000 track) as:

    Code:
    flc-pcm-*-00:04:20:22:70:65
    Command:
    [flac] -dcs --force-raw-format --endian=little --sign=signed $START$ $END$ -- $FILE$
    
    Tokenized command:
    "/usr/share/squeezeboxserver/Bin/x86_64-linux/flac" -dcs --force-raw-format --endian=little --sign=signed -- "/storage/music/flac/Classical/B/Bach, JS/Well Tempered Clavier/Book I/Butt/1-01 - The Well-Tempered Clavier Book I - Prelude and Fugue No.21 in
    Other than this, SOX is supposed to keep the endianess of the source file, if not forced to change, assuming that file is little endian, what happen if you play that file "native"?

    Not sure the problem is there, wav is pcm little endian, aiff is pcm big endian, we should not need to specify endianess in conversion when the pcm type is known. Endianess was there as a parameter in an very early release of C-3PO but i removed it becouse should not be necessary, sure I could restore it if this is the case.

    About sox, yoou'r right, but i'm thinking to include it directly or by option in C-3PO package (now the plugin installer could handle big pakages), to make thing simpler for users, just want be sure of licensing before.
    __________________________________________________ ______________________
    Author of C-3PO plugin, Squeezelite-R2, Falcon Web interface - See www.marcoc1712.it

  5. #205
    Senior Member
    Join Date
    May 2008
    Location
    Canada
    Posts
    6,070
    Just a bit more explanation on the 24 bits formats: https://wiki.multimedia.cx/index.php/PCM. You have another way to use 24 bits which seems to be used by various AV receiver, when they accept *raw* 24 bits (in other word, sending mime type audio/L24) and this is 24 bits packing. It's a "funny" way to re-pack 24 bits samples and that caused me a lot of headaches
    Last edited by philippe_44; 2018-08-30 at 09:28.
    LMS 7.9 on Pi 3B+ & Odroid-C2 - SqueezeAMP!, 5xRadio, 3xBoom, 4xDuet, 1xTouch, 1 SB3. Sonos PLAY:3, PLAY:5, Marantz NR1603, Foobar2000, ShairPortW, JRiver 21, 2xChromecast Audio, Chromecast v1 and v2, Squeezelite on Pi, Yamaha WX-010, AppleTV 4, Airport Express, GGMM E5, Riva 1 & 3

  6. #206
    Senior Member
    Join Date
    Nov 2010
    Location
    Hertfordshire, UK
    Posts
    3,067
    Quote Originally Posted by marcoc1712 View Post
    Your line is imposing Big endianess, but before you wrote :


    Other than this, SOX is supposed to keep the endianess of the source file, if not forced to change, assuming that file is little endian, what happen if you play that file "native"?

    Not sure the problem is there, wav is pcm little endian, aiff is pcm big endian, we should not need to specify endianess in conversion when the pcm type is known. Endianess was there as a parameter in an very early release of C-3PO but i removed it becouse should not be necessary, sure I could restore it if this is the case.
    As I understand it, some players use the DVD packing (see https://wiki.multimedia.cx/index.php/PCM#Byte_Order), which is stated to be Big Endian. I've had problems with this before, as philippe44 can recount. All I know is that with -B on the output side the music plays OK with sox. Why "[flac] -dcs --force-raw-format --endian=little --sign=signed $START$ $END$ -- $FILE$" worked I don't know.

    About sox, yoou'r right, but i'm thinking to include it directly or by option in C-3PO package (now the plugin installer could handle big pakages), to make thing simpler for users, just want be sure of licensing before.
    Sounds like a good idea.
    LMS 7.9.3 on PC, Xubuntu 18.04, FLACs 16->24 bit, 44.1->192kbps. 2 Touchs & EDO.
    LMS plugin UPnP/DLNA Bridge to MF M1 CLiC (A308CR amp & ESLs) & Marantz CR603 UPnP renderers.
    Also Minimserver & Upplay to same & to upmpdcli/mpd PC renderers.
    Squeezelite to Meridian USB Explorer DAC to PC speakers/headphones.
    Wireless Xubuntu 18.04 laptop firefox/upplay or Android 'phone with Squeeze-Commander/BubbleUPnP controls LMS/Minimserver.

  7. #207
    Senior Member
    Join Date
    Dec 2009
    Location
    Albinea (RE) Italy
    Posts
    816
    Quote Originally Posted by philippe_44 View Post
    Just a bit more explanation on the 24 bits formats: https://wiki.multimedia.cx/index.php/PCM. You have another way to use 24 bits which seems to be used by various AV receiver, when they accept *raw* 24 bits (in other word, sending mime type audio/L24) and this is 24 bits packing. It's a "funny" way to re-pack 24 bits samples and that caused me a lot of headaches
    Tanks for the link, I did not know about that before, I think the problem is here:

    24-bit linear PCM is stored in blocks. Each block is divided into two parts. The first part contains the most significant two bytes of each channel for two samples in big endian order:
    Is not clear to me why flac decoding works, where SOX does not unless you provvide the -B indication. More, I believe is working on SB becouse it receive just RAW PCM even if the (SOX) conversion is meant to produce a WAV file, this will probably broke any player looking to the file header, like Squeezelite-R2.
    __________________________________________________ ______________________
    Author of C-3PO plugin, Squeezelite-R2, Falcon Web interface - See www.marcoc1712.it

  8. #208
    Senior Member
    Join Date
    Dec 2009
    Location
    Albinea (RE) Italy
    Posts
    816
    Quote Originally Posted by PasTim View Post
    As I understand it, some players use the DVD packing (see https://wiki.multimedia.cx/index.php/PCM#Byte_Order), which is stated to be Big Endian. I've had problems with this before, as philippe44 can recount. All I know is that with -B on the output side the music plays OK with sox. Why "[flac] -dcs --force-raw-format --endian=little --sign=signed $START$ $END$ -- $FILE$" worked I don't know.
    Could you provvide me of that file for testing purpose, please?

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

  9. #209
    Senior Member
    Join Date
    Dec 2009
    Location
    Albinea (RE) Italy
    Posts
    816
    Quote Originally Posted by philippe_44 View Post
    Just a bit more explanation on the 24 bits formats: https://wiki.multimedia.cx/index.php/PCM. You have another way to use 24 bits which seems to be used by various AV receiver, when they accept *raw* 24 bits (in other word, sending mime type audio/L24) and this is 24 bits packing. It's a "funny" way to re-pack 24 bits samples and that caused me a lot of headaches
    Have you got any more specific description of that format?
    __________________________________________________ ______________________
    Author of C-3PO plugin, Squeezelite-R2, Falcon Web interface - See www.marcoc1712.it

  10. #210
    Senior Member
    Join Date
    Nov 2010
    Location
    Hertfordshire, UK
    Posts
    3,067
    Quote Originally Posted by marcoc1712 View Post
    Could you provvide me of that file for testing purpose, please?

    Marco
    These 24/192000 tracks are large - tens of MB.

    I've put it in https://www.dropbox.com/sh/1c4mfk3df...x4WWSn34a?dl=0

    Can you let me know when you have it.

    Thanks
    LMS 7.9.3 on PC, Xubuntu 18.04, FLACs 16->24 bit, 44.1->192kbps. 2 Touchs & EDO.
    LMS plugin UPnP/DLNA Bridge to MF M1 CLiC (A308CR amp & ESLs) & Marantz CR603 UPnP renderers.
    Also Minimserver & Upplay to same & to upmpdcli/mpd PC renderers.
    Squeezelite to Meridian USB Explorer DAC to PC speakers/headphones.
    Wireless Xubuntu 18.04 laptop firefox/upplay or Android 'phone with Squeeze-Commander/BubbleUPnP controls LMS/Minimserver.

Posting Permissions

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