Video info

Hello! I’ve picture in format ‘png’. I wont to make video from this picture. When i convert this picture to Texture2D, and then use Texture2D.EncodeToPng, and then File.WriteAllBytes(all data from EncodeToPng), got video, but i can’t play this video. What information i shoud add to the begin of the video? Or maybe you can recommend me some library. I wont to do it on Android.

Sorry for my English

You’ve got a single picture and what to make a video out off it? What’s the purpose?

No, i have a lot of pucture and i wont to make video from this picture

In game on runtime?
This sounds like a windows movie maker/Vegas thing to be exported to unity as a video

Texture2D.EncodeToPng gives you an image, not a video.

If you want to encode a series of PNG images together into a video, I’d suggest using ffmpeg for that.

Yes, but i need to do it on android. FFmpeg is exe programm, and i can’t run it on Android

It appears there’s an Android version here: GitHub - cropsly/ffmpeg-android: FFmpeg for Android compiled with x264, libass, fontconfig, freetype, fribidi and lame (Supports Android 4.1+)

If that doesn’t work, then the larger point is this: You need to find a library that will encode images into video. I don’t think Unity has one built in, but it looks like someone created a Unity plugin here:

https://github.com/keijiro/FFmpegOut