首页 文章

剪切视频时无法找到合适的输出格式

提问于
浏览
0

我正在使用以下命令剪切视频 -

String complexCommand = new String[]{"-y", "-i", yourRealPath, "-ss", "" + startMs / 1000, "-t", "" + (endMs - startMs) / 1000, "-c", "copy", filePath};

我得到以下错误 -

“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,now -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输入#0,mov,mp4 ,m4a,3gp,3g2,mj2,来自'/storage/emulated/0/Download/file3gpp.3gpp':\ n元数据:\ n major_brand:3gp4 \ n minor_version:0 \ n compatible_brands:isom3gp4 \ n creation_time:2018- 04-09 12:04:29 \ n com.android.version:7.1.1 \ n持续时间:00:00:04.88,开始:0.000000,比特率:1425 kb / s \ n流#0:0(eng):音频:aac(LC)(mp4a / 0x6134706D),44100 Hz,mono,fltp,96 kb / s(默认)\ n元数据:\ n creation_time:2018-04-09 12:04:29 \ n handler_name:SoundHandle \ n [NULL @ 0xf622a600]无法为'/ storage / e找到合适的输出格式mulated / 0 / Movies / cut_video.3gpp'\ n / storage / emulated / 0 / Movies / cut_video.3gpp:参数无效\ n“

为什么我会收到此错误,我该如何解决?

1 回答

  • 0

    认可的延期是 .3gp . 对于自定义扩展,请在 filePath 之前添加 "-f", "3gp", .

相关问题