Eu tenho um smartphone motorola moto xt1225 e gravei um vídeo que estou tentando codificar para o VP9 webM usando o ffmpeg com o Ubuntu 15.10. Isto é o que o ffprobe envia sobre o meu vídeo de entrada:
ffprobe VID_20151231_235957320.mp4
ffprobe version 2.7.3- 0ubuntu0.15.10.1 Copyright (c) 2007-2015 the FFmpeg developers
built with gcc 5.2.1 (Ubuntu 5.2.1-22ubuntu2) 20151010
configuration: --prefix=/usr --extra-version=0ubuntu0.15.10.1 --build-suffix=-ffmpeg --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --enable-gpl --enable-shared --disable-stripping --enable-avresample --enable-avisynth --enable-frei0r --enable-gnutls --enable-ladspa --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libmodplug --enable-libmp3lame --enable-libopenjpeg --enable-openal --enable-libopus --enable-libpulse --enable-librtmp --enable-libschroedinger --enable-libshine --enable-libspeex --enable-libtheora --enable-libtwolame --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libxvid --enable-libzvbi --enable-opengl --enable-x11grab --enable-libdc1394 --enable-libiec61883 --enable-libzmq --enable-libssh --enable-libsoxr --enable-libx264 --enable-libopencv --enable-libx265
libavutil 54. 27.100 / 54. 27.100
libavcodec 56. 41.100 / 56. 41.100
libavformat 56. 36.100 / 56. 36.100
libavdevice 56. 4.100 / 56. 4.100
libavfilter 5. 16.101 / 5. 16.101
libavresample 2. 1. 0 / 2. 1. 0
libswscale 3. 1.101 / 3. 1.101
libswresample 1. 2.100 / 1. 2.100
libpostproc 53. 3.100 / 53. 3.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'VID_20151231_235957320.mp4':
Metadata:
major_brand : mp42
minor_version : 0
compatible_brands: isommp42
creation_time : 2016-01-01 02:16:22
location : -22.9634-043.1666/
location-eng : -22.9634-043.1666/
Duration: 00:16:22.57, start: 0.000000, bitrate: 17134 kb/s
Stream #0:0(eng): Video: h264 (High) (avc1 / 0x31637661), yuv420p, 1920x1080, 16999 kb/s, SAR 1:1 DAR 16:9, 25.19 fps, 90k tbr, 90k tbn, 180k tbc (default)
Metadata:
creation_time : 2016-01-01 02:16:22
handler_name : VideoHandle
encoder : MOTO
Stream #0:1(eng): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 128 kb/s (default)
Metadata:
creation_time : 2016-01-01 02:16:22
handler_name : SoundHandle
Quando eu tento qualquer uma das opções de codificação presentes no Guia de codificação do VP9 como a melhor qualidade (mais lenta) Configurações recomendadas:
ffmpeg -i VID_20151231_235957320.mp4 -c:v libvpx-vp9 -pass 1 -b:v 1000K -threads 1 -speed 4 -tile-columns 0 -frame-parallel 0 -g 9999 -aq-mode 0 -an -f webm /dev/null
Sempre recebo a saída de erro reclamando de g_timebase.den fora do intervalo:
[libvpx-vp9 @ 0x1bf1860] v1.4.0
[libvpx-vp9 @ 0x1bf1860] Failed to initialize encoder: Invalid parameter
[libvpx-vp9 @ 0x1bf1860] Additional information: g_timebase.den out of range [1..1000000000]
Output #0, webm, to '/dev/null':
Metadata:
major_brand : mp42
minor_version : 0
compatible_brands: isommp42
location-eng : -22.9634-043.1666/
location : -22.9634-043.1666/
Stream #0:0(eng): Video: vp9, none, q=2-31, 128 kb/s, SAR 1:1 DAR 0:0, 25.19 fps (default)
Metadata:
creation_time : 2016-01-01 02:16:22
handler_name : VideoHandle
encoder : Lavc56.41.100 libvpx-vp9
Stream mapping:
Stream #0:0 -> #0:0 (h264 (native) -> vp9 (libvpx-vp9))
Error while opening encoder for output stream #0:0 - maybe incorrect parameters such as bit_rate, rate, width or height
Parece que preciso fornecer parâmetros adicionais, mas não percebi o que fazer, alguma dica?