ffmpeg 重新采样为 flac 大声点击/噪音

ffmpeg 重新采样为 flac 大声点击/噪音

我正在使用 ffmpeg 将 DSD 文件重新采样为 Flac 和 mp3。我没有遇到 mp3 重新采样的任何问题,但使用 flac 重新采样时,曲目末尾总会发出很大的咔嗒声,如下图所示:

Audacity 中显示的波形

我在命令行中使用一个基本命令:

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

输出:

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%

答案1

尝试更改-ar 192000-ar 176400

dsf我在玩iPhone时也遇到过这种情况ffmpeg。当我将输出采样率(又称:重采样率)设置为 48000 时,音频末尾会出现咔嗒声,但当我将输出采样率更改为 44100 时,一切正常。我认为这是因为重采样的原因,因为dsd的采样率是以 44100 为单位测量的,例如dsd6464*44100。

只是一个想法,尚未证实!

相关内容