Record audio+video in html5 with webRTC, and convert them in single mp4 (or any other format) file with ffmpeg.