Post Reply 
 
Thread Rating:
  • 1 Votes - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Resampling
23-03-2015, 14:40
Post: #11
RE: Resampling
(20-03-2015 20:41)simoncn Wrote:  
(20-03-2015 19:25)krutsch Wrote:  That's great news... one valuable use case for resampling is when playing a playlist with mixed sample rates; this avoids delays/clicks when switching sample rates between tracks.

Are you also going to include Sox options, like quality and filter type?

You will be able to specify any additional ffmpeg output options that you want. This can include custom options for libsoxr.

This support is now available in MinimStreamer 0.5.12 (see the Release notes).
Find all posts by this user
Quote this message in a reply
25-03-2015, 06:24
Post: #12
RE: Resampling
(23-03-2015 14:40)simoncn Wrote:  This support is now available in MinimStreamer 0.5.12 (see the Release notes).

Excellent and thanks for adding that feature! On the release notes and the streaming options documentation:

"For example, if you want ffmpeg to use libsoxr for resampling and libsoxr is installed, you can specify: convOut=aresample=resampler=soxr"

... assuming the above for ffmpeg w/ libsoxr, how does one specify the output sample rate (i.e. osr=96 or options, in general)? Do I just append "=osr=96" to the above?
Find all posts by this user
Quote this message in a reply
25-03-2015, 10:21
Post: #13
RE: Resampling
(25-03-2015 06:24)krutsch Wrote:  Excellent and thanks for adding that feature! On the release notes and the streaming options documentation:

"For example, if you want ffmpeg to use libsoxr for resampling and libsoxr is installed, you can specify: convOut=aresample=resampler=soxr"

... assuming the above for ffmpeg w/ libsoxr, how does one specify the output sample rate (i.e. osr=96 or options, in general)? Do I just append "=osr=96" to the above?

You should specify the output sample rate in the stream.transcode property. For example, to transcode FLAC to WAV with an output sample rate of 96000 Hz, you would specify 'flac:wav;96'. For more details, see this section.
Find all posts by this user
Quote this message in a reply
25-03-2015, 14:14
Post: #14
RE: Resampling
(25-03-2015 10:21)simoncn Wrote:  You should specify the output sample rate in the stream.transcode property. For example, to transcode FLAC to WAV with an output sample rate of 96000 Hz, you would specify 'flac:wav;96'. For more details, see this section.

Makes sense, thanks.

BTW, is it possible to determine the output sample rate based on the input sample rate? For example, 44.1 tracks to 88.2, 48 to 96, 96 and above left alone?
Find all posts by this user
Quote this message in a reply
25-03-2015, 16:00
Post: #15
RE: Resampling
(25-03-2015 14:14)krutsch Wrote:  BTW, is it possible to determine the output sample rate based on the input sample rate? For example, 44.1 tracks to 88.2, 48 to 96, 96 and above left alone?

If not specified, the output sample rate will be whatever ffmpeg or avconv chooses by default. This would in most cases be the same as the input sample rate.

There might be more flexibility in a future release of MinimStreamer to do what you have suggested.
Find all posts by this user
Quote this message in a reply
28-03-2015, 22:43 (This post was last modified: 28-03-2015 22:48 by granosalis.)
Post: #16
RE: Resampling
Can you please tell me how to install libsoxr in intel Qnap?
Which are the benefits of using libsoxr vs ffmpeg for sample rate conversion?
Thanks!

Regards,
Giuseppe
Find all posts by this user
Quote this message in a reply
29-03-2015, 00:59
Post: #17
RE: Resampling
(28-03-2015 22:43)granosalis Wrote:  Can you please tell me how to install libsoxr in intel Qnap?
Which are the benefits of using libsoxr vs ffmpeg for sample rate conversion?
Thanks!

Regards,
Giuseppe

If you're familiar with Linux, you might be able to download a static Linux Intel build of ffmpeg with libsoxr to your QNAP and set the stream.converter property to the full path of the downloaded ffmpeg executable.

The resampling algorithms in libsoxr are said to be better than the default ffmpeg resampler.
Find all posts by this user
Quote this message in a reply
29-03-2015, 01:11
Post: #18
RE: Resampling
(25-03-2015 10:21)simoncn Wrote:  
(25-03-2015 06:24)krutsch Wrote:  Excellent and thanks for adding that feature! On the release notes and the streaming options documentation:

"For example, if you want ffmpeg to use libsoxr for resampling and libsoxr is installed, you can specify: convOut=aresample=resampler=soxr"

... assuming the above for ffmpeg w/ libsoxr, how does one specify the output sample rate (i.e. osr=96 or options, in general)? Do I just append "=osr=96" to the above?

You should specify the output sample rate in the stream.transcode property. For example, to transcode FLAC to WAV with an output sample rate of 96000 Hz, you would specify 'flac:wav;96'. For more details, see this section.

Sorry, I am doing something wrong. What *exactly* do I put into the stream.options field to enable libsoxr? I tried:

convOut=aresample=resampler=soxr

...per your notes, which looks odd, but that's what's in the documentation you link to; I just get 'convOut setting incorrect for converter; correct highlighted value and retry'

Thanks.
Find all posts by this user
Quote this message in a reply
29-03-2015, 01:20
Post: #19
RE: Resampling
(29-03-2015 01:11)krutsch Wrote:  Sorry, I am doing something wrong. What *exactly* do I put into the stream.options field to enable libsoxr? I tried:

convOut=aresample=resampler=soxr

...per your notes, which looks odd, but that's what's in the documentation you link to; I just get 'convOut setting incorrect for converter; correct highlighted value and retry'

Thanks.

Your setting is correct but your converter (ffmpeg I presume) doesn't have libsoxr installed.
Find all posts by this user
Quote this message in a reply
29-03-2015, 01:23
Post: #20
RE: Resampling
(29-03-2015 01:20)simoncn Wrote:  Your setting is correct but your converter (ffmpeg I presume) doesn't have libsoxr installed.

As far as I know, it does. Rebuilt via brew with libsoxr support, after building and installing sox. Will have to recheck.
Find all posts by this user
Quote this message in a reply
Post Reply 


Forum Jump:


User(s) browsing this thread: 1 Guest(s)