I also use Handbrake and, yes, it’s an amazing tool for compressing video for eLearnings. However, I’m not sure why it’s outputting in .m4v for you. That’s an Apple-wrapped version of .mp4. Are you using one of the Apple device presets for output?
I use the Fast 1080p30 output under the General group, and everything plays clear and fast in Lectora.