android - ffmpeg-分割参数列表时出错 : Option not found

标签 android video ffmpeg

我正在尝试使用 ffmpeg-android-java 执行以下命令

-i /storage/sdcard0/WhatsApp/Media/WhatsApp Video/VID-20170228-WA0000.mp4 -ss 180 -t 292 -strict -2 -async 1 /storage/sdcard0/Movies/cropper_video_1.mp4



我收到失败消息-

FAILED with output : ffmpeg version n3.0.1 Copyright (c) 2000-2016 the FFmpeg developers built with gcc 4.8 (GCC) configuration: --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= libavutil 55. 17.103 / 55. 17.103 libavcodec 57. 24.102 / 57. 24.102 libavformat 57. 25.100 / 57. 25.100 libavdevice 57. 0.101 / 57. 0.101 libavfilter 6. 31.100 / 6. 31.100 libswscale 4. 0.100 / 4. 0.100 libswresample 2. 0.101 / 2. 0.101 libpostproc 54. 0.100 / 54. 0.100 Unrecognized option 'i /storage/sdcard0/WhatsApp/Media/WhatsApp Video/VID-20170228-WA0000.mp4 -ss 180 -t 292 -strict -2 -async 1 /storage/sdcard0/Movies/cropper_video_1.mp4'. Error splitting the argument list: Option not found



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

最佳答案

我遇到了一个非常相似的问题。我给的命令是

"-y -i /sdcard/Movies/test_video.3gp /sdcard/Movies/test_video.mp4"

我得到了以下错误

Unrecognized option 'y -i /sdcard/Movies/test_video.3gp /sdcard/Movies/test_video.mp4'. Error splitting the argument list: Option not found



原因是,我在一个字符串中给出了我的命令。相反,您必须将每个命令分解为自己的字符串并提供一个字符串数组
val command: List<String> = listOf("-y", "-i", "/sdcard/Movies/test_video.3gp", "/sdcard/Movies/test_video.mp4")

关于android - ffmpeg-分割参数列表时出错 : Option not found,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/42532106/

相关文章:

Android EdgeEffect 似乎分配了 1 meg 位图

Android -- 无法播放任何视频(mp4/mov/3gp/等)?

video - 在OpenCV中设置视频文件的捕获大小

bash - 特定时间的ffmpeg音频水印

android - 真正实时流式传输到 Android/iPhone

java - NullPointerException - 无法启动 Activity

java - 使用 Parcelable 发送 StringArray 时出现 NullPointerException

android - 我可以使用 retrofit 2 重新调用

algorithm - 视频场景检测实现

ffmpeg 输出图像文件名和时间位置