It should be noted DOSBox uses it's own ZMBV codec for video compression which is lossless, optimized for game graphics and fast to compress in real-time during capture.
By converting to h264 the video is probably compatible with a wider range of devices, but the usual compression artifacts might appear if compression level is high.