Videos recorded from a mac build is blue tinted
Hey! I tried to make a build on mac from this project. I'm using Unity 2018.4.32. And the videos recorded in the build are all blue tint. Meanwhile, videos recorded from the editor look normal. I suspect the pixel format argument mismatches render texture format somehow. I tried changing the pixel format from "rgba" to "bgra" but it becomes red-tinted. "bgra64be" it becomes green-tinted.
Besides, I got errors in the player log:
[rawvideo @ 0x7ffa80808200] Packet too small (3)
Error while decoding stream #0:0: Invalid data found when processing input
or
FFmpeg returned with warning/error messages. See the following lines for details:
[rawvideo @ 0x7fb75f008200] Invalid buffer size, packet size 8294403 < expected frame_size 16588800
Error while decoding stream #0:0: Invalid argument
Do you have any idea what causes blue tinted? Any insight on that would be quite helpful!
Thank you!
Vanilla
As a test, I ran through all the different -pixel_format for ffmpeg by changing the command line option specified in FFmpegSession.cs. I also tried cycling through the different color formats for the render texture. Neither gave me the results I was looking for.
i am also getting this problem with a linux build
OS: Ubuntu 20.04 Unity editor: 2020.3.31f1
update: ok it works fine in editor play but comes out tinted blue with build play
https://github.com/keijiro/FFmpegOut/pull/44 fixes the problem for me