FFmpegOut icon indicating copy to clipboard operation
FFmpegOut copied to clipboard

Videos recorded from a mac build is blue tinted

Open NavigateByCloud opened this issue 4 years ago • 4 comments

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

NavigateByCloud avatar Apr 15 '21 17:04 NavigateByCloud

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.

alxdncn avatar Apr 17 '21 22:04 alxdncn

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

cdg720 avatar Mar 22 '22 19:03 cdg720

https://github.com/keijiro/FFmpegOut/pull/44 fixes the problem for me

cdg720 avatar Mar 22 '22 21:03 cdg720