video - Using ffmpeg create an android playable music slide show -
Now I am making a music slide mp3 video and running it with the FFPAAG in Android device.
I used the following command to complete this mission.
The first thing to do is to input a batch of JPG files and convert it to an MP3 file.
1.) C: / xampp / htdocs / bin / ffmpeg -y -r 1/5 -i C: /xampp/htdocs/bin/%03d.jpg -c: v libx264 -profile: v baseline -live 3.0-R30-px_fmt yuv420p c: /xampp/htdocs/bin/out.mp4 The second one is to be inserted into a previously created video.
2.) C: / xampp / htdocs / bin / ffmpeg -i C: /xampp/htdocs/bin/out.mp4-i C: / xampp / htdocs / upload / 1. MP3-A-Map 0-Map 1- Codec Copy-Shortcut C: /xampp/htdocs/bin/haha.mp4 " Both commands are correct and mp3 files are created However, only MF4 can be played in Android devices, while Haha.mp3 can not do 4.
It seems that the audio track violates the requirement of Android MP3.What is the second order? Should I file in the MP3 Android device.
Some device MP4 Do not like MP3 audio in container. AAC audio is more common A simple command:
ffmpeg -i video -i audio-map 0: v -map 1: a -codec: v copy -codec: a aac \ - strict experimental- B: 192C -Max output.mp4 Note that I have -map 0 -map1 Due to -map 0: v - map1: a is more specific, perhaps you do not want to include any album art from audio input (this can be an additional, separate video stream One more order for your case, you can do everything in one command instead:
ffmpeg -framerate 1/5 -i% 03d.jpg -i audio. Mpps -map 0: v -map 1: a -c: v vbx264 \ -profile: v baseline-level 3.0 -r 30-pix_fmt yuv420p -c: an AAC-system experimental-B: 1 9 2a - Shortstep output. MP4 -
This example uses native FFmpeg AAC encoder. If it is considered experimental, the results may vary, but it is not a terrible encoder with enough bitrate.
-
If you have your ffmpeg then look for additional suggestions, examples and information. -
You may experience many problems like leaving a frame when creating videos from images. See solutions for solutions.
Comments
Post a Comment