[FFmpeg-devel] [PATCH 0/5] AMV muxing and adpcm_ima_amv encoding support

Zane van Iperen zane at zanevaniperen.com
Mon Nov 2 11:37:52 EET 2020


Adds support for encoding to adpcm_ima_amv and muxing to AMV.

Things to note:
- AMV is a hard-coded (and broken) subset of AVI. It's not worth sullying the
  existing AVI muxer with its filth.
- The muxer is extremely pedantic about its streams, this is to
  not break certain software players.
- The sizes of certain tags are deliberately set to 0 as some players break
  when they're set correctly. Ditto with some header fields.
- Players can be **very** sensitive to the frame order and sizes.
  - Frames must be strictly interleaved as V-A, any V-V or A-A will
    cause crashes.
  - Variable audio frame sizes cause crashes.
  - If audio is shorter than video, it's padded with silence.
  - If video is shorter than audio, the most recent frame is repeated.

Zane van Iperen (5):
  avcodec/adpcm_ima_amv: restrict to 1 channel
  avcodec/adpcm_ima_amv: handle odd sample counts
  avcodec/adpcm_ima_amv: document header format
  avcodec: add adpcm_ima_amv encoder
  avformat: add amv muxer

 MAINTAINERS                  |   1 +
 doc/general_contents.texi    |   2 +-
 libavcodec/adpcm.c           |  40 +++-
 libavcodec/adpcmenc.c        |  58 ++++-
 libavcodec/allcodecs.c       |   1 +
 libavcodec/utils.c           |   3 +-
 libavformat/Makefile         |   1 +
 libavformat/allformats.c     |   1 +
 libavformat/amvenc.c         | 408 +++++++++++++++++++++++++++++++++++
 tests/ref/fate/adpcm-ima-amv | 312 +++++++++++++--------------
 10 files changed, 666 insertions(+), 161 deletions(-)
 create mode 100644 libavformat/amvenc.c

-- 
2.28.0




More information about the ffmpeg-devel mailing list