[prev in list] [next in list] [prev in thread] [next in thread] 

List:       gstreamer-devel
Subject:    info-help audioresample
From:       Filippo via gstreamer-devel <gstreamer-devel () lists ! freedesktop ! org>
Date:       2022-06-27 18:56:44
Message-ID: 636ebfcd-7f22-fad6-170f-b5c29e5ada29 () gmail ! com
[Download RAW message or body]

OK, I think I found my answer, this one should be right:


gst-launch-1.0 --gst-debug=audio-*:5, filesrc 
location="/var/lib/mpd/music/NAS/loss4/Nina Simone/Baltimore/1. 
Baltimore.flac" ! decodebin ! audioconvert dithering=tpdf-hf 
noise-shaping=simple  ! audioresample quality=10 
resample-method=blackman-nuttall sinc-filter-interpolation=cubic 
sinc-filter-mode=interpolated ! audio/x-raw, rate=176400 ! alsasink 
device=hw:1,0


the only thing is that I don't understand how to activate dither, from 
the log it seems that it doesn't apply it:

audio-converter audio-converter.c:869:chain_mix: mix format S32LE, 
passthrough 1, in_channels 2, out_channels 2
audio-resampler audio-resampler.c:859:audio_resampler_init: target sse, 
default flags 0000021f
audio-resampler audio-resampler-x86.h:30:audio_resampler_check_x86: 
enable SSE optimisations
audio-resampler audio-resampler.c:862:audio_resampler_init: target flag sse2
audio-resampler audio-resampler-x86.h:42:audio_resampler_check_x86: 
enable SSE2 optimisations
audio-resampler audio-resampler.c:862:audio_resampler_init: target flag sse3
audio-resampler audio-resampler.c:862:audio_resampler_init: target flag 
ssse3
audio-resampler audio-resampler.c:862:audio_resampler_init: target flag 
sse41
audio-resampler audio-resampler-x86.h:63:audio_resampler_check_x86: 
enable SSE41 optimisations
audio-resampler audio-resampler.c:862:audio_resampler_init: target flag 
sse42
audio-resampler audio-resampler.c:862:audio_resampler_init: target flag 
64bit
audio-resampler audio-resampler.c:1411:gst_audio_resampler_new: method 
3, bps 4, channels 2
audio-resampler audio-resampler.c:1554:gst_audio_resampler_update: phase 
0 out_rate 176400, in_rate 44100, gcd 44100
audio-resampler audio-resampler.c:1561:gst_audio_resampler_update: new 
phase 0/4
audio-resampler audio-resampler.c:1567:gst_audio_resampler_update: have 
new options, reconfigure filter
audio-resampler audio-resampler.c:1198:resampler_calculate_taps: using 
cubic interpolation to build filter
audio-resampler audio-resampler.c:977:alloc_taps_mem: allocate bps 4 
n_taps 160 n_phases 36
audio-resampler audio-resampler.c:1035:setup_functions: using cubic 
interpolation for filter coefficients
audio-resampler audio-resampler.c:1039:setup_functions: using filter 
interpolate function 5
audio-resampler audio-resampler.c:1055:setup_functions: using 
interpolated filter function
audio-resampler audio-resampler.c:1060:setup_functions: using resample 
function 13
audio-converter audio-converter.c:963:chain_quantize: depth in 32, out 24
*audio-converter audio-converter.c:975:chain_quantize: using no dither 
and noise shaping*
audio-converter audio-converter.c:987:chain_quantize: quantize to 24 
bits, dither 0, ns 0
audio-converter audio-converter.c:1032:chain_pack: pack format S32LE to 
S24LE



if I enter the parameter 'dithering-threshold=32' it does not accept it, 
in fact if I check with inspector it does not list it:




gst-inspect-1.0 audioconvert
Factory Details:
   Rank                     primary (256)
   Long-name                Audio converter
   Klass                    Filter/Converter/Audio
   Description              Convert audio to different formats
   Author                   Benjamin Otte <otte@gnome.org>

Plugin Details:
   Name                     audioconvert
   Description              Convert audio to different formats
   Filename /usr/lib64/gstreamer-1.0/libgstaudioconvert.so
   Version                  1.20.1
   License                  LGPL
   Source module            gst-plugins-base
   Source release date      2022-03-14
   Binary package           Gentoo GStreamer ebuild
   Origin URL https://www.gentoo.org

