ffmpeg覆盖透明背景的视频

时间:2015-10-27 13:13:38

标签: ffmpeg

我有2个视频:背景(mp4)和叠加(mov),叠加层有透明背景。我试图将带有透明背景的视频作为叠加在背景视频之上。但不幸的是,叠加完全覆盖了黑色背景而不是透明度的背景视频。 我正在使用以下命令:

以下是该命令的完整输出:

ffmpeg -y -i rec_20151027_123445.mp4 -vf "[in]format=rgba[ina];movie=overlay_1920x1080_1.mov[o];[ina][o]overlay=0:0" -vcodec qtrle converted.mov

ffmpeg version 2.6 Copyright (c) 2000-2015 the FFmpeg developers
  built with Apple LLVM version 6.0 (clang-600.0.57) (based on LLVM 3.5svn)
  configuration: --prefix=/usr/local/Cellar/ffmpeg/2.6_1 --enable-shared --enable-pthreads --enable-gpl --enable-version3 --enable-hardcoded-tables --enable-avresample --cc=clang --host-cflags= --host-ldflags= --enable-libx264 --enable-libmp3lame --enable-libvo-aacenc --enable-libxvid --enable-vda
  libavutil      54. 20.100 / 54. 20.100
  libavcodec     56. 26.100 / 56. 26.100
  libavformat    56. 25.101 / 56. 25.101
  libavdevice    56.  4.100 / 56.  4.100
  libavfilter     5. 11.102 /  5. 11.102
  libavresample   2.  1.  0 /  2.  1.  0
  libswscale      3.  1.101 /  3.  1.101
  libswresample   1.  1.100 /  1.  1.100
  libpostproc    53.  3.100 / 53.  3.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'rec_20151027_123445.mp4':
  Metadata:
    major_brand     : mp42
    minor_version   : 0
    compatible_brands: isommp42
    creation_time   : 2015-10-27 10:34:57
    location        : +50.0474+036.2031/
    location-eng    : +50.0474+036.2031/
  Duration: 00:00:06.04, start: 0.000000, bitrate: 16863 kb/s
    Stream #0:0(eng): Video: h264 (Baseline) (avc1 / 0x31637661), yuv420p, 1920x1080, 16837 kb/s, SAR 1:1 DAR 16:9, 29.62 fps, 29.75 tbr, 90k tbn, 180k tbc (default)
    Metadata:
      creation_time   : 2015-10-27 10:34:57
      handler_name    : VideoHandle
    Stream #0:1(eng): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, mono, fltp, 95 kb/s (default)
    Metadata:
      creation_time   : 2015-10-27 10:34:57
      handler_name    : SoundHandle
[swscaler @ 0x7fa3db0ada00] No accelerated colorspace conversion found from yuva420p to argb.
Output #0, mov, to 'converted.mov':
  Metadata:
    major_brand     : mp42
    minor_version   : 0
    compatible_brands: isommp42
    location-eng    : +50.0474+036.2031/
    location        : +50.0474+036.2031/
    encoder         : Lavf56.25.101
    Stream #0:0(eng): Video: qtrle (rle  / 0x20656C72), argb, 1920x1080 [SAR 1:1 DAR 16:9], q=2-31, 200 kb/s, 29.75 fps, 15232 tbn, 29.75 tbc (default)
    Metadata:
      creation_time   : 2015-10-27 10:34:57
      handler_name    : VideoHandle
      encoder         : Lavc56.26.100 qtrle
    Stream #0:1(eng): Audio: aac (libvo_aacenc) (mp4a / 0x6134706D), 48000 Hz, mono, s16, 128 kb/s (default)
    Metadata:
      creation_time   : 2015-10-27 10:34:57
      handler_name    : SoundHandle
      encoder         : Lavc56.26.100 libvo_aacenc
Stream mapping:
  Stream #0:0 -> #0:0 (h264 (native) -> qtrle (native))
  Stream #0:1 -> #0:1 (aac (native) -> aac (libvo_aacenc))
Press [q] to stop, [?] for help
frame=  179 fps= 19 q=0.0 Lsize=  126621kB time=00:00:06.05 bitrate=171213.2kbits/s dup=1 drop=1    
video:126519kB audio:95kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.005055%

0 个答案:

没有答案