我正在使用以下命令将视频转换为gif-
String complexCommand = new String[]{"-ss", "" + startMs / 1000, "-t", "" + (endMs - startMs) / 1000, "-y", "-i", inputFileAbsolutePath, "-vf", "scale=500:-1", "-r", "10", outputFileAbsolutePath};
该命令在我的设备上似乎可以正常运行,但是我从用户的设备之一获得以下错误-
“ ffmpeg版本n3.0.1版权所有(c)2000-2016 FFmpeg开发人员\ n 使用gcc 4.8(GCC)\ n配置构建:--target-os = linux --cross-prefix = / home / vagrant / SourceCode / ffmpeg-android / toolchain-android / bin / arm-linux-androideabi- --arch = arm --cpu = cortex-a8 --enable-runtime-cpudetect --sysroot = / home / vagrant / SourceCode / ffmpeg-android / toolchain-android / sysroot --enable-pic --enable-libx264 --enable-libass --enable-libfreetype --enable-libfribidi --enable-libmp3lame --enable-fontconfig --enable-pthreads --disable-debug --disable-ffserver --enable-version3 --enable-hardcoded-tables --disable-ffplay --disable-ffprobe --enable-gpl --enable-yasm --disable-doc --disable-shared --enable-static --pkg -config = / home / vagrant / SourceCode / ffmpeg-android / ffmpeg-pkg-config --prefix = / home / vagrant / SourceCode / ffmpeg-android / build / armeabi-v7a --extra-cflags ='-I / home / vagrant / SourceCode / ffmpeg-android / toolchain-android / include -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE = 2 -fno-strict-overflow -fstack-protector-all'--extra-ldflags ='-L / home / vagrant / SourceCode / ffmpeg-android / toolchain-android / lib -Wl,-z,relro -Wl,-z,现在-pie'--extra-libs ='-lpng -lexpat -lm'--extra-cxxflags = \ n libavutil 55. 17.103 / 55. 17.103 \ n libavcodec 57. 24.102 / 57. 24.102 \ n libavformat 57. 25.100 / 57. 25.100 \ n libavdevice 57. 0.101 / 57. 0.101 \ n libavfilter 6. 31.100 / 6. 31.100 \ n libswscale 4. 0.100 / 4. 0.100 \ n libswresample 2. 0.101 / 2. 0.101 \ n libpostproc 54. 0.100 / 54. 0.100 \ n [mov,mp4,m4a,3gp,3g2,mj2 @ 0xac53b200]找不到流0的编解码器参数(视频:h264(avc1 / 0x31637661),无, 640x480,473 kb / s):未指定的像素格式\ n请考虑增加 'analyzeduration'和'probesize'选项的值\ n输入#0, mov,mp4,m4a,3gp,3g2,mj2,来自 '/storage/emulated/0/Movies/cut_video.mp4':\n元数据:\ n
major_brand:isom \ n minor_version:512 \ n
compatible_brands:isomiso2avc1mp41 \ n编码器: Lavf57.25.100 \ n时长:00:00:15.02,开始:0.000000,比特率:652 kb / s \ n流#0:0(und):视频:h264(avc1 / 0x31637661),无, 640x480、473 kb / s,25 fps,25 tbr,12800 tbn,25600 tbc(默认)\ n
元数据:\ n handler_name:VideoHandler \ n流#0:1(und): 音频:aac(LC)(mp4a / 0x6134706D),48000 Hz,5.1,fltp,384 kb / s (默认)\ n元数据:\ n handler_name: SoundHandler \ n [缓冲区@ 0xac540bb0]无法解析选项值 \“-1 \”为像素格式\ n上一条消息重复1次\ n [缓冲区@ 0xac540bb0]将选项pix_fmt设置为值-1时出错。\ n [图0输入 来自流0:0 @ 0xac540b20]将选项应用于 过滤器。\ n打开过滤器时出错!\ n“
为什么会出现此错误,我该如何解决?