Direct amplitude and phase shaping of mid-infrared femtosecond pulses is realized with a calomel-based acousto-optic programmable dispersive filter transparent between 0.4 and 20 μm. The shaped pulse electric field is fully characterized with high accuracy, using chirped-pulse upconversion and time-encoded arrangement spectral phase interferometry for direct electric field reconstruction techniques. Complex mid-infrared pulse shapes at a center wavelength of 4.9 μm are generated with a spectral resolution of 14 cm(-1), which exceeds by a factor of 5 the reported experimental resolutions of calomel-based filters.