1

I'm using ffmpeg to resample a DSD file to Flac & mp3. I don't experience any problems with the mp3 resample, but with the flac resample there is always a loud click at the end of a track, as seen on this image:

Wave form as displayed in Audacity

I'm using a basic command in command line:

ffmpeg -i input.dsf -ar 192000 -acodec flac output.flac

Output:

ffmpeg version 2.8.5 Copyright (c) 2000-2016 the FFmpeg developers
  built with Apple LLVM version 7.0.2 (clang-700.1.81)
  configuration: --prefix=/usr/local/Cellar/ffmpeg/2.8.5 --enable-shared --enable-pthreads --enable-gpl --enable-version3 --enable-hardcoded-tables --enable-avresample --cc=clang --host-cflags= --host-ldflags= --enable-opencl --enable-libx264 --enable-libmp3lame --enable-libvo-aacenc --enable-libxvid --enable-vda
  libavutil      54. 31.100 / 54. 31.100
  libavcodec     56. 60.100 / 56. 60.100
  libavformat    56. 40.101 / 56. 40.101
  libavdevice    56.  4.100 / 56.  4.100
  libavfilter     5. 40.101 /  5. 40.101
  libavresample   2.  1.  0 /  2.  1.  0
  libswscale      3.  1.101 /  3.  1.101
  libswresample   1.  2.101 /  1.  2.101
  libpostproc    53.  3.100 / 53.  3.100
[mjpeg @ 0x7fe617809000] Changeing bps to 8
[dsf @ 0x7fe617000000] Estimating duration from bitrate, this may be inaccurate
Input #0, dsf, from 'input.dsf':
  Metadata:
    title           : Bach Brandenburg no. 6 - Allegro
    artist          : Florilegium
    album           : Brandenburg Concertos
    track           : 3
    Tool Version    : 18.0.212
    genre           : Classical
    composer        : Bach
    Catalog #       : 35914
    Format          : DSD
    ISRC            : NLA460912792
    Label           : Channel Classics
    Tool Name       : Media Center
    date            : 2014
  Duration: 00:06:00.31, bitrate: 5644 kb/s
    Stream #0:0: Audio: dsd_lsbf_planar, 352800 Hz, stereo, fltp, 5644 kb/s
    Stream #0:1: Video: mjpeg, yuvj444p(pc, bt470bg/unknown/unknown), 1429x1417 [SAR 300:300 DAR 1429:1417], 90k tbr, 90k tbn, 90k tbc
    Metadata:
      title           : Picture
      comment         : Cover (front)
[flac @ 0x7fe617122000] encoding as 24 bits-per-sample
Output #0, flac, to 'output.flac':
  Metadata:
    title           : Bach Brandenburg no. 6 - Allegro
    artist          : Florilegium
    album           : Brandenburg Concertos
    TRACKNUMBER     : 3
    Tool Version    : 18.0.212
    genre           : Classical
    composer        : Bach
    Catalog #       : 35914
    Format          : DSD
    ISRC            : NLA460912792
    Label           : Channel Classics
    Tool Name       : Media Center
    date            : 2014
    encoder         : Lavf56.40.101
    Stream #0:0: Audio: flac, 192000 Hz, stereo, s32 (24 bit), 128 kb/s
    Metadata:
      encoder         : Lavc56.60.100 flac
Stream mapping:
  Stream #0:0 -> #0:0 (dsd_lsbf_planar (native) -> flac (native))
Press [q] to stop, [?] for help
size=  306541kB time=00:05:58.10 bitrate=7012.3kbits/s    
video:0kB audio:306532kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.002733%
  • Please provide the full, uncut command line output. – slhck Jul 14 '17 at 9:59
  • Hi @slhck, just added the output. Thanks in advance – Sjoerd Staal Jul 15 '17 at 7:23
  • Please try again with a more recent version, e.g. by upgrading your Homebrew build, or by using a static build from ffmpeg.org/download.html — yours is already a little outdated. – slhck Jul 15 '17 at 7:53
  • Hi @slhck, unfortunately I'm also experiencing clicks with the latest (develop) version (ffmpeg version N-85769-gc53bf8c) ffmpeg version N-85769-gc53bf8c Copyright (c) 2000-2017 the FFmpeg developers built with gcc 4.8.3 (GCC) 20140911 (Red Hat 4.8.3-9) configuration: --enable-gpl --enable-version3 --enable-libmp3lame --enable-nonfree --disable-static --enable-shared – Sjoerd Staal Jul 27 '17 at 8:34
  • Does same happens without resampling? – Paul B. Mahol Aug 9 '17 at 9:30
0

Try changing -ar 192000 to -ar 176400.

I have encountered this too when I play dsf with ffmpeg in my iPhone. When I set my output sample rate (aka: the resample rate) to 48000, I got the click noise at the end of audio, but when I change the output sample rate to 44100, everything is fine. I think this is because the resample thing, because dsd's sample rate is measured by 44100, such as dsd64 is 64* 44100.

Just a thought, not proved yet!

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.