gpt4 book ai didi

ffmpeg - 将 PCM 音频复用到 WMA 会显着增加文件大小

转载 作者:行者123 更新时间:2023-12-04 23:06:10 24 4
gpt4 key购买 nike

虽然我试图将 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%

    最佳答案

    WMA 很烂。尝试更改数据包大小。来自 FFmpeg ASF muxer documentation :

    -packet_size
    Set the muxer packet size. By tuning this setting you may reduce data fragmentation or muxer overhead depending on your source. Default value is 3200, minimum is 100, maximum is 64k.



    例子:
    ffmpeg -i input.wav -c copy -packet_size 65536 output_64k.wma

    文件大小:
  • input.wav - 11M
  • output_64k.wma - 11M
  • output_default.wma - 16M
  • 关于ffmpeg - 将 PCM 音频复用到 WMA 会显着增加文件大小,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/38007019/

    24 4 0
    Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
    广告合作:1813099741@qq.com 6ren.com