MinimServer Forum
Convolution and Gapless Playback - Printable Version

+- MinimServer Forum (https://forum.minimserver.com)
+-- Forum: MinimServer (/forumdisplay.php?fid=1)
+--- Forum: MinimStreamer (/forumdisplay.php?fid=11)
+--- Thread: Convolution and Gapless Playback (/showthread.php?tid=5390)



Convolution and Gapless Playback - Snoopy08 - 23-09-2019 23:52

Using convolution running on Intel NUC i5 8th Gen with the following parameters:

stream.converter: ffmpeg (v4.1.3)
stream.options: convOut=-i /media/music/pa/convolve/L12*.wav -lavfi afir=gtype=gn
stream.transcode: flac:wav;,wav:wav24;

When playing Dark Side of the Moon (flac 16/44, wav 24/192) with BubbleUPnP, gapless works well without convolution. However, when I enable convolution, there is a pause. Is there a way to remove/reduce this pause?


RE: Convolution and Gapless Playback - simoncn - 24-09-2019 09:48

You can change

-lavfi afir=gtype=gn

to

-lavfi "apad=pad_len=32768,afir=gtype=gn,atrim=start_sample=32768"

This should improve things but there might still be a small click.


RE: Convolution and Gapless Playback - Snoopy08 - 24-09-2019 11:32

Thank you. That definitely improved things; small click and much smaller pause is better than the long pause.

Out of curiosity, where can I find documentation on ffmpeg, lavfi etc. It seems like a dark art and a Google search turns up cryptic information and examples, much of it on video.


RE: Convolution and Gapless Playback - Alandbush - 24-09-2019 12:06

(24-09-2019 11:32)Snoopy08 Wrote:  Thank you. That definitely improved things; small click and much smaller pause is better than the long pause.

Out of curiosity, where can I find documentation on ffmpeg, lavfi etc. It seems like a dark art and a Google search turns up cryptic information and examples, much of it on video.

There is this Comprehensive documentation but clearly not the easiest to navigate.
Of course, ffmpeg is no mere simple tool and has enormous capabilities.

Nb - afir and apad summaries can be found in the Components Documentation section under the Filters sub section.


RE: Convolution and Gapless Playback - Snoopy08 - 24-09-2019 12:38

(24-09-2019 12:06)Alandbush Wrote:  There is this Comprehensive documentation but clearly not the easiest to navigate.
Thank you and for the hints on afir and apad. For a beginner, it is a nightmare to find anything and even if I find something, have difficulty learning how to use it.

(24-09-2019 12:06)Alandbush Wrote:  Of course, ffmpeg is no mere simple tool and has enormous capabilities.
That is indeed the problem, not simple with enormous capabilities. In my case, how do I go about searching for additional tweaks to help with my issue?

OR is it something that should be best left to the experts and I should post for help?


RE: Convolution and Gapless Playback - tgb - 04-05-2020 06:47

Hello,
1st, thanks to you simoncn (again... :-)) ) for implementing this convolution function within Minim :-)
Works great. Dead easy & simple setup. Amazed.

Regarding the gapless with convolution, I found that the size of the gap is related to the number of taps used to generate the .wav convolution file (I use rePhase to generate it, rePhase enable to choose the number of taps). "Taps" = "samples" I pressume... sorry I'm noob :-)

With a number of taps of 268144 and above : big gap. In that case, you loose completly the gapless feature.
With a number of taps of 131072 and below (not tested "below" yet) : when you start a playlist/album, you have a "small" gap between the 1st & the 2nd track, and then you have a "tiny" gap between the next tracks.
Please note that "small" is bigger than "tiny" :-). And that as a whole, I find we are close to a 100% gapless feature, thus it's ok for me.

Questions :
- is the number of taps a key point regarding the "quality" of the convolution ?
- Are 131072taps far enough to get a good convolution file ?
- How many taps are far enough to generate a qualitative convol file ?

Hi, simoncn ,
regarding your post above, I use in the stream.options, the "basic" string : -lavfi afir=gtype=gn
To reduce the gap, you advice to use =>
-lavfi "apad=pad_len=32768,afir=gtype=gn,atrim=start_sample=32768"
Theoritically, does this string reduce the quality of the convol ? or it is just a "timing & buffer trick" ?
BRgds


RE: Convolution and Gapless Playback - simoncn - 04-05-2020 09:42

Please don't make similar posts to multiple threads. If people respond in both places, it makes the discussion very hard to follow. To prevent this happening, it is unfortunately necessary for me to temporarily close this thread to further posts.