Use the pulses to trigger a one-shot multivibrator, such as a 555, to generate a short, fixed-width pulse (the maximum pulse width would be slightly less than the minimum pulse period from the encoder). Then use a low-pass filter to generate the average value of the pulses.