|
AmvDocumentation
AMV video origin and historyThe AMV is a proprietary file format (container format) created for the S1MP3 players to allow video playback without having to rise the costs of manufacturing. The video playback could have been another, like AVI for example, but often these formats need special hardware codecs and they have expensive license royalties. Also, the AMV format uses less compression and in this way there is no need for high power processors. This also leads to higher playback time. The compressionWhen playing AMV format, there is clearly some image de/compression taking place, as can be demonstrated by a simple calculation (AMV video format). The image compression is, however, low by modern standards (around 4 pixels/byte, compared with over 10 pixels/byte for MPEG2/DVD). With a resolution of 128 × 96, and a frame rate of 12 fps, a 30 minute file will be around 80MBytes in size. The AMV file formatContainerThe AMV format is in fact a modified version of the AVI container, the former Microsoft video format (now replaced by the more capable WMV). Like the AVI format, the header contains two strings, "avih" and "amvh" ("AVI" and "avih" for AVI). 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's firmware). Tthe string "AMV_END" is found at the end of the file. The modified avi header contains several 'garbage' values because many of the parameters are hardcoded. It contains a RIFF packed stream of video data and ADPCM encoded audio. There is an open source decoder (written in Perl) for the format. VideoAccording to its author, the video codec is a modified version of Motion JPEG but missing quantization tables which are fixed (from jpeg standard). AudioAudio is a variant of IMA ADPCM where the first 8 bytes of each frame are:
There is also apologize that trellis quantizaton is used. Formal AMV movie format SpecificationRIFF('AVI '
LIST(
'hdrl'
'avih'
LIST(
'strl'(video stream info)
'strh'
'strf'
)
LIST(
'strl'(audio stream info)
'strh'
'strf' )
LIST(
'movi'(data)
.
00dc(video frame data)
01wb(audio data)
00dc(video frame data)
01wb(audio data)
...
00dc(video frame data)
01wb(audio data)
'AMV_END_'
)
typedef struct _amvmainheader {
FOURCC fcc; // 'amvh'
DWORD cb;
DWORD dwMicroSecPerFrame;
BYTE reserve[28];
DWORD dwWidth;
DWORD dwHeight;
DWORD dwSpeed;
DWORD reserve0;
DWORD reserve1;
BYTE bTimeSec;
BYTE bTimeMin;
WORD wTimeHour;
} AMVMAINHEADER;
typedef struct _amvstreamheader {
FOURCC fcc; // 'strh'
DWORD cb;
BYTE reserve[56];
} AMVSTREAMHEADER;
typedef struct {
WORD wFormatTag; //(Fixme: this is equal to PCM's 0x01 format code)
WORD nChannels; //(Fixme: this is always 1)
DWORD nSamplesPerSec; //(Fixme: for all known sample files this is equal to 22050)
DWORD nAvgBytesPerSec; //(Fixme: for all known sample files this is equal to 44100)
WORD nBlockAlign; //(Fixme: this seems to be 2 in AMV files, is this correct ?)
WORD wBitsPerSample; //(Fixme: this seems to be 16 in AMV files instead of the expected 4)
WORD cbSize; //(Fixme: this seems to be 0 in AMV files)
WORD reserved;
} WAVEFORMATEX;
Open source decoderThe decoder extracts each frame into a JPEG file and then uses ffmpeg to encode the video in another format. Here is a simple test to understand what's in the AMV video file.
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 is a variant of IMA ADPCM encoding. First 8 bytes of each frame are used os 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). The Apex issueThere is a big possibility that the AMV movie format used by S1mp3 is a rip of 'Apex Media Video' for Nintendo Game Boy (Color). Older info on it can be found at the Apex Designs page. Apex claim pretty good compression ratios and it is capable of being decoded on GB. It is possible that AMV is a rip-off of that codec, mainly considering both devices work with a Z80-based instruction set. The company hasn't replied to the email sent about the issue. AMV Video format isn't Apex Media Video format, it is simple motion JPEG where each frame is saved as JPEG. Software players that support AMV playback
Software players that support MTV playback
Hardware players that support AMV and MTV playbackChinese-made portable MP3 players, also known as S1 MP3 Players. Anime Music VideoThe AMV term can be used also to designate Anime Music Videos. ControversiesThe players that use this format are wrongly named "MP4 Players". In fact, the AMV (and the MTV) formats are not belonging to the MP4 family. The proper term that would define these players is "S1MP3" as named by their creators. AMV and MTV encoding/transcoding information and utilitiesOpen source AMV decoder written in Perl External Links"Chinese-made portable MP3 player" article on wikipedia.org "S1 MP3 Player" article on wikipedia.org www.mympxplayer.org - MP4 resource site and support forum MTV Video topic-thread on moviecodec.com forum MP4 Player Search - Community powered and driven MP4 Nation Knowledge Base: Support and tips on MP4 Players An introduction to MP4 players, what they do, what you can do to them and a review Recovering dead players and other software (A negative) video-review of one of these MP4-Players on Youtube Chinavasion - China direct wholesaler of MP4 Players using AMV video format HOW TO: Converting movies to AMV with subtitle, without VirtualDub.
|
Nice!
I cant convert amv format.i tried to use format factory but its not working