簡體   English   中英

音頻視頻合並使用ffmpeg- moov atom not found錯誤

[英]Audio Video merge using ffmpeg- moov atom not found error

我正在使用以下命令合並音頻和視頻 -

"-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-archarch = 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 =' - 我/ home / vagrant / SourceCode / ffmpeg-android / toolchain-android / include -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE = 2 -fno-strict-overflow -fstack-protector-all' - e xtra-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(高)(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,誤檢可能 !\\ [mov,mp4,m4a,3gp,3g2,mj2 @ 0xeb62d600] 未找到moov原子\\ 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-archarch = 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 =' - 我/ home / vagrant / SourceCode / ffmpeg-android / toolchain-android / include -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE = 2 -fno-strict-overflow -fstack-protector-all' - e xtra-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商業/媒體/ WhatsApp商業視頻/ 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:核心媒體 視頻\\ n流#0:1(und):音頻: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原子 \\ n / storage / emulated / 0 / Movies / IMG-20190225-WA0030.jpg.mp4: 處理時發現無效數據輸入 \\ n

我該如何解決這個錯誤?

如果您希望輸入格式與輸入格式相同,並且我們假設視頻文件不包含任何音頻流,您可以將以下FFmpeg命令調整為android:

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

如果您的一個流比另一個流長,您可以添加-shortest選項,以便FFmpeg在一個文件結束后停止編碼。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM