使用ffmpeg将Alpha转换为使用Alpha的VP9 Webm [英] Convert mov with Alpha to VP9 Webm with Alpha Using ffmpeg
问题描述
我试图用Alpha透明度将 mov 转换为 webm ,如这里。我按照这里说明的步骤无效。
I am trying to convert a mov with alpha transparency to webm with alpha transparency, as seen here. I followed the steps explained here to no avail.
从这个答案我能够删除视频中的所有黑色,从而使其变得透明,但这不是我需要的,因为我已经有一个透明的 mov 并将其转换为透明的 webm 格式。
From this answer I was able to remove all the black in the video, thus making it transparent but this is not what I need as I already have a transparent mov and would like to convert that to transparent webm format.
ffmpeg -i input.mp4 -c:v libvpx -vf "colorkey=0x000000:0.1:0.1,format=yuva420p" out.webm
这是视频的 ffprobe
输出,我想用透明度转换为webm。
This is the ffprobe
output of the video I would like to convert to webm with transparency.
built with Apple LLVM version 7.0.2 (clang-700.1.81)
configuration: --prefix=/usr/local/Cellar/ffmpeg/2.8.4 --enable-shared --enable-pthreads --enable-gpl --enable-version3 --enable-hardcoded-tables --enable-avresample --cc=clang --host-cflags= --host-ldflags= --enable-opencl --enable-libx264 --enable-libmp3lame --enable-libvo-aacenc --enable-libxvid --enable-libfreetype --enable-libtheora --enable-libvorbis --enable-libvpx --enable-librtmp --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libass --enable-ffplay --enable-libspeex --enable-libschroedinger --enable-libfdk-aac --enable-libopus --enable-frei0r --enable-libopenjpeg --disable-decoder=jpeg2000 --extra-cflags=-I/usr/local/Cellar/openjpeg/1.5.2_1/include/openjpeg-1.5 --enable-nonfree --enable-vda
libavutil 54. 31.100 / 54. 31.100
libavcodec 56. 60.100 / 56. 60.100
libavformat 56. 40.101 / 56. 40.101
libavdevice 56. 4.100 / 56. 4.100
libavfilter 5. 40.101 / 5. 40.101
libavresample 2. 1. 0 / 2. 1. 0
libswscale 3. 1.101 / 3. 1.101
libswresample 1. 2.101 / 1. 2.101
libpostproc 53. 3.100 / 53. 3.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'input.mov':
Metadata:
major_brand : qt
minor_version : 0
compatible_brands: qt
creation_time : 2016-01-17 16:04:07
encoder : Mac OS X v? (AVF 1046.9.1, CM 1731.15.20, x86_64)
encoder-eng : Mac OS X v? (AVF 1046.9.1, CM 1731.15.20, x86_64)
Duration: 00:00:06.63, start: 0.000000, bitrate: 63966 kb/s
Stream #0:0(eng): Video: prores (ap4h / 0x68347061), yuva444p10le(bt470bg/smpte240m/bt709), 1920x1080, 63963 kb/s, 25.03 fps, 25 tbr, 600 tbn, 600 tbc (default)
Metadata:
creation_time : 2016-01-17 16:04:07
handler_name : Core Media Data Handler
encoder : Apple ProRes 4444
我也尝试过以下命令,这对我也无效。
I've also tried the following command which didn't work for me either.
ffmpeg -y -i input.mov -c:v libvpx-vp9 -b:v 2000k -pass 1 -an -f webm output.webm
我在Mac上安装了ffmpeg版本2.8.4,并安装了brew。 2.8.5是最新版本。
I'm using version 2.8.4 of ffmpeg on a Mac, installed with brew. 2.8.5 is the latest version.
推荐答案
尝试
ffmpeg -i input.mov -c:v libvpx -pix_fmt yuva420p out.webm
这篇关于使用ffmpeg将Alpha转换为使用Alpha的VP9 Webm的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!