问题描述
试图弄清楚ffmpeg,目前正致力于将24bit/96khz FLAC文件转换为16bit/48khz.
Trying to figure out ffmpeg, currently working on getting 24bit/96khz FLAC files into 16bit/48khz.
推荐答案
基本示例
ffmpeg -i input.flac -sample_fmt s16 -ar 48000 output.flac
- 列出示例格式:
ffmpeg -sample_fmts
- 列出其他flac编码选项:
ffmpeg -h encoder=flac
- List sample formats:
ffmpeg -sample_fmts
- List additional flac encoding options:
ffmpeg -h encoder=flac
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.
有关可用的抖动方法和其他重采样选项的列表,请参见 -dither_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重采样器
FFmpeg支持两个重采样器:默认的swresample库和外部 SoX重采样器(soxr)
SoX resampler
FFmpeg supports two resamplers: the default swresample library, and the external SoX resampler (soxr).
要使用soxr,您的ffmpeg
必须使用--enable-libsoxr
进行编译.然后使用-resampler
选项选择它:
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
或使用 aresample 过滤器来完成所有操作:
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
更多信息
- FFmpeg重采样器文档
- FFmpeg Resampler Documentation
More info
这篇关于ffmpeg FLAC 24位96khz至16位48khz的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!