虽然我试图将wav文件转换为wma文件大小比原始源文件大得多:
input.wav
- 11M output.wma
- 16M 有没有办法减少输出文件的文件大小?
命令和输出:
$ ffmpeg -i input.wav -c copy output.wma
ffmpeg version N-80797-g8b4d6cc Copyright (c) 2000-2016 the FFmpeg developers
built with gcc 6.1.1 (GCC) 20160501
configuration: --enable-gpl
libavutil 55. 27.100 / 55. 27.100
libavcodec 57. 48.101 / 57. 48.101
libavformat 57. 40.101 / 57. 40.101
libavdevice 57. 0.102 / 57. 0.102
libavfilter 6. 46.102 / 6. 46.102
libswscale 4. 1.100 / 4. 1.100
libswresample 2. 1.100 / 2. 1.100
libpostproc 54. 0.100 / 54. 0.100
Guessed Channel Layout for Input Stream #0.0 : stereo
Input #0, wav, from 'input.wav':
Metadata:
encoder : Lavf57.40.101
Duration: 00:01:00.00, bitrate: 1411 kb/s
Stream #0:0: Audio: pcm_s16le ([1][0][0][0] / 0x0001), 44100 Hz, 2 channels, s16, 1411 kb/s
Output #0, asf, to 'output.wma':
Metadata:
WM/EncodingSettings: Lavf57.40.101
Stream #0:0: Audio: pcm_s16le ([1][0][0][0] / 0x0001), 44100 Hz, stereo, 1411 kb/s
Stream mapping:
Stream #0:0 -> #0:0 (copy)
Press [q] to stop, [?] for help
size= 16150kB time=00:01:00.00 bitrate=2205.1kbits/s speed=1.9e+03x
video:0kB audio:10336kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 56.255745%
答案 0 :(得分:2)
WMA很糟糕。尝试更改数据包大小。来自FFmpeg ASF muxer documentation:
-packet_size
设置muxer数据包大小。通过调整此设置 可能会减少数据碎片或muxer开销,具体取决于您的 资源。默认值为3200,最小值为100,最大值为64k。
示例:
ffmpeg -i input.wav -c copy -packet_size 65536 output_64k.wma
文件大小:
input.wav
- 11M output_64k.wma
- 11M output_default.wma
- 16M