| chromakey | R Documentation |
Remove a colored background from foreground footage and composite onto a background video or image using FFmpeg's chromakey filter.
chromakey(background, foreground, output, color = "0x00ff00", similarity = 0.1,
blend = 0.075, overwrite = TRUE, dry_run = FALSE)
background |
Path to background video or image. |
foreground |
Path to foreground video with green/blue screen. |
output |
Path for output video file. |
color |
Hex color to key out (default "0x00ff00" for green). |
similarity |
Chromakey similarity threshold (default 0.1). Higher values key out more of the color. |
blend |
Chromakey blend amount (default 0.075). Higher values create softer edges. |
overwrite |
If TRUE (default), overwrite output file. |
dry_run |
If TRUE, return the FFmpeg command without executing. |
Invisibly returns the output path. If dry_run, returns command string.
## Not run:
chromakey("bg.mp4", "greenscreen.mp4", "out.mp4")
chromakey("bg.mp4", "bluescreen.mp4", "out.mp4", color = "0x0000ff")
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.