Home of the Squeezebox™ & Transporter® network music players.
Page 1 of 7 123 ... LastLast
Results 1 to 10 of 68
  1. #1
    Senior Member
    Join Date
    Apr 2005
    Location
    Milan, Italy
    Posts
    620

    Using Sox to parametrically equalizing I'm losing seek functionality. Could it work?

    I've recently bought a DAC (Topping D10) to connect to my headphone amplifier. I'm using Beyerdynamic DT 880 and I'm quite pleased with AutoEQ values for them.

    Now, I used to use EqualizerAPO but that doesn't work with ASIO/WASAPI and... being stupid that way I like the display on the DAC to show the correct sample rate for the file I'm playing.

    As such I've searched on the forums and found suggestions to use Sox to parametrically equalize.

    I'm using the following in my custom-convert.conf:

    #Headphones
    flc flc * bc:5f:f4:bf:3e:70
    # FT:{START=--skip=%t}U:{END=--until=%v}
    [flac] -dcs $START$ $END$ -- $FILE$ | [sox] -q -t wav - -t flac -C 0 -b 24 - gain -6.9 equalizer 30 0.43q +6.2

    mp3 flc * bc:5f:f4:bf:3e:70
    # FT:{START=--skip=%t}U:{END=--until=%v}
    [lame] --mp3input --decode --silent $FILE$ - | [sox] -q -t wav - -t flac -C 0 -b 24 - gain -6.9 equalizer 30 0.43q +6.2

    I cut the rest of the equalization points to avoid unnecessary length for reading. Equalization works great. But with these lines I'm loosing the ability to seek to a specific point in a track (using Squeezelite-X to control music on my desktop PC).

    Is this something that could be solved somehow?
    Thanks in advance.

  2. #2
    Senior Member
    Join Date
    Apr 2005
    Location
    Milan, Italy
    Posts
    620
    What happens when I seek is that the playback stops and it jumps to the next song in the queue.

    This what I have in debug log from when the song gets transcoded with sox to when I seek and it errors out, jumping to the next in queue.

    Code:
    [20-06-29 15:51:18.4361] Slim::Player::TranscodingHelper::checkBin (251)   Found command: [flac] -dcs $START$ $END$ -- $FILE$ | [sox] -q -t wav - -t flac -C 0 -b 24 - gain -6.9 equalizer 30 0.43q +6.2 equalizer 699 2.00q +1.0 equalizer 2924 4.11q -1.7 equalizer 6031 5.05q -6.2 equalizer 9825 4.08q +2.2 equalizer 83 4.24q +1.3 equalizer 209 1.54q -1.2 equalizer 2842 0.1q +0.2 equalizer 12443 1.29q +2.7 equalizer 19698 0.46q -11.8
    [20-06-29 15:51:18.4362] Slim::Player::TranscodingHelper::getConvertCommand2 (445) Matched: flc->flc via: [flac] -dcs $START$ $END$ -- $FILE$ | [sox] -q -t wav - -t flac -C 0 -b 24 - gain -6.9 equalizer 30 0.43q +6.2 equalizer 699 2.00q +1.0 equalizer 2924 4.11q -1.7 equalizer 6031 5.05q -6.2 equalizer 9825 4.08q +2.2 equalizer 83 4.24q +1.3 equalizer 209 1.54q -1.2 equalizer 2842 0.1q +0.2 equalizer 12443 1.29q +2.7 equalizer 19698 0.46q -11.8
    [20-06-29 15:51:18.4386] Slim::Networking::Slimproto::client_readable (393) Slimproto frame: STAT, len: 53
    [20-06-29 15:51:18.4389] Slim::Networking::Slimproto::_stat_handler (784) bc:5f:f4:bf:3e:70: STAT-STMc: fullness=2072575, output_fullness=3299328, elapsed=0.000
    [20-06-29 15:51:18.4391] Slim::Networking::Slimproto::_stat_handler (811) bc:5f:f4:bf:3e:70 Squeezebox stream status:
    	event_code:      STMc
    	bytes_rec_H      0
    	bytes_rec_L      8716283
    	fullness:        2072575 (98%)
    	bufferSize      2097152
    	fullness         2072575
    	bytes_received   8716283
    	signal_strength: 65535
    	jiffies:         255558656
    	voltage:         0
    [20-06-29 15:51:18.4393] Slim::Networking::Slimproto::_stat_handler (823) 
    	output size:     3528000
    	output fullness: 3299328
    	elapsed seconds: 0
    [20-06-29 15:51:18.4393] Slim::Networking::Slimproto::_stat_handler (835) 
    	elapsed milliseconds: 0
    	server timestamp:     0
    [20-06-29 15:51:18.5262] Slim::Player::Source::_readNextChunk (349) Read to end of file or pipe
    [20-06-29 15:51:18.5264] Slim::Player::Source::_readNextChunk (372) end of file or error on socket, song pos: 35971072
    [20-06-29 15:51:18.5266] Slim::Player::Source::_readNextChunk (377) bc:5f:f4:bf:3e:70 mark end of stream
    [20-06-29 15:51:18.5268] Slim::Player::Source::_readNextChunk (385) Didn't stream any bytes for this song; mark it as failed
    [20-06-29 15:51:18.5270] Slim::Player::StreamingController::playerStreamingFailed (2248) bc:5f:f4:bf:3e:70
    [20-06-29 15:51:18.5273] Slim::Player::StreamingController::_playersMessage (796) Problem: Can't open file for:: file:///D:/Music/FLAC%20Non%20Shareable/Black%20Era%20-%202007%20-%20...%20Then/1.02%20-%20Bark.flac
    [20-06-29 15:51:18.5282] Slim::Player::StreamingController::_eventAction (270) bc:5f:f4:bf:3e:70: StreamingFailed in BUFFERING-STREAMING -> Slim::Player::StreamingController::_StopNextIfMore
    [20-06-29 15:51:18.5283] Slim::Player::StreamingController::_eventAction (283) params: errorDisconnect => undef
    [20-06-29 15:51:18.5284] Slim::Player::Squeezebox::stream (1049) strm-q
    [20-06-29 15:51:18.5285] Slim::Player::Squeezebox::stream (1094) sending strm frame of length: 24
    [20-06-29 15:51:18.5286] Slim::Player::Squeezebox::sendFrame (1137) sending squeezebox frame: strm, length: 24
    [20-06-29 15:51:18.5289] Slim::Player::StreamingController::_Stop (610) Song queue is now 6
    [20-06-29 15:51:18.5292] Slim::Player::SongStreamController::DESTROY (43) DESTROY(Slim::Player::SongStreamController=HASH(0x160c3924)) live=0
    [20-06-29 15:51:18.5293] Slim::Player::StreamingController::_setPlayingState (2377) new playing state STOPPED
    [20-06-29 15:51:18.5295] Slim::Player::StreamingController::_setStreamingState (2386) new streaming state IDLE
    [20-06-29 15:51:18.5296] Slim::Player::StreamingController::_willRetry (1408) no retry data

  3. #3
    Senior Member Apesbrain's Avatar
    Join Date
    Jun 2005
    Location
    East Coast, USA
    Posts
    1,529
    I haven't used an "equalizer" custom-convert.conf for a few years, but I think it worked back then. Some slight differences to your own, so maybe worth a try:

    Code:
    flc flc * 00:04:20:00:00:00
    	# FT:{START=--skip=%t}U:{END=--until=%v}D:{RESAMPLE=-r %d}
    	[flac] -dcs $START$ $END$ -- $FILE$ | [sox] -q -t wav - -t wav $RESAMPLE$ - equalizer 99.6 2.70q +3.6 equalizer 283 1.00q -2.9 equalizer 2293 1.00q +1.4 | [flac] -cs --totally-silent --compression-level-0 -
    You don't need the switch "equalizer 2842 0.1q +0.2" as it's not really doing anything.

  4. #4
    Senior Member
    Join Date
    Apr 2005
    Location
    Milan, Italy
    Posts
    620
    Unfortunately the problem remains. When decoding FLAC and inputting into sox, seek jumps to the following track in the queue. When decoding MP3 and inputting into sox, seek restarts the current track.

    It's funny because it was this five years old post of yours that put me on to this solution. And even back then the person helping you was mentioning losing seek functionality but offered a solution (which is what I am using). A solution that I can't make work. :-(
    https://forums.slimdevices.com/showt...ize-one-player
    Last edited by gorman; 2020-06-29 at 13:59.

  5. #5
    Senior Member Apesbrain's Avatar
    Join Date
    Jun 2005
    Location
    East Coast, USA
    Posts
    1,529
    Ok, as I said it was a while ago and I guess the "seek" problem was never solved. I moved on to Inguz DRC/EQ shortly after and it seeks fine. Here is what Inguz has in its custom-convert.conf:

    Code:
    flc flc * 00:00:00:00:00:00
    	# FT:{START=--skip=%t}U:{END=--until=%v}
    	[flac] -dcs $START$ $END$ -- $FILE$ | [InguzDSP] -id "00:00:00:00:00:00" -wav -wavo -d 24 | [flac] -cs -0 --totally-silent -

  6. #6
    Senior Member
    Join Date
    Oct 2005
    Location
    Ireland
    Posts
    18,983
    Quote Originally Posted by gorman View Post
    What happens when I seek is that the playback stops and it jumps to the next song in the queue.

    This what I have in debug log from when the song gets transcoded with sox to when I seek and it errors out, jumping to the next in queue.
    Are you using player.source set to DEBUG ?
    There seems to be other logs active but not player.source set top DEBUG

  7. #7
    Senior Member
    Join Date
    Apr 2005
    Location
    Milan, Italy
    Posts
    620
    What I can't understand is why this is happening. The first portion, which is the one "deciding" seek is identical to other lines in convert.conf


    flc mp3 * *
    # FB:{BITRATE=--abr %B}T:{START=--skip=%t}U:{END=--until=%v}D:{RESAMPLE=--resample %D}
    [flac] -dcs $START$ $END$ -- $FILE$ | [lame] --silent -q $QUALITY$ $RESAMPLE$ $BITRATE$ - -


    It's pretty much identical to:

    flc flc * bc:5f:f4:bf:3e:70
    # FT:{START=--skip=%t}U:{END=--until=%v}
    [flac] -dcs $START$ $END$ -- $FILE$ | [sox] -q -t wav - -t flac -C 0 -b 24 - gain -6.9 equalizer 30 0.43q +6.2

    Does sox have problems handling stdin input when it stops and restart?

  8. #8
    Senior Member
    Join Date
    Apr 2005
    Location
    Milan, Italy
    Posts
    620
    Quote Originally Posted by bpa View Post
    Are you using player.source set to DEBUG ?
    There seems to be other logs active but not player.source set top DEBUG
    I thought I had it active but maybe I didn't, I don't know. Redid the whole thing here: https://pastebin.com/xQRYVBn3

    You can see it's playing "I'd Do Anything for Love But I Won't Do That", I seek and it gives, at 02:52:08.0695, some error about end of file... but the same problem is visible in the log I posted before.

    I'm using Squeezelite, launched with -n Headphones -s Music -c flac,pcm,mp3,ogg,aac,wma,dsd -o "Topping USB Audio Device [ASIO]"

    Edit: tried both Kernel Streaming and WASAPI exclusive, to see whether that made a difference. It didn't.

    It seems to me that this happens.

    Code:
    Slim::Player::StreamingController::_eventAction (302) bc:5f:f4:bf:3e:70: JumpToTime - new state BUFFERING-STREAMING
    The above gets the command to seek.

    After that there's a list of lines that take care of checking the format to be transcoded (and in my case equalization being applied through sox).
    And then:
    Code:
    [20-06-30 03:20:57.6219] Slim::Player::TranscodingHelper::getConvertCommand2 (445) Matched: flc->flc via: [flac] -dcs $START$ $END$ -- $FILE$ | [sox] -D -q -t wav - -t flac -C 0 -b 24 - gain -6.9 equalizer 30 0.43q +6.2 equalizer 699 2.00q +1.0 equalizer 2924 4.11q -1.7 equalizer 6031 5.05q -6.2 equalizer 9825 4.08q +2.2 equalizer 83 4.24q +1.3 equalizer 209 1.54q -1.2 equalizer 2842 0.1q +0.2 equalizer 12443 1.29q +2.7 equalizer 19698 0.46q -11.8
    [20-06-30 03:20:57.7317] Slim::Player::Source::_readNextChunk (349) Read to end of file or pipe
    [20-06-30 03:20:57.7319] Slim::Player::Source::_readNextChunk (372) end of file or error on socket, song pos: 7520256
    [20-06-30 03:20:57.7320] Slim::Player::Source::_readNextChunk (377) bc:5f:f4:bf:3e:70 mark end of stream
    [20-06-30 03:20:57.7320] Slim::Player::Source::_readNextChunk (385) Didn't stream any bytes for this song; mark it as failed
    [20-06-30 03:20:57.7321] Slim::Player::StreamingController::playerStreamingFailed (2248) bc:5f:f4:bf:3e:70
    [20-06-30 03:20:57.7323] Slim::Player::StreamingController::_playersMessage (796) Problem: Can't open file for:: file:///D:/Music/FLAC%20Rips/Meat%20Loaf%20-%20Bat%20Out%20Of%20Hell%20II-%20Back%20Into%20Hell/Meat%20Loaf%20-%20Bat%20Out%20Of%20Hell%20II-%20Back%20Into%20Hell%20-%2006%20-%20Objects%20In%20The%20Rear%20View%20Mirror%20May%20Appear%20Closer%20Than%20They%20Are.flac
    [20-06-30 03:20:57.7328] Slim::Player::StreamingController::_eventAction (270) bc:5f:f4:bf:3e:70: StreamingFailed in BUFFERING-STREAMING -> Slim::Player::StreamingController::_StopNextIfMore
    [20-06-30 03:20:57.7328] Slim::Player::StreamingController::_eventAction (283) params: errorDisconnect => undef
    [20-06-30 03:20:57.7331] Slim::Player::StreamingController::_Stop (610) Song queue is now 21
    Last edited by gorman; 2020-06-29 at 19:13.

  9. #9
    Senior Member
    Join Date
    May 2008
    Location
    Canada
    Posts
    5,912
    Quote Originally Posted by gorman View Post
    I thought I had it active but maybe I didn't, I don't know. Redid the whole thing here: https://pastebin.com/xQRYVBn3

    You can see it's playing "I'd Do Anything for Love But I Won't Do That", I seek and it gives, at 02:52:08.0695, some error about end of file... but the same problem is visible in the log I posted before.

    I'm using Squeezelite, launched with -n Headphones -s Music -c flac,pcm,mp3,ogg,aac,wma,dsd -o "Topping USB Audio Device [ASIO]"

    Edit: tried both Kernel Streaming and WASAPI exclusive, to see whether that made a difference. It didn't.

    It seems to me that this happens.

    Code:
    Slim::Player::StreamingController::_eventAction (302) bc:5f:f4:bf:3e:70: JumpToTime - new state BUFFERING-STREAMING
    The above gets the command to seek.

    After that there's a list of lines that take care of checking the format to be transcoded (and in my case equalization being applied through sox).
    And then:
    Code:
    [20-06-30 03:20:57.6219] Slim::Player::TranscodingHelper::getConvertCommand2 (445) Matched: flc->flc via: [flac] -dcs $START$ $END$ -- $FILE$ | [sox] -D -q -t wav - -t flac -C 0 -b 24 - gain -6.9 equalizer 30 0.43q +6.2 equalizer 699 2.00q +1.0 equalizer 2924 4.11q -1.7 equalizer 6031 5.05q -6.2 equalizer 9825 4.08q +2.2 equalizer 83 4.24q +1.3 equalizer 209 1.54q -1.2 equalizer 2842 0.1q +0.2 equalizer 12443 1.29q +2.7 equalizer 19698 0.46q -11.8
    [20-06-30 03:20:57.7317] Slim::Player::Source::_readNextChunk (349) Read to end of file or pipe
    [20-06-30 03:20:57.7319] Slim::Player::Source::_readNextChunk (372) end of file or error on socket, song pos: 7520256
    [20-06-30 03:20:57.7320] Slim::Player::Source::_readNextChunk (377) bc:5f:f4:bf:3e:70 mark end of stream
    [20-06-30 03:20:57.7320] Slim::Player::Source::_readNextChunk (385) Didn't stream any bytes for this song; mark it as failed
    [20-06-30 03:20:57.7321] Slim::Player::StreamingController::playerStreamingFailed (2248) bc:5f:f4:bf:3e:70
    [20-06-30 03:20:57.7323] Slim::Player::StreamingController::_playersMessage (796) Problem: Can't open file for:: file:///D:/Music/FLAC%20Rips/Meat%20Loaf%20-%20Bat%20Out%20Of%20Hell%20II-%20Back%20Into%20Hell/Meat%20Loaf%20-%20Bat%20Out%20Of%20Hell%20II-%20Back%20Into%20Hell%20-%2006%20-%20Objects%20In%20The%20Rear%20View%20Mirror%20May%20Appear%20Closer%20Than%20They%20Are.flac
    [20-06-30 03:20:57.7328] Slim::Player::StreamingController::_eventAction (270) bc:5f:f4:bf:3e:70: StreamingFailed in BUFFERING-STREAMING -> Slim::Player::StreamingController::_StopNextIfMore
    [20-06-30 03:20:57.7328] Slim::Player::StreamingController::_eventAction (283) params: errorDisconnect => undef
    [20-06-30 03:20:57.7331] Slim::Player::StreamingController::_Stop (610) Song queue is now 21
    In your PC locales settings, what defines the decimal separator? There is a bug/issue with flac and decimal separator for some non-english. Flac expects time in the locale settings, and that might be mm::ss,ff and LMS sends mm::ss.ff (I have the issue being a Frenchie)
    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

  10. #10
    Senior Member
    Join Date
    Oct 2005
    Location
    Ireland
    Posts
    18,983
    Quote Originally Posted by philippe_44 View Post
    In your PC locales settings, what defines the decimal separator? There is a bug/issue with flac and decimal separator for some non-english. Flac expects time in the locale settings, and that might be mm::ss,ff and LMS sends mm::ss.ff (I have the issue being a Frenchie)
    Is this still an issue ? I thought it was fixed it see https://github.com/Logitech/slimserver/issues/277

Posting Permissions

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