ffmpeg用于低功耗设备的webm编码

时间:2017-02-20 14:35:31

标签: android ffmpeg webm

我希望使用手机内置播放器拍摄相机,在我的应用中播放透明视频。我尝试用Android设备的alpha通道编码我的视频:

ffmpeg -i "Comp.avi" -c:v libvpx -pix_fmt yuva420p -metadata:s:v:0 alpha_mode="1" output.webm

结果非常好,但我在Android手机上播放时有滞后(不时冻结视频)。是否有选项来提高解码性能

某些控制台输出:

D:\SOFT\ffmpeg-20160207-git-9ee4c89-win64-static\bin>ffmpeg -i "d:\temp\cherti\Comp 1.avi" -c:v libvpx -pix_fmt yuva420p -metadata:s:v:0 alpha_mode="1" d:\temp\cherti\output.webm
ffmpeg version N-80386-g5f5a97d Copyright (c) 2000-2016 the FFmpeg developers
  built with gcc 5.4.0 (GCC)
  configuration: --enable-gpl --enable-version3 --disable-w32threads --enable-nvenc --enable-avisynth --enable-bzlib --enable-fontconfig --enable-frei0r --enable-gnutls --enable-iconv --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libfreetype --enable-libgme --enable-libgsm --enable-libilbc --enable-libmodplug --enable-libmfx --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libopus --enable-librtmp --enable-libschroedinger --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxavs --enable-libxvid --enable-libzimg --enable-lzma --enable-decklink --enable-zlib
  libavutil      55. 24.100 / 55. 24.100
  libavcodec     57. 46.100 / 57. 46.100
  libavformat    57. 38.100 / 57. 38.100
  libavdevice    57.  0.101 / 57.  0.101
  libavfilter     6. 46.101 /  6. 46.101
  libswscale      4.  1.100 /  4.  1.100
  libswresample   2.  1.100 /  2.  1.100
  libpostproc    54.  0.100 / 54.  0.100
Input #0, avi, from 'd:\temp\cherti\Comp 1.avi':
  Metadata:
    date            : 2017-02-18T14:10:42.00916
    encoder         : Adobe After Effects CC 2015 (Windows)
  Duration: 00:00:05.00, start: 0.000000, bitrate: 1592542 kb/s
    Stream #0:0: Video: rawvideo, bgra, 1080x1920, 1605907 kb/s, 24 fps, 24 tbr, 24 tbn, 24 tbc
File 'd:\temp\cherti\output.webm' already exists. Overwrite ? [y/N] y
[libvpx @ 0000000002593640] v1.5.0
[webm @ 00000000025a54e0] Using AVStream.codec to pass codec parameters to muxers is deprecated, use AVStream.codecpar instead.
Output #0, webm, to 'd:\temp\cherti\output.webm':
  Metadata:
    date            : 2017-02-18T14:10:42.00916
    encoder         : Lavf57.38.100
    Stream #0:0: Video: vp8 (libvpx), yuva420p, 1080x1920, q=-1--1, 200 kb/s, 24 fps, 1k tbn, 24 tbc
    Metadata:
      alpha_mode      : 1
      encoder         : Lavc57.46.100 libvpx
    Side data:
      cpb: bitrate max/min/avg: 0/0/0 buffer size: 0 vbv_delay: -1
Stream mapping:
  Stream #0:0 -> #0:0 (rawvideo (native) -> vp8 (libvpx))

0 个答案:

没有答案
相关问题