我正在尝试对视频进行编码,以便在小型视频录制平板电脑上播放,但它对格式非常挑剔。以下是设备本身录制的示例文件:
ffmpeg -i AMSG0003.AVI
ffmpeg version N-94646-g1cfba7fc75 Copyright (c) 2000-2019 the FFmpeg developers
built with gcc 9.1.1 (GCC) 20190807
configuration: --enable-gpl --enable-version3 --enable-sdl2 --enable-fontconfig --enable-gnutls --enable-iconv --enable-libass --enable-libdav1d --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 --enable-libopenmpt
libavutil 56. 33.100 / 56. 33.100
libavcodec 58. 55.101 / 58. 55.101
libavformat 58. 31.102 / 58. 31.102
libavdevice 58. 9.100 / 58. 9.100
libavfilter 7. 58.101 / 7. 58.101
libswscale 5. 6.100 / 5. 6.100
libswresample 3. 6.100 / 3. 6.100
libpostproc 55. 6.100 / 55. 6.100
[avi @ 0000021e58ac8480] non-interleaved AVI
Guessed Channel Layout for Input Stream #0.1 : mono
Input #0, avi, from 'AMSG0003.AVI':
Duration: 00:00:48.27, start: 0.000000, bitrate: 2472 kb/s
Stream #0:0: Video: mjpeg (Baseline) (MJPG / 0x47504A4D), yuvj422p(pc, bt470bg/unknown/unknown), 640x480, 2253 kb/s, 30 fps, 30 tbr, 30 tbn, 30 tbc
Stream #0:1: Audio: pcm_u8 ([1][0][0][0] / 0x0001), 24000 Hz, mono, u8, 192 kb/s
At least one output file must be specified
请注意[avi @ 0000021e58ac8480] non-interleaved AVI
。即使我这样做了ffmpeg -i AMSG0003.AVI -acodec copy -vcodec copy -fflags +bitexact AMSG0004.AVI
,结果也会从比特率 2472kb/s 变为 2453kb/s,长度从 48.27s 变为 48.17s,并且不会出现有关“非交错 AVI”的消息,最重要的是,文件在复制回设备时将无法工作。
有没有什么办法可以让 ffmpeg 创建非交错 AVI?
答案1
编号 音频 视频交错文件应交错。否则,文件将与规格有偏差。