I am using ffmpeg encoder to render Images in my Android App with the Help of this Library
The following Command is used to Render video from a list of images.
String command[] = {"-r","1/5","-i",gpxfile.getAbsolutePath(),"-c:v","libx264","-vf","fps=25","-pix_fmt","yuv420p",root.getAbsolutePath()+"/"+"video.mp4"};
and here the gpxfile is my text file that contains the following
file '/storage/emulated/0/DCIM/Camera/P_20170807_143916.jpg'
duration 2
file '/storage/emulated/0/DCIM/Pic/P_20170305_142948.jpg'
duration 5
file '/storage/emulated/0/DCIM/Camera/P_20170305_142939.jpg'
duration 6
file '/storage/emulated/0/DCIM/Pic/P_20170305_142818.jpg'
duration 2
My Problem is While Running the Command it renders a Terminal Like Black Screen with the TextPaths inside the file instead of a Video...!!! Any Suggestions...??
Here is my Project Source Code
Change your textfile to
file '/storage/emulated/0/DCIM/Camera/P_20170807_143916.jpg'
duration 2
file '/storage/emulated/0/DCIM/Pic/P_20170305_142948.jpg'
duration 5
file '/storage/emulated/0/DCIM/Camera/P_20170305_142939.jpg'
duration 6
file '/storage/emulated/0/DCIM/Pic/P_20170305_142818.jpg'
duration 2
file '/storage/emulated/0/DCIM/Pic/P_20170305_142818.jpg'
and then encode this command:
ffmpeg -f concat -i gpxfile.getAbsolutePath() -c:v libx264 -vf fps=25 -pix_fmt yuv420p root.getAbsolutePath()/video.mp4
最后,我从迪帕克那里得到了正确的命令。
String command[] = {"-y", "-f", "concat", "-safe", "0", "-i", gpxfile.getAbsolutePath(), "-vsync", "vfr", "-pix_fmt", "yuv420p", root.getAbsolutePath()+"/"+"video.mp4"};
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.