How to keep audio and video in sync?
It sounds like the video frame rate probably got messed up.  You need to make sure you compress the video to the same framerate in webm as the source is.  Also, m4v and mp4 are synonyms, you don't need to alter the file, you can just change the extension.