80 points · by susam · 7y ago · 36 comments
> my contacts who might be on devices that do not support playing AVI files, so I decided to convert this to MP4 format
– a file being an AVI tells you practically nothing about the actual codecs and streams contained within, and the same stands for MP4.
It seems DOSbox writes AVI files that contain video encoded in its own ZMBV codec (see https://wiki.multimedia.cx/index.php/DosBox_Capture_Codec); even if OP's contacts had devices that could play AVIs, it's likely they couldn't play that AVI anyway...
Input #0, avi, from 'dosbox_000.avi':
Duration: 00:00:03.64, start: 0.000000, bitrate: 1532 kb/s
Stream #0:0: Video: zmbv (ZMBV / 0x56424D5A), pal8, 640x400, 98 kb/s, 70.09 fps, 70.09 tbr, 70.09 tbn, 70.09 tbc
Stream #0:1: Audio: pcm_s16le ([1][0][0][0] / 0x0001), 44100 Hz, 2 channels, s16, 1411 kb/sFor people on mobile/lazy: https://wiki.multimedia.cx/index.php/DosBox_Capture_Codec
-----
For those interested in an even deeper dive:
Decoder: https://github.com/FFmpeg/FFmpeg/blob/master/libavcodec/zmbv...
Encoder: https://github.com/FFmpeg/FFmpeg/blob/master/libavcodec/zmbv...
This implementation was written almost immediately after dosbox added the codec.
https://github.com/svn2github/dosbox/blob/acd380bcde72db74f3...
In some modes, like 320x200, pixels are 20% taller than "normal" square pixels. If you don't account for that, everything looks vertically squished.
You are right. I did not account for the aspect ratio. I will consider fixing the aspect ratio and updating the images.
How? Are the iframes losslessly compressed? For some reason I thought they were equivalent to JPEG.
https://dsp.stackexchange.com/questions/27752/is-dct-discret...
I personally won't call it lossless then, since no one will call 100% JPEG (even the 4:4:4 one) "lossless" (there is an entirely separate "true" lossless JPEG that no one uses).
But I'm not trying to argue if it's the term H264/video codec community uses.
Also I second izacus' "don't use baseline". I would even use a higher profile, for quality's sake. For bad clients you would always convert content if needed. Unless of course, you are one of those users constrained by them in the first place.