简体   繁体   English

无法根据图片(.jpeg)创建视频(.mp4)

[英]Unble to create video(.mp4) from images (.jpeg)

When I execute the ffmpeg command I get this error: 当我执行ffmpeg命令时,出现此错误:

Unable to find a suitable output format for ffmpeg 找不到适合ffmpeg的输出格式

String strCommand = "ffmpeg -loop 1 -t 3 -i " + list.get(0)" -loop 1 -t 3 -i " + list.get(1)+" -loop 1 -t 3 -i " + list.get(2)+" -loop 1 -t 3 -i " + list.get(3)+ " -filter_complex[0:v]trim=duration=3,fade=t=out:st=2.5:d=0.5[v0];[1:v]trim=duration=3,fade=t=in:st=0:d=0.5,fade=t=out:st=2.5:d=0.5[v1];[2:v]trim=duration=3,fade=t=in:st=0:d=0.5,fade=t=out:st=2.5:d=0.5[v2];[3:v]trim=duration=3,fade=t=in:st=0:d=0.5,fade=t=out:st=2.5:d=0.5[v3];[v0][v1][v2][v3]concat=n=4:v=1:a=0,format=yuv420p[v] -map [v] -preset ultrafast " + getVideoFilePath();

You command seems to be ok, please be sure that getVideoFilePath() can get a right path with the supported format, for example, /path/.../slide.mp4, here is a workable example ffmpeg line: 您的命令似乎没问题,请确保getVideoFilePath()可以使用支持的格式获取正确的路径,例如/path/.../slide.mp4,这是可行的ffmpeg示例行:

ffmpeg \
-loop 1 -t 3 -i pic001.jpg \
-loop 1 -t 3 -i pic002.jpg \
-loop 1 -t 3 -i pic003.jpg \
-loop 1 -t 3 -i pic004.jpg \
-filter_complex "\
[0:v]trim=duration=3,fade=t=out:st=2.5:d=0.5[v0];\
[1:v]trim=duration=3,fade=t=in:st=0:d=0.5,fade=t=out:st=2.5:d=0.5[v1];\
[2:v]trim=duration=3,fade=t=in:st=0:d=0.5,fade=t=out:st=2.5:d=0.5[v2];\
[3:v]trim=duration=3,fade=t=in:st=0:d=0.5,fade=t=out:st=2.5:d=0.5[v3];\
[v0][v1][v2][v3]concat=n=4:v=1:a=0,format=yuv420p[v]" \
-map "[v]" -preset ultrafast slide.mp4 

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 FFmpeg.avi转.mp4视频转码-Android - FFmpeg .avi to .mp4 video transcoding - Android Android-FFmpeg 为 mp4 视频添加字幕不起作用 - Android-FFmpeg adding subtitle to mp4 video does not work FFMPEG命令从图像(JPEG)+音频(.mp3)制作视频并在Whatsapp中分享视频 - Command of FFMPEG to make a video from Image(JPEG) + Audio(.mp3) & Share video in Whatsapp 视频JS中的手机上ffmpeg编码的mp4文件错误 - ffmpeg recoded mp4 files error on mobiles in Video JS 我需要在FFMpeg中启用哪些编码器/解码器/混合器/解复用器/解析器,才能将mp4视频转换为gif? - What encoders/decoders/muxers/demuxers/parsers do I need to enable in FFMpeg for converting an mp4 video to a gif? Android通过FFmpeg创建具有位图系列和mp3的MP4(我需要最少的ffmpeg配置进行构建) - Android Create MP4 with bitmap series and mp3 by FFmpeg (i need minimal ffmpeg config for build) 合并两个命令(从图像获取视频) - Combine Two Commands (Get Video from Images) ffmpeg for android,解码时内存不足,使用openh264旋转mp4文件 - ffmpeg for android, out of memory on decoding rotate mp4 file with openh264 将mp4文件逐帧读入google ML Kit的inputimage - Read a mp4 file frame by frame into inputimage of google ML Kit 除了使用FFMPEG和MP4Parser之外,有没有办法修剪视频? - Is there any way to trim video except using FFMPEG and MP4Parser?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM