ffmpeg FLAC 24 bit 96khz to 16 bit 48khz

后端 未结 2 1430
轻奢々
轻奢々 2021-02-04 11:37

Trying to figure out ffmpeg, currently working on getting 24bit/96khz FLAC files into 16bit/48khz.

2条回答
  •  逝去的感伤
    2021-02-04 12:29

    Basic example

    ffmpeg -i input.flac -sample_fmt s16 -ar 48000 output.flac
    
    • List sample formats: ffmpeg -sample_fmts
    • List additional flac encoding options: ffmpeg -h encoder=flac

    aresample filter example

    ffmpeg -i input.flac -af aresample=out_sample_fmt=s16:out_sample_rate=48000 output.flac
    

    Either example will result in the same output: you can verify with the hash muxer.


    Changing the dithering method

    See the -dither_method option for a list of available dithering methods and additional resampling options. Example:

    ffmpeg -i input.flac -dither_method triangular_hp -sample_fmt s16 -ar 48000 output.flac
    

    SoX resampler

    FFmpeg supports two resamplers: the default swresample library, and the external SoX resampler (soxr).

    To use soxr your ffmpeg must be compiled with --enable-libsoxr. Then choose it with the -resampler option:

    ffmpeg -i input.flac -resampler soxr -sample_fmt s16 -ar 48000 output.flac
    

    Or use the aresample filter to do it all:

    ffmpeg -i input.flac -af aresample=resampler=soxr:out_sample_fmt=s16:out_sample_rate=48000 output.flac
    

    More info

    • FFmpeg Resampler Documentation

提交回复
热议问题