Video created by VideoIO.jl doesn't display properly on Android WhatsApp

Hello!

I’m trying to share some videos I generated using VideoIO.jl on WhatsApp. Although the videos work well on WhatsApp Web and WhatsApp iOS, I’m encountering some strange issues when I try to play them on my Android phone.

For instance, when I run the minimal working example from the VideoIO.jl documentation, which generates a grayscale random video, I see a green-scale video instead of a grayscale one. I’ve attached a screenshot of the issue below.

The videos I’m actually interested have an RGB{N0f8} color type. While I can see the correct thumbnail for these videos, I only get a black screen when I try to play them. I’ve confirmed that these issues also occur on another Android phone.

Is there a way to get these videos to work properly on WhatsApp for Android? I’d appreciate any suggestions or advice on how to resolve these issues.

Video codecs are tricky, in my experience any number of small things can trip up certain players or end devices. For example, many codecs don’t work right if the video doesn’t have a width and height divisible by 2. VideoIO calls ffmpeg with some preset codec settings I think, so you would have to check what those are and if you can find a reason why they wouldn’t be appropriate for your Android device. Maybe the defaults can be improved.