I am using this library Android-MJPEG-Video-Capture-FFMPEG to and getting the frames with using the camera..I am Using below FFMPEG command for this
String[
Try with the below command it should work with multiple images Library - https://github.com/WritingMinds/ffmpeg-android-java
Here test$04d.png refers to series of images like test0001.png, test0002.png etc.. make sure that you have the same name image conventions for your images names
ffmpeg -r 1/5 -i /storage/emulated/0/Pictures/Screenshots/test%04d.png -c:v libx264 -vf fps=20 -pix_fmt yuv420p /storage/emulated/0/Movies/out.mp4
With Music file
ffmpeg -r 1/5 -i /storage/emulated/0/Pictures/Screenshots/test%04d.png -i /storage/emulated/0/Pictures/Screenshots/music.mp3 -c:v libx264 -vf fps=20 -pix_fmt yuv420p /storage/emulated/0/Movies/out.mp4
Good luck