arthenica / ffmpeg-kit

FFmpeg Kit for applications. Supports Android, Flutter, iOS, Linux, macOS, React Native and tvOS. Supersedes MobileFFmpeg, flutter_ffmpeg and react-native-ffmpeg.
https://arthenica.github.io/ffmpeg-kit
GNU Lesser General Public License v3.0
4.29k stars 577 forks source link

[Android] - [Question] Create video from in memory images? #982

Open vieraleonel opened 4 months ago

vieraleonel commented 4 months ago

Hi. I have a Java Android app that writes between 30 to 50 images to disk then produces a mp4 video. Originally I have them in byte[] format but turn them into JPEG Bitmaps that then are written to files. I some conditions, this process is a bit slow, mainly because all the writing and consequent reading of the image files.

Is there any way to pass the in memory list of byte[] or list of Bitmap to ffmpeg input in order to prevent all the initial writing operations?

For reference the command im using is:

-f concat -i imagest.txt -c:v mpeg4 -pix_fmt yuv420p -framerate 50 -b:v 2000k video.mp4

Note: I also can't get to work the command with input 'image%d.jpeg' so I end up using concat with a text file as input.

Environment

tanersener commented 3 months ago

We don't have that kind of API yet. However, we plan to implement it since many developers have been requesting it.

QinGuiCheng commented 3 weeks ago

Has the problem been resolved?