Hi friends,
I need to play mp4 video with alpha channel enabled on default unity player, Is this possible??
if not, can we do this with the help of any additional scripts without a plugin?
Video Screenshot:
Any help would be much appreciated .
Hi friends,
I need to play mp4 video with alpha channel enabled on default unity player, Is this possible??
if not, can we do this with the help of any additional scripts without a plugin?
Video Screenshot:
Any help would be much appreciated .
Mp 4 does not contain alpha information. As for the below screenshot, you could do it by using shader.
To play video with alpha in unity, you need to convert video with alpha channel(eg, mov) to .webm format using FFmpeg.
ffmpeg -i inputVideoName.mov -c:v libvpx -pix_fmt yuva420p -qmin 0 -qmax 50 -crf 5 -b:v 1M -auto-alt-ref 0 -metadata:s:v:0 alpha_mode=“1” -c:a libvorbis outputVideoName.webm
-b:v is video bit rate, choose a higher value for better quality
-The lower the crf the better quality
-For a better overall quality, you can try to set -qmin to 0 and -qmax to 50 or lower.
for more in-depth information please refer to this site
https://trac.ffmpeg.org/wiki/Encode/VP8