GObject
  +----GInitiallyUnowned
        +----GstObject
              +----GstElement
                    +----GstBaseTransform
                          +----GstAudioConvert

Pad Templates:
   SINK template: 'sink'
     Availability: Always
     Capabilities:
       audio/x-raw
                  format: { (string)F64LE, (string)F64BE, (string)F32LE, 
(string)F32BE, (string)S32LE, (string)S32BE, (string)U32LE, 
(string)U32BE, (string)S24_32LE, (string)S24_32BE, (string)U24_32LE, 
(string)U24_32BE, (string)S24LE, (string)S24BE, (string)U24LE, 
(string)U24BE, (string)S20LE, (string)S20BE, (string)U20LE, 
(string)U20BE, (string)S18LE, (string)S18BE, (string)U18LE, 
(string)U18BE, (string)S16LE, (string)S16BE, (string)U16LE, 
(string)U16BE, (string)S8, (string)U8 }
                    rate: [ 1, 2147483647 ]
                channels: [ 1, 2147483647 ]
                  layout: { (string)interleaved, (string)non-interleaved }

   SRC template: 'src'
     Availability: Always
     Capabilities:
       audio/x-raw
                  format: { (string)F64LE, (string)F64BE, (string)F32LE, 
(string)F32BE, (string)S32LE, (string)S32BE, (string)U32LE, 
(string)U32BE, (string)S24_32LE, (string)S24_32BE, (string)U24_32LE, 
(string)U24_32BE, (string)S24LE, (string)S24BE, (string)U24LE, 
(string)U24BE, (string)S20LE, (string)S20BE, (string)U20LE, 
(string)U20BE, (string)S18LE, (string)S18BE, (string)U18LE, 
(string)U18BE, (string)S16LE, (string)S16BE, (string)U16LE, 
(string)U16BE, (string)S8, (string)U8 }
                    rate: [ 1, 2147483647 ]
                channels: [ 1, 2147483647 ]
                  layout: { (string)interleaved, (string)non-interleaved }

Element has no clocking capabilities.
Element has no URI handling capabilities.

Pads:
   SINK: 'sink'
     Pad Template: 'sink'
   SRC: 'src'
     Pad Template: 'src'

Element Properties:
   dithering           : Selects between different dithering methods.
                         flags: readable, writable
                         Enum "GstAudioDitherMethod" Default: 2, "tpdf"
                            (0): none             - GST_AUDIO_DITHER_NONE
                            (1): rpdf             - GST_AUDIO_DITHER_RPDF
                            (2): tpdf             - GST_AUDIO_DITHER_TPDF
                            (3): tpdf-hf          - GST_AUDIO_DITHER_TPDF_HF
   mix-matrix          : Transformation matrix for input/output channels
                         flags: readable, writable
                         GstValueArray of GValues of type "GstValueArray"
   name                : The name of the object
                         flags: readable, writable, 0x2000
                         String. Default: "audioconvert0"
   noise-shaping       : Selects between different noise shaping methods.
                         flags: readable, writable
                         Enum "GstAudioNoiseShapingMethod" Default: 0, 
"none"
                            (0): none             - 
GST_AUDIO_NOISE_SHAPING_NONE
                            (1): error-feedback   - 
GST_AUDIO_NOISE_SHAPING_ERROR_FEEDBACK
                            (2): simple           - 
GST_AUDIO_NOISE_SHAPING_SIMPLE
                            (3): medium           - 
GST_AUDIO_NOISE_SHAPING_MEDIUM
                            (4): high             - 
GST_AUDIO_NOISE_SHAPING_HIGH
   parent              : The parent of the object
                         flags: readable, writable, 0x2000
                         Object of type "GstObject"
   qos                 : Handle Quality-of-Service events
                         flags: readable, writable
                         Boolean. Default: false




