【发布时间】:2019-06-28 23:03:21
【问题描述】:
我正在使用以下命令来合并音频和视频-
"-i", videoFileAbsolutePath, "-i", audioFileAbsolutePath, "-c:v", "copy", "-c:a", "aac", "-map", "0:v:0", "-map", "1:a:0", "-shortest", destinationFileAbsolutePath
对于少数视频,我遇到了错误-
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/keepvid/Amar_Akbar_Anthony_(HD)_-_Hindi_Full_Movie_-_Amitabh_Bachchan,_Vinod_Khanna,_Rishi_Kapoor,_1080P.mp4': \n 元数据:\n major_brand : dash\n minor_version : 0\n
compatible_brands: iso6avc1mp41\n creation_time : 2018-10-23 19:02:47\n 持续时间:02:46:52.04,开始:0.000000,比特率:1528 kb/s\n 流 #0:0(und): 视频: h264 (High) (avc1 / 0x31637661), yuv420p(tv, bt709), 1920x1080 [SAR 1:1 DAR 16:9], 0 kb/s, 25 fps, 25 tbr、90k tbn、50 tbc(默认)\n 元数据:\n creation_time : 2018-10-23 19:02:47\n handler_name : VideoHandler\n[mov,mp4,m4a,3gp,3g2,mj2 @ 0xeb62d600] 格式 mov,mp4,m4a,3gp,3g2,mj2 仅检测到低分 1, 可能会误检测!\n[mov,mp4,m4a,3gp,3g2,mj2 @ 0xeb62d600] 找不到moov atom\n/storage/emulated/0/keepvid/Amar_Akbar_Anthony_(HD)_-_Hindi_Full_Movie_-_Amitabh_Bachchan,_Vinod_Khanna,_Rishi_Kapoor,_1080P.m4a: 处理输入时发现无效数据
我在创建水印时也遇到了类似的错误-
"-i", videoFileAbsolutePath, "-i", imageFileAbsolutePath, "-filter_complex", "overlay=" + position, dest.getAbsolutePath()
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-调试 --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/WhatsApp Business/Media/WhatsApp Business Video/VID-20190215-WA0016.mp4':\n 元数据:\n major_brand : mp42\n minor_version : 1\n compatible_brands: mp41mp42isom\n creation_time : 2019-02-14 11:53:37\n 持续时间: 00:00:45.56, 开始: 0.000000, 比特率: 1444 kb/s\n 流#0:0(und) :视频:h264(基线)(avc1 / 0x31637661)、yuv420p(tv、bt709)、848x480、1382 kb/s、29.98 fps、29.97 tbr、600 tbn、1200 tbc(默认) \n 元数据:\n creation_time : 2019-02-14 11:53:37\n handler_name : Core Media Video\n Stream #0:1(und): Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz , 立体声, fltp, 59 kb/s (默认)\n 元数据:\n creation_time : 2019-02-14 11:53:37\n handler_name : Core Media Audio\n[mov,mp4,m4a,3gp,3g2, mj2 @ 0xf0e30600] 格式 mov,mp4,m4a,3gp,3g2,mj2 仅检测到低分 1,可能误检测!\n[mov,mp4,m4a,3gp,3g2,mj2 @ 0xf0e30600] moov atom not找到\n/storage/emulated/0/Movies/IMG-20190225-WA0030.jpg.mp4:处理输入时发现无效数据\n
我该如何解决这个错误?
【问题讨论】:
-
您是如何创建这些问题文件的?提供一个链接,以便我们进一步调查。
-
这在第二个日志 IMG-20190225-WA0030.jpg.mp4 中看起来很奇怪,路径有问题吗?
标签: android video ffmpeg android-ffmpeg video-editing