From S1MP3 Wiki
Jump to: navigation, search

AMV format is the video format used by the video enabled S1mp3s.

Files of this format are suffixed with ".amv".

AVI container

The container format used by AMV files is a modified version of the AVI format.

It has the strings "AVI" and "avih" in the header replaced with "AMV" and "amvh". The section where codec, frame size, and other information would normally be found is filled with zeroes (because most of that information is hard-coded into the player). The the string "AMV_END_" is found at the end of the file.

AMV Video Structure

Here is a simple test to understand what's in the AMV video file.

  1. make an AVI video of total 10 frames using RAW DATA format, at 12fps sized 160x120 without sound
  2. save eche frame to BMP (do not use jpeg now, name them as 01.bmp ~ 10.bmp)
  3. convert the BMP files to JPEG, be careful with the JPEG compress level
  4. convert the AVI file to 160x120, 12fps AMV, again be careful about the Image quality setting which is the JPEG compress level, and set Image Zoom to 0
  5. compare the AMV and JPEG files using a hex editor

You will find jpeg headers inside the AMV file.

According to a comment in a blog post, AMV and MTV are both AVI based (ffmpeg demuxer has proven to be able to handle it, with a few hacks), some chunks are removed, some are modified.

The audio stream variant of IMA ADPCM encoding. First 8 bytes of each frame are used as origin and index (two shorts, 4 bytes) for ADPCM decoder and for length of audio frame (long, 4 bytes).

Video stream is composed of mjpeg frames (similar to jpeg images, but without quantization tables which can be obtained in jpeg standard).

Video Encoding

There are many tricks to encode a quality AMV video, both under windows and *nix. One can use pre-encoding to encrease quality or add subtitles. Refer to Video encoding for details.

Other meanings for AMV

  • The AMV term can be used also to designate Anime Music Videos.
  • One could say that the AMV is a ripoff from Apex Media Video for Nintendo Game Boy (Color). It isn't, our AMV is simple motion jpeg, where each frame is saved as jpeg.

Related pages

  • MTV - About the MTV video format