ffmpeg 不会将 GIF 转换为 WEBM

问题描述 投票:0回答:1

我正在尝试将 GIF 转换为 WEBM 以上传到我的网站,以获得更小的文件(GIF 太大......)并获得视频的所有优点,例如暂停。 但是 ffmpeg 给出了这个错误:

Input #0, gif, from '1.gif':   Duration: N/A, bitrate: N/A
    Stream #0:0: Video: gif, bgra, 960x540, 16.67 fps, 16.67 tbr, 100 tbn, 100 tbc Stream mapping:   Stream #0:0 -> #0:0 (gif (native) ->
vp8 (libvpx)) Press [q] to stop, [?] for help [libvpx @
0x5560ca413960] v1.6.1 [libvpx @ 0x5560ca413960] Transparency encoding
with auto_alt_ref does not work Error initializing output stream 0:0
-- Error while opening encoder for output stream #0:0 - maybe incorrect parameters such as bit_rate, rate, width or height
Conversion failed!

这是我的 ffmpeg 行:

ffmpeg -r 16 -i 1.gif -c:v libvpx -crf 12 -b:v 500k test.webm
ffmpeg gif webm
1个回答
12
投票
ffmpeg -y -i 1.gif -r 16 -c:v libvpx -quality good -cpu-used 0 -b:v 500K -crf 12 -pix_fmt yuv420p -movflags faststart test.webm
© www.soinside.com 2019 - 2024. All rights reserved.