fluent-ffmpeg / node-fluent-ffmpeg

A fluent API to FFMPEG (http://www.ffmpeg.org)
MIT License
7.97k stars 881 forks source link

Need to remove green background from video #1182

Open Dhakshan opened 2 years ago

Dhakshan commented 2 years ago

Version information

Hi, How to remove green background from video using fluent-ffmpeg. Please guide me. Thanks!

Dhakshan commented 2 years ago

Anyone can help me on this:

The below ffmpeg command not working ffmpeg -i /VIDEO20210808024754/210828082937.mp4 -y -b:v 1M -vf chromakey=0x00FF00:0.2:0.2 -c:v libvpx -pix_fmt yuva420p -metadata:s:v:0 alpha_mode="1" -auto-alt-ref 0 demo.webm

stdout, stder log below

ffmpeg version N-106633-g25d3f96db7-20220420 Copyright (c) 2000-2022 the FFmpeg developers built with gcc 11.2.0 (crosstool-NG 1.24.0.533_681aaef) configuration: --prefix=/ffbuild/prefix --pkg-config-flags=--static --pkg-config=pkg-config --cross-prefix=x86_64-w64-mingw32- --arch=x86_64 --target-os=mingw32 --enable-gpl --enable-version3 --disable-debug --disable-w32threads --enable-pthreads --enable-iconv --enable-libxml2 --enable-zlib --enable-libfreetype --enable-libfribidi --enable-gmp --enable-lzma --enable-fontconfig --enable-libvorbis --enable-opencl --disable-libpulse --enable-libvmaf --disable-libxcb --disable-xlib --enable-amf --enable-libaom --enable-avisynth --enable-libdav1d --enable-libdavs2 --disable-libfdk-aac --enable-ffnvcodec --enable-cuda-llvm --enable-frei0r --enable-libgme --enable-libass --enable-libbluray --enable-libmp3lame --enable-libopus --enable-librist --enable-libtheora --enable-libvpx --enable-libwebp --enable-lv2 --enable-libmfx --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenh264 --enable-libopenjpeg --enable-libopenmpt --enable-librav1e --enable-librubberband --enable-schannel --enable-sdl2 --enable-libsoxr --enable-libsrt --enable-libsvtav1 --enable-libtwolame --enable-libuavs3d --disable-libdrm --disable-vaapi --enable-libvidstab --enable-vulkan --enable-libshaderc --enable-libplacebo --enable-libx264 --enable-libx265 --enable-libxavs2 --enable-libxvid --enable-libzimg --enable-libzvbi --extra-cflags=-DLIBTWOLAME_STATIC --extra-cxxflags= --extra-ldflags=-pthread --extra-ldexeflags= --extra-libs=-lgomp --extra-version=20220420 libavutil 57. 24.101 / 57. 24.101 libavcodec 59. 26.100 / 59. 26.100 libavformat 59. 22.100 / 59. 22.100 libavdevice 59. 6.100 / 59. 6.100 libavfilter 8. 33.100 / 8. 33.100 libswscale 6. 6.100 / 6. 6.100 libswresample 4. 6.100 / 4. 6.100 libpostproc 56. 5.100 / 56. 5.100 Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'VIDEO20210808024754/210828082937.mp4': Metadata: major_brand : isom minor_version : 512 compatible_brands: isomiso2avc1mp41 encoder : Lavf58.45.100 Duration: 00:00:44.84, start: 0.000000, bitrate: 1535 kb/s Stream #0:00x1: Video: h264 (High) (avc1 / 0x31637661), yuv420p(progressive), 704x540 [SAR 1:1 DAR 176:135], 1532 kb/s, 25 fps, 25 tbr, 12800 tbn (default) Metadata: handler_name : Alias Data Handler vendor_id : [0][0][0][0] [NULL @ 000002bfd8ac8640] Unable to find a suitable output format for ' -b:v 1M -vf chromakey=0x00FF00:0.2:0.2 -c:v libvpx -pix_fmt yuva420p -metadata:s:v:0 alpha_mode="1" -auto-alt-ref 0 ' -b:v 1M -vf chromakey=0x00FF00:0.2:0.2 -c:v libvpx -pix_fmt yuva420p -metadata:s:v:0 alpha_mode="1" -auto-alt-ref 0 : Invalid argument