Find Jobs
Hire Freelancers

FFmpeg, PHP - script to do Chroma Key (green screen) background removal in video file

$10-100 USD

In Progress
Posted almost 3 years ago

$10-100 USD

Paid on delivery
A user has uploaded a video to my server. The video content shows a person in the foreground, and a green background. I need a script that will remove the green background, and output a new video file with a transparent background. The script must return the file path to the output video, so I can use that file in other scripts on the server. Possibly, you will need to use FFmpeg to export each frame in the video as an image, then compare each pixel in the image with the color green. If green, then set the pixel to transparent. After analysing every frame, join all the frames back together and save as a video file. FFmpeg documentation says you will also need to split the audio and visual channels first, before you work on the pixel colors. Then recombine the audio and video at the end. Allow some tolerance when checking the pixel color. For example, instead of an exact match at rgb values 0,128,0 (green), allow some variation so that if the pixel is dark green or light green it is still made transparent. A way to do this might be to use a distance formula in 3D color space. to get started please share us a ffmpeg keyed version of the file shared to you. provide 2 videos keyed as transparent background and also as white background ensure: - professional keying - no halos - no phantom hairs - no unnatural body contours
Project ID: 29871425

About the project

5 proposals
Remote project
Active 3 yrs ago

Looking to make some money?

Benefits of bidding on Freelancer

Set your budget and timeframe
Get paid for your work
Outline your proposal
It's free to sign up and bid on jobs
Awarded to:
User Avatar
you do not need to export as frame by frame run the follow command on your server and done NB "rember to set it for the color" ffmpeg -i [login to view URL] -vf "chromakey=0x70de77:0.1:0.2" -c copy -c:v png [login to view URL] if your video file is "H.264 " MP4 it will not support alpha =0 to transparent but then you can always do ffmpeg -f lavfi -i color=c=black:s=606x1080 -i [login to view URL] -filter_complex "[1:v]chromakey=0x70de77:0.1:0.2[ckout]; [0:v][ckout]overlay[out]" -map "[out]" [login to view URL] if you need more help let me know. Thanks peter
$25 USD in 1 day
5.0 (46 reviews)
6.3
6.3
5 freelancers are bidding on average $85 USD for this job
User Avatar
Hello there i hope you are doing well, for this problem i suggest you to use ffmpeg with php and i 'll prepare you a script to do it automatically if you really want to do it please contact me asap Kindly
$100 USD in 2 days
0.0 (0 reviews)
0.0
0.0

About the client

Flag of GERMANY
Stuttgart, Germany
5.0
36
Payment method verified
Member since Mar 13, 2016

Client Verification

Thanks! We’ve emailed you a link to claim your free credit.
Something went wrong while sending your email. Please try again.
Registered Users Total Jobs Posted
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759)
Copyright © 2024 Freelancer Technology Pty Limited (ACN 142 189 759)
Loading preview
Permission granted for Geolocation.
Your login session has expired and you have been logged out. Please log in again.