gpt4 book ai didi

android - 使用 ffmpeg-moov atom 未找到错误的音频视频合并

转载 作者:太空狗 更新时间:2023-10-29 14:36:27 26 4
gpt4 key购买 nike

我正在使用下面的命令来合并音频和视频-

"-i", videoFileAbsolutePath, "-i", audioFileAbsolutePath, "-c:v", "copy", "-c:a", "aac", "-map", "0:v:0", "-map", "1:a:0", "-shortest", destinationFileAbsolutePath

对于少数视频,我遇到了以下错误-

ffmpeg version n3.0.1 Copyright (c) 2000-2016 the FFmpeg developers\n built with gcc 4.8 (GCC)\n 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=\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\nInput #0, mov,mp4,m4a,3gp,3g2,mj2, from '/storage/emulated/0/keepvid/Amar_Akbar_Anthony_(HD)_-_Hindi_Full_Movie_-_Amitabh_Bachchan,_Vinod_Khanna,_Rishi_Kapoor,_1080P.mp4':\n Metadata:\n major_brand : dash\n minor_version : 0\n
compatible_brands: iso6avc1mp41\n creation_time : 2018-10-23 19:02:47\n Duration: 02:46:52.04, start: 0.000000, bitrate: 1528 kb/s\n Stream #0:0(und): Video: 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 (default)\n Metadata:\n creation_time : 2018-10-23 19:02:47\n handler_name : VideoHandler\n[mov,mp4,m4a,3gp,3g2,mj2 @ 0xeb62d600] Format mov,mp4,m4a,3gp,3g2,mj2 detected only with low score of 1, misdetection possible!\n[mov,mp4,m4a,3gp,3g2,mj2 @ 0xeb62d600] moov atom not found\n/storage/emulated/0/keepvid/Amar_Akbar_Anthony_(HD)_-_Hindi_Full_Movie_-_Amitabh_Bachchan,_Vinod_Khanna,_Rishi_Kapoor,_1080P.m4a: Invalid data found when processing input

我在创建水印时也遇到了类似的错误-

"-i", videoFileAbsolutePath, "-i", imageFileAbsolutePath, "-filter_complex", "overlay=" + position, dest.getAbsolutePath()

ffmpeg version n3.0.1 Copyright (c) 2000-2016 the FFmpeg developers\n built with gcc 4.8 (GCC)\n 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=\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\nInput #0, mov,mp4,m4a,3gp,3g2,mj2, from '/storage/emulated/0/WhatsApp Business/Media/WhatsApp Business Video/VID-20190215-WA0016.mp4':\n Metadata:\n major_brand : mp42\n minor_version : 1\n compatible_brands: mp41mp42isom\n creation_time : 2019-02-14 11:53:37\n Duration: 00:00:45.56, start: 0.000000, bitrate: 1444 kb/s\n Stream #0:0(und): Video: h264 (Baseline) (avc1 / 0x31637661), yuv420p(tv, bt709), 848x480, 1382 kb/s, 29.98 fps, 29.97 tbr, 600 tbn, 1200 tbc (default)\n Metadata:\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, stereo, fltp, 59 kb/s (default)\n Metadata:\n creation_time : 2019-02-14 11:53:37\n handler_name : Core Media Audio\n[mov,mp4,m4a,3gp,3g2,mj2 @ 0xf0e30600] Format mov,mp4,m4a,3gp,3g2,mj2 detected only with low score of 1, misdetection possible!\n[mov,mp4,m4a,3gp,3g2,mj2 @ 0xf0e30600] moov atom not found\n/storage/emulated/0/Movies/IMG-20190225-WA0030.jpg.mp4: Invalid data found when processing input\n

我该如何解决这个错误?

最佳答案

如果你想拥有与输入格式相同的输出格式并且我们假设视频文件不包含任何音频流,你可以将以下FFmpeg命令适配到android:

ffmpeg -i video.mp4 -i audio.wav -c:v copy -c:a aac -strict experimental output_merged.mp4

如果您的一个流比另一个流长,您可以添加 -shortest 选项,这样 FFmpeg 将在一个文件结束时停止编码。

关于android - 使用 ffmpeg-moov atom 未找到错误的音频视频合并,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/54529136/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com