Reputation: 405
We have a video provided with green background (Chroma Key) and it needs to be transparent. I am new to chroma key and video editing, doesn't know much about this. My requirement is making the video transparent to use it on web page using PHP script, so that it will work on windows, safari (mac, iOS) using web interface. We have many videos like this so we only need to do this using some script which can set videos on run time if possible.
I have looked into a-frame but unable to find any option to make the video background transparent so that the content behind the video will be visible. Also its working alone but when i am trying to implement in my project it breaks the entire html code after that.
<a-scene>
<a-assets style="display: none">
<video id="greenscreenvideo" src="video.mp4" loop autoplay muted/>
</a-assets>
<a-entity material="shader: chromakey; src: #greenscreenvideo; color: 0.1 0.9 0.2" geometry="primitive: box; width: 1; height: 1; depth: 1" click-drag position="0 1.6 -1.5" ></a-entity>
</a-scene>
Also tried to use ffmpeg with PHP, i tried to run comman online but it doesn't work for me. Please find the command as below:-
Anyone please help?
ffmpeg -f lavfi -i color=c=black:s=1280x720 -i video.mp4 -shortest -filter_complex "[1:v]chromakey=0x70de77:0.1:0.2[ckout];[0:v][ckout]overlay[out]" -map "[out]" output.mp4
Upvotes: 1
Views: 1357