我正在使用此代码合并所有具有相同编码,格式等的mp4文件。我的问题是在合并视频的接缝处出现断断续续/闪烁。 ffmpeg -f concat -i mylist.txt -c复制output.mp4
如何确保文件顺利合并?
这是命令提示符下的输出。
ffmpeg version N-91329-g830695be36 Copyright (c) 2000-2018 the FFmpeg developers
built with gcc 7.3.0 (GCC)
configuration: --enable-gpl --enable-version3 --enable-sdl2 --enable-bzlib --enable-fontconfig --enable-gnutls --enable-iconv --enable-libass --enable-libbluray --enable-libfreetype --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libopus --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libtheora --enable-libtwolame --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2 --enable-libzimg --enable-lzma --enable-zlib --enable-gmp --enable-libvidstab --enable-libvorbis --enable-libvo-amrwbenc --enable-libmysofa --enable-libspeex --enable-libxvid --enable-libaom --enable-libmfx --enable-amf --enable-ffnvcodec --enable-cuvid --enable-d3d11va --enable-nvenc --enable-nvdec --enable-dxva2 --enable-avisynth
libavutil 56. 18.102 / 56. 18.102
libavcodec 58. 20.103 / 58. 20.103
libavformat 58. 17.100 / 58. 17.100
libavdevice 58. 4.101 / 58. 4.101
libavfilter 7. 25.100 / 7. 25.100
libswscale 5. 2.100 / 5. 2.100
libswresample 3. 2.100 / 3. 2.100
libpostproc 55. 2.100 / 55. 2.100
[mov,mp4,m4a,3gp,3g2,mj2 @ 000001d1aab03b80] Auto-inserting h264_mp4toannexb bitstream filter
Input #0, concat, from 'mylist.txt':
Duration: N/A, start: 0.000000, bitrate: 74 kb/s
Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p(tv, bt709), 1920x1080 [SAR 1:1 DAR 16:9], 74 kb/s, 24 fps, 24 tbr, 24k tbn, 48 tbc
Metadata:
handler_name : VideoHandler
Output #0, mp4, to 'output2.mp4':
Metadata:
encoder : Lavf58.17.100
Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p(tv, bt709), 1920x1080 [SAR 1:1 DAR 16:9], q=2-31, 74 kb/s, 24 fps, 24 tbr, 24k tbn, 24k tbc
Metadata:
handler_name : VideoHandler
Stream mapping:
Stream #0:0 -> #0:0 (copy)
Press [q] to stop, [?] for help
[mov,mp4,m4a,3gp,3g2,mj2 @ 000001d1aab0c340] Auto-inserting h264_mp4toannexb bitstream filter
Last message repeated 1 times
frame= 195 fps=0.0 q=-1.0 Lsize= 77kB time=00:00:08.00 bitrate= 78.8kbits/s speed= 167x
video:73kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 5.518728%
ffmpeg version N-91329-g830695be36 Copyright (c) 2000-2018 the FFmpeg developers
built with gcc 7.3.0 (GCC)
configuration: --enable-gpl --enable-version3 --enable-sdl2 --enable-bzlib --enable-fontconfig --enable-gnutls --enable-iconv --enable-libass --enable-libbluray --enable-libfreetype --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libopus --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libtheora --enable-libtwolame --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2 --enable-libzimg --enable-lzma --enable-zlib --enable-gmp --enable-libvidstab --enable-libvorbis --enable-libvo-amrwbenc --enable-libmysofa --enable-libspeex --enable-libxvid --enable-libaom --enable-libmfx --enable-amf --enable-ffnvcodec --enable-cuvid --enable-d3d11va --enable-nvenc --enable-nvdec --enable-dxva2 --enable-avisynth
libavutil 56. 18.102 / 56. 18.102
libavcodec 58. 20.103 / 58. 20.103
libavformat 58. 17.100 / 58. 17.100
libavdevice 58. 4.101 / 58. 4.101
libavfilter 7. 25.100 / 7. 25.100
libswscale 5. 2.100 / 5. 2.100
libswresample 3. 2.100 / 3. 2.100
libpostproc 55. 2.100 / 55. 2.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '0_10secs.mp4':
Metadata:
major_brand : isom
minor_version : 512
compatible_brands: isomiso2avc1mp41
encoder : Lavf58.17.100
Duration: 00:00:09.71, start: 0.375000, bitrate: 74 kb/s
Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p(tv, bt709), 1920x1080 [SAR 1:1 DAR 16:9], 71 kb/s, 24 fps, 24 tbr, 24k tbn, 48 tbc (default)
Metadata:
handler_name : VideoHandler
Input #1, mov,mp4,m4a,3gp,3g2,mj2, from '5_10secs.mp4':
Metadata:
major_brand : isom
minor_version : 512
compatible_brands: isomiso2avc1mp41
encoder : Lavf58.17.100
Duration: 00:00:09.71, start: 0.375000, bitrate: 75 kb/s
Stream #1:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p(tv, bt709), 1920x1080 [SAR 1:1 DAR 16:9], 72 kb/s, 24 fps, 24 tbr, 24k tbn, 48 tbc (default)
Metadata:
handler_name : VideoHandler
Input #2, mov,mp4,m4a,3gp,3g2,mj2, from '0_3secs.mp4':
Metadata:
major_brand : isom
minor_version : 512
compatible_brands: isomiso2avc1mp41
encoder : Lavf58.17.100
Duration: 00:00:02.71, start: 0.375000, bitrate: 75 kb/s
Stream #2:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p(tv, bt709), 1920x1080 [SAR 1:1 DAR 16:9], 70 kb/s, 24 fps, 24 tbr, 24k tbn, 48 tbc (default)
Metadata:
handler_name : VideoHandler
Input #3, mov,mp4,m4a,3gp,3g2,mj2, from '10_10secs.mp4':
Metadata:
major_brand : isom
minor_version : 512
compatible_brands: isomiso2avc1mp41
encoder : Lavf58.17.100
Duration: 00:00:09.71, start: 0.375000, bitrate: 75 kb/s
Stream #3:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p(tv, bt709), 1920x1080 [SAR 1:1 DAR 16:9], 72 kb/s, 24 fps, 24 tbr, 24k tbn, 48 tbc (default)
Metadata:
handler_name : VideoHandler
At least one output file must be specified