FFMPEG:Multiple Image frames + 1 Audio =1 Video

前端 未结 4 1702
囚心锁ツ
囚心锁ツ 2020-12-01 20:43

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[         


        
4条回答
  •  难免孤独
    2020-12-01 21:10

    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

提交回复
热议问题