Estou tentando converter imagens GIF em vídeos WebM com avconv
, mas eu só recebo um único quadro no vídeo WebM.
Exemplo de GIF:
Eu uso o comando de fluxo:
avconv -i horse.gif -c:v libvpx -qmin 10 -qmax 42 -maxrate 500k -bufsize 1M horse.webm
Saída do comando:
avconv version 0.8.17-6:0.8.17-1, Copyright (c) 2000-2014 the Libav developers
built on Mar 15 2015 17:00:31 with gcc 4.7.2
Input #0, image2, from 'horse.gif':
Duration: 00:00:00.04, start: 0.000000, bitrate: N/A
Stream #0.0: Video: gif, pal8, 500x269, 25 tbr, 25 tbn, 25 tbc
Incompatible pixel format 'pal8' for codec 'libvpx', auto-selecting format 'yuv420p'
[buffer @ 0x1fd68e0] w:500 h:269 pixfmt:pal8
[avsink @ 0x1fd67c0] auto-inserting filter 'auto-inserted scaler 0' between the filter 'src' and the filter 'out'
[scale @ 0x1fc19c0] w:500 h:269 fmt:pal8 -> w:500 h:269 fmt:yuv420p flags:0x4
[libvpx @ 0x1fd7440] v1.1.0
Output #0, webm, to 'horse.webm':
Metadata:
encoder : Lavf53.21.1
Stream #0.0: Video: libvpx, yuv420p, 500x269, q=10-42, 200 kb/s, 1k tbn, 25 tbc
Stream mapping:
Stream #0:0 -> #0:0 (gif -> libvpx)
Press ctrl-c to stop encoding
frame= 1 fps= 0 q=0.0 Lsize= 12kB time=0.04 bitrate=2517.2kbits/s
video:12kB audio:0kB global headers:0kB muxing overhead 3.930636%
A imagem original do gif é 901 KB grande e o vídeo WebM resultante tem apenas 13 KB.