[Attachment #3 (text/html)]

<html>
  <head>

    <meta http-equiv="content-type" content="text/html; charset=UTF-8">
  </head>
  <body>
    <p>OK, I think I found my answer, this one should be right:</p>
    <p><br>
    </p>
    <p>gst-launch-1.0 --gst-debug=audio-*:5, filesrc
      location="/var/lib/mpd/music/NAS/loss4/Nina Simone/Baltimore/1.
      Baltimore.flac" ! decodebin ! audioconvert dithering=tpdf-hf
      noise-shaping=simple  ! audioresample quality=10
      resample-method=blackman-nuttall sinc-filter-interpolation=cubic 
      sinc-filter-mode=interpolated ! audio/x-raw, rate=176400 !
      alsasink device=hw:1,0<br>
      <br>
      <br>
      the only thing is that I don't understand how to activate dither,
      from the log it seems that it doesn't apply it:<br>
      <br>
      audio-converter audio-converter.c:869:chain_mix: mix format S32LE,
      passthrough 1, in_channels 2, out_channels 2<br>
      audio-resampler audio-resampler.c:859:audio_resampler_init: target
      sse, default flags 0000021f<br>
      audio-resampler
      audio-resampler-x86.h:30:audio_resampler_check_x86: enable SSE
      optimisations<br>
      audio-resampler audio-resampler.c:862:audio_resampler_init: target
      flag sse2<br>
      audio-resampler
      audio-resampler-x86.h:42:audio_resampler_check_x86: enable SSE2
      optimisations<br>
      audio-resampler audio-resampler.c:862:audio_resampler_init: target
      flag sse3<br>
      audio-resampler audio-resampler.c:862:audio_resampler_init: target
      flag ssse3<br>
      audio-resampler audio-resampler.c:862:audio_resampler_init: target
      flag sse41<br>
      audio-resampler
      audio-resampler-x86.h:63:audio_resampler_check_x86: enable SSE41
      optimisations<br>
      audio-resampler audio-resampler.c:862:audio_resampler_init: target
      flag sse42<br>
      audio-resampler audio-resampler.c:862:audio_resampler_init: target
      flag 64bit<br>
      audio-resampler audio-resampler.c:1411:gst_audio_resampler_new:
      method 3, bps 4, channels 2<br>
      audio-resampler audio-resampler.c:1554:gst_audio_resampler_update:
      phase 0 out_rate 176400, in_rate 44100, gcd 44100<br>
      audio-resampler audio-resampler.c:1561:gst_audio_resampler_update:
      new phase 0/4<br>
      audio-resampler audio-resampler.c:1567:gst_audio_resampler_update:
      have new options, reconfigure filter<br>
      audio-resampler audio-resampler.c:1198:resampler_calculate_taps:
      using cubic interpolation to build filter<br>
      audio-resampler audio-resampler.c:977:alloc_taps_mem: allocate bps
      4 n_taps 160 n_phases 36<br>
      audio-resampler audio-resampler.c:1035:setup_functions: using
      cubic interpolation for filter coefficients<br>
      audio-resampler audio-resampler.c:1039:setup_functions: using
      filter interpolate function 5<br>
      audio-resampler audio-resampler.c:1055:setup_functions: using
      interpolated filter function<br>
      audio-resampler audio-resampler.c:1060:setup_functions: using
      resample function 13<br>
      audio-converter audio-converter.c:963:chain_quantize: depth in 32,
      out 24<br>
      <b><font color="#af200c">audio-converter
          audio-converter.c:975:chain_quantize: using no dither and
          noise shaping</font></b><br>
      audio-converter audio-converter.c:987:chain_quantize: quantize to
      24 bits, dither 0, ns 0<br>
      audio-converter audio-converter.c:1032:chain_pack: pack format
      S32LE to S24LE<br>
      <br>
    </p>
    <p><br>
    </p>
    <p><br>
      if I enter the parameter 'dithering-threshold=32' it does not
      accept it, in fact if I check with inspector it does not list it:</p>
    <p><br>
    </p>
    <p><br>
    </p>
    <p><br>
    </p>
    gst-inspect-1.0 audioconvert<br>
    Factory Details:<br>
      Rank                     primary (256)<br>
      Long-name                Audio converter<br>
      Klass                    Filter/Converter/Audio<br>
      Description              Convert audio to different formats<br>
      Author                   Benjamin Otte <a class="moz-txt-link-rfc2396E" \
href="mailto:otte@gnome.org">&lt;otte@gnome.org&gt;</a><br>  <br>
    Plugin Details:<br>
      Name                     audioconvert<br>
      Description              Convert audio to different formats<br>
      Filename                
    /usr/lib64/gstreamer-1.0/libgstaudioconvert.so<br>
      Version                  1.20.1<br>
      License                  LGPL<br>
      Source module            gst-plugins-base<br>
      Source release date      2022-03-14<br>
      Binary package           Gentoo GStreamer ebuild<br>
      Origin URL               <a class="moz-txt-link-freetext" \
href="https://www.gentoo.org">https://www.gentoo.org</a><br>  <br>
    GObject<br>
     +----GInitiallyUnowned<br>
           +----GstObject<br>
                 +----GstElement<br>
                       +----GstBaseTransform<br>
                             +----GstAudioConvert<br>
    <br>
    Pad Templates:<br>
      SINK template: 'sink'<br>
        Availability: Always<br>
        Capabilities:<br>
          audio/x-raw<br>
                     format: { (string)F64LE, (string)F64BE,
    (string)F32LE, (string)F32BE, (string)S32LE, (string)S32BE,
    (string)U32LE, (string)U32BE, (string)S24_32LE, (string)S24_32BE,
    (string)U24_32LE, (string)U24_32BE, (string)S24LE, (string)S24BE,
    (string)U24LE, (string)U24BE, (string)S20LE, (string)S20BE,
    (string)U20LE, (string)U20BE, (string)S18LE, (string)S18BE,
    (string)U18LE, (string)U18BE, (string)S16LE, (string)S16BE,
    (string)U16LE, (string)U16BE, (string)S8, (string)U8 }<br>
                       rate: [ 1, 2147483647 ]<br>
                   channels: [ 1, 2147483647 ]<br>
                     layout: { (string)interleaved,
    (string)non-interleaved }<br>
      <br>
      SRC template: 'src'<br>
        Availability: Always<br>
        Capabilities:<br>
          audio/x-raw<br>
                     format: { (string)F64LE, (string)F64BE,
    (string)F32LE, (string)F32BE, (string)S32LE, (string)S32BE,
    (string)U32LE, (string)U32BE, (string)S24_32LE, (string)S24_32BE,
    (string)U24_32LE, (string)U24_32BE, (string)S24LE, (string)S24BE,
    (string)U24LE, (string)U24BE, (string)S20LE, (string)S20BE,
    (string)U20LE, (string)U20BE, (string)S18LE, (string)S18BE,
    (string)U18LE, (string)U18BE, (string)S16LE, (string)S16BE,
    (string)U16LE, (string)U16BE, (string)S8, (string)U8 }<br>
                       rate: [ 1, 2147483647 ]<br>
                   channels: [ 1, 2147483647 ]<br>
                     layout: { (string)interleaved,
    (string)non-interleaved }<br>
    <br>
    Element has no clocking capabilities.<br>
    Element has no URI handling capabilities.<br>
    <br>
    Pads:<br>
      SINK: 'sink'<br>
        Pad Template: 'sink'<br>
      SRC: 'src'<br>
        Pad Template: 'src'<br>
    <br>
    Element Properties:<br>
      dithering           : Selects between different dithering methods.<br>
                            flags: readable, writable<br>
                            Enum "GstAudioDitherMethod" Default: 2,
    "tpdf"<br>
                               (0): none             -
    GST_AUDIO_DITHER_NONE<br>
                               (1): rpdf             -
    GST_AUDIO_DITHER_RPDF<br>
                               (2): tpdf             -
    GST_AUDIO_DITHER_TPDF<br>
                               (3): tpdf-hf          -
    GST_AUDIO_DITHER_TPDF_HF<br>
      mix-matrix          : Transformation matrix for input/output
    channels<br>
                            flags: readable, writable<br>
                            GstValueArray of GValues of type
    "GstValueArray"<br>
      name                : The name of the object<br>
                            flags: readable, writable, 0x2000<br>
                            String. Default: "audioconvert0"<br>
      noise-shaping       : Selects between different noise shaping
    methods.<br>
                            flags: readable, writable<br>
                            Enum "GstAudioNoiseShapingMethod" Default:
    0, "none"<br>
                               (0): none             -
    GST_AUDIO_NOISE_SHAPING_NONE<br>
                               (1): error-feedback   -
    GST_AUDIO_NOISE_SHAPING_ERROR_FEEDBACK<br>
                               (2): simple           -
    GST_AUDIO_NOISE_SHAPING_SIMPLE<br>
                               (3): medium           -
    GST_AUDIO_NOISE_SHAPING_MEDIUM<br>
                               (4): high             -
    GST_AUDIO_NOISE_SHAPING_HIGH<br>
      parent              : The parent of the object<br>
                            flags: readable, writable, 0x2000<br>
                            Object of type "GstObject"<br>
      qos                 : Handle Quality-of-Service events<br>
                            flags: readable, writable<br>
                            Boolean. Default: false<br>
    <p><br>
      <br>
      <br>
    </p>
  </body>
</html>



[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic