Home of the Squeezebox™ & Transporter® network music players.
Page 1 of 2 12 LastLast
Results 1 to 10 of 15
  1. #1

    transcoding MP3 to 96k FLAC

    Hello All,

    I have a Yggdrasil DAC that to my ears is the best sounding DAC I have owned. The only problem I have with it is that when it changes to a different sampling rate it CLICKS and sometimes the first moment of the music is cut off. I've tried to live with it but the clickity clack of my playlists are getting under my skin.

    I would like to up-sample all music coming from my Transporter to 96k to avoid this annoyance. I found a configuration that works very nicely for FLAC, but MP3 and AAC (.m4a) elude me. Has anyone done this before? Here is what my custom-convert.conf looks like.

    flc flc * *
    # FT:{START=--skip=%t}U:{END=--until=%v}
    [flac] -dcs $START$ $END$ -- $FILE$ | [sox] -q -t wav - -t flac -e signed -C 0 -b 24 - rate -v -b 98 -L -a 96000

    mp3 flc * *
    [lame] --mp3input --decode -t --silent $FILE$ - | [sox] -q -t wav - -t flac -e signed -C 0 -b 24 - rate -v -b 98 -L -a 96000

    aac flc * *
    # IF
    [faad] -q -w -f 1 $FILE$ | [sox] -q -t wav - -t flac -e signed -C 0 -b 24 - rate -v -b 98 -L -a 96000


    Any advice is appreciated. Thanks for the help!

    Regards,
    Ernie

  2. #2
    Senior Member
    Join Date
    Feb 2011
    Location
    Cheshire, UK
    Posts
    6,217
    Quote Originally Posted by socialxray View Post
    Hello All,

    I have a Yggdrasil DAC that to my ears is the best sounding DAC I have owned. The only problem I have with it is that when it changes to a different sampling rate it CLICKS and sometimes the first moment of the music is cut off. I've tried to live with it but the clickity clack of my playlists are getting under my skin.

    I would like to up-sample all music coming from my Transporter to 96k to avoid this annoyance. I found a configuration that works very nicely for FLAC, but MP3 and AAC (.m4a) elude me. Has anyone done this before? Here is what my custom-convert.conf looks like.

    flc flc * *
    # FT:{START=--skip=%t}U:{END=--until=%v}
    [flac] -dcs $START$ $END$ -- $FILE$ | [sox] -q -t wav - -t flac -e signed -C 0 -b 24 - rate -v -b 98 -L -a 96000

    mp3 flc * *
    [lame] --mp3input --decode -t --silent $FILE$ - | [sox] -q -t wav - -t flac -e signed -C 0 -b 24 - rate -v -b 98 -L -a 96000

    aac flc * *
    # IF
    [faad] -q -w -f 1 $FILE$ | [sox] -q -t wav - -t flac -e signed -C 0 -b 24 - rate -v -b 98 -L -a 96000


    Any advice is appreciated. Thanks for the help!

    Regards,
    Ernie
    How many mp3 and AAC do you have?
    Some have solved this by permananetly converting the Mp3 etc to FLAC at file level. You'll obviously never get the definition of a FLAC but it will solve your issue.
    Jim
    https://jukeradio.double6.net


    VB2.4 storage QNAP TS419p (NFS)
    Living Room Joggler & Pi4/Khadas -> Onkyo TXNR686 -> Celestion F20s
    Office Joggler & Pi3 -> Denon RCD N8 -> Celestion F10s
    Dining Room SB Radio
    Bedroom (Bedside) Pi Zero+DAC ->ToppingTP21 ->AKG Headphones
    Bedroom (TV) & Bathroom SB Touch ->Denon AVR ->Mordaunt Short M10s + Kef ceiling speakers
    Guest Room Joggler > Topping Amp -> Wharfedale Modus Cubes

  3. #3
    Senior Member
    Join Date
    Oct 2005
    Location
    Ireland
    Posts
    20,799
    Have you disabled native MP3 and AAC ?

    Are you sure the AAC files will use the AAC audio type and not MP4 ?

    If you have only one DAC - you could have the MAC address in the rules for the specific player and so allow other players to play native.

    Enable player.source to INFO logging to see what rules LMS is considering. The log may be difficult to interpret. Rules are evaluated in parallel so that that you may see many failures logged after a successful match and so it can appear that LMS has failed to match. Look for the "tokenizedCommand" log entry.

  4. #4
    Thank you both for your help!

    Converting all of my MP3 and AAC files is not really a good option for me.
    My .m4a files are AAC according to Foobar.
    I do have my Transporter MAC in the custom-convert.conf file. I did not post it.
    I also have 2 other Squeezeboxes so native translation of MP3 and AAC is not turned off and honestly I really am not sure how to do that.

    Lastly, sorry to say but I do not possess any developer/programming skills. Not sure what player.source is. I nicked the FLAC config from another website. And the MP3 and AAC are simply best guesses. I did look up the manpage for lame and faad and as far as I can tell they should work.

    So with all that in mind, I really do appreciate the help and hopefully the above information can help with a solution.

    -Ernie

  5. #5
    Senior Member
    Join Date
    Oct 2005
    Location
    Ireland
    Posts
    20,799
    Quote Originally Posted by socialxray View Post
    My .m4a files are AAC according to Foobar.
    AAC is the audio codec but the audio can be packaged into a number of files formats which within in LMS are eventually either AAC/ADTS (i.e. AAC) and AAC/MPEG4 (i.e. MP4). The AAC or MP4 does not refer to file name extension.

    I also have 2 other Squeezeboxes so native translation of MP3 and AAC is not turned off and honestly I really am not sure how to do that.
    If you do not disable AAC, MP4 and MP3 native for a MAC address then native (i.e. no transcoding and no resampling) will be chosen by LMS as preferred.

    If your DAC is attached to a squeezelite player - then disable AAC and MP3 and MP4 codecs using the command line option.

    If you DAC is attached to a SB player (e.g Touch) - then WebUI Settings/Advanced/FileTypes - and change MP3, AAC and MP4 "native" to "Disabled" and then click Apply.


    Lastly, sorry to say but I do not possess any developer/programming skills. Not sure what player.source is. I nicked the FLAC config from another website. And the MP3 and AAC are simply best guesses. I did look up the manpage for lame and faad and as far as I can tell they should work.
    But there is a possibility they are not working as expected. One user tried something similar a while back and rules were not applied as user expected.

    WebUI Settings/Advanced/Logging - access player.source logging.

  6. #6
    Here is something interesting.

    [21-01-20 11:44:31.5014] Slim::Player::TranscodingHelper::checkBin (274) Found command: [lame] --mp3input --decode -t --silent $FILE$ - | [sox] -q -t wav - -t flac -e signed -C 0 -b 24 - rate -v -b 98 -L -a 96000
    [21-01-20 11:44:31.5015] Slim::Player::TranscodingHelper::getConvertCommand 2 (413) Rejecting [lame] --mp3input --decode -t --silent $FILE$ - | [sox] -q -t wav - -t flac -e signed -C 0 -b 24 - rate -v -b 98 -L -a 96000 because required capability T not supported:
    [21-01-20 11:44:31.5016] Slim::Player::TranscodingHelper::getConvertCommand 2 (485) Error: Didn't find any command matches for type: mp3

    Also:
    [21-01-20 11:44:31.5044] Slim::Player::TranscodingHelper::tokenizeConvertCo mmand2 (662) Using command for conversion: "C:\PROGRA~2\SQUEEZ~1\server\Bin\MSWin32-x86-multi-thread\lame.exe" --mp3input --decode -t --silent - - | "C:\PROGRA~2\SQUEEZ~1\server\Bin\MSWin32-x86-multi-thread\sox.exe" -q -t wav - -t flac -e signed -C 0 -b 24 - rate -v -b 98 -L -a 96000
    [21-01-20 11:44:31.5045] Slim::Player::Song:pen (567) Tokenized command: "C:\PROGRA~2\SQUEEZ~1\server\Bin\MSWin32-x86-multi-thread\lame.exe" --mp3input --decode -t --silent - - | "C:\PROGRA~2\SQUEEZ~1\server\Bin\MSWin32-x86-multi-thread\sox.exe" -q -t wav - -t flac -e signed -C 0 -b 24 - rate -v -b 98 -L -a 96000
    [21-01-20 11:44:31.5057] Slim::Player::Pipeline::new (95) Launching process with command: "C:\PROGRA~2\SQUEEZ~1\server\Bin\MSWin32-x86-multi-thread\socketwrapper.exe" -D -i 57278 -o 57277 -c ""C:\PROGRA~2\SQUEEZ~1\server\Bin\MSWin32-x86-multi-thread\lame.exe" --mp3input --decode -t --silent - - | "C:\PROGRA~2\SQUEEZ~1\server\Bin\MSWin32-x86-multi-thread\sox.exe" -q -t wav - -t flac -e signed -C 0 -b 24 - rate -v -b 98 -L -a 96000"

  7. #7
    Senior Member
    Join Date
    Oct 2005
    Location
    Ireland
    Posts
    20,799
    I warned that interpretation of log is not straighforward. Do not post edited - you must give the whole log unedited if you wanted it interpreted. If too big, save log in a text file, zip and attach to a post.

    Below shows successful lauych of command with the option you have chosen.

    Quote Originally Posted by socialxray View Post
    [21-01-20 11:44:31.5057] Slim::Player::Pipeline::new (95) Launching process with command: "C:\PROGRA~2\SQUEEZ~1\server\Bin\MSWin32-x86-multi-thread\socketwrapper.exe" -D -i 57278 -o 57277 -c ""C:\PROGRA~2\SQUEEZ~1\server\Bin\MSWin32-x86-multi-thread\lame.exe" --mp3input --decode -t --silent - - | "C:\PROGRA~2\SQUEEZ~1\server\Bin\MSWin32-x86-multi-thread\sox.exe" -q -t wav - -t flac -e signed -C 0 -b 24 - rate -v -b 98 -L -a 96000"
    Breaking down the command in red - an MP3 input is processed and decoded.
    Code:
    ""C:\PROGRA~2\SQUEEZ~1\server\Bin\MSWin32-x86-multi-thread\lame.exe" --mp3input --decode -t --silent - -
    The decoded MP3 into WAV audio stream from lame.exe is sent into sox where it is sent as flac stream to player.
    Code:
    "C:\PROGRA~2\SQUEEZ~1\server\Bin\MSWin32-x86-multi-thread\sox.exe" -q -t wav - -t flac -e signed -C 0 -b 24 - rate -v -b 98 -L -a 96000"

  8. #8
    I uploaded the entire log. Thanks again.
    Attached Files Attached Files

  9. #9
    Senior Member
    Join Date
    Oct 2005
    Location
    Ireland
    Posts
    20,799
    Quote Originally Posted by socialxray View Post
    I uploaded the entire log. Thanks again.
    The log just tells me something is not playing - there are many possible reasons why depending on your setup.

    You haven't described your system nor the player (e.g. Squeezelite, Touch)
    You haven't described whether you disabled Filetypes or disabled codecs in squeezelite somehting else ?
    Has the custom-convert.conf file changed ?

    Can you describe
    1. What have you tried playing and what are you testing ?
    2. What is happening on your system when you tryie to poay?

  10. #10
    Hello BPA,
    I am using a Transporter.
    You haven't described whether you disabled Filetypes or disabled codecs in squeezelite something else ?

    I am not using squeezelite.
    I did set AAC and MP3 to disabled under File Types.

    Has the custom-convert.conf file changed ?
    Here is my custom-convert.conf with the Transporter MAC taken out.
    flc flc * <MAC goes here>
    # FT:{START=--skip=%t}U:{END=--until=%v}
    [flac] -dcs $START$ $END$ -- $FILE$ | [sox] -q -t wav - -t flac -e signed -C 0 -b 24 - rate -v -b 98 -L -a 96000

    mp3 flc * <MAC goes here>
    [lame] --mp3input --decode -t --silent $FILE$ - | [sox] -q -t wav - -t flac -e signed -C 0 -b 24 - rate -v -b 98 -L -a 96000

    aac flc * <MAC goes here>
    # IF
    [faad] -q -w -f 2 $FILE$ | [sox] -q -t wav - -t flac -e signed -C 0 -b 24 - rate -v -b 98 -L -a 96000

    1. What have you tried playing and what are you testing ?
    2. What is happening on your system when you try to play?
    The Transporter display reads,
    PROBLEM: CAN"T OPEN FILE:
    Cowboys from Hell

    This is a .mp3 file encodes at 320kps.

    I played it successfully by enabling native processing and then unsuccessfully when disabling native. The custom-convert.conf was not changed. I have uploaded a new log as well.

    Thanks again Sir!
    Attached Files Attached Files

Posting Permissions

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