I use chrome javascript api mediaRecorder to record a webpage action into .m3u8 file, and then use ffmpeg(actually fluent_ffmpeg in node.js) to transfer it to a .mp4 file. But sometimes the video and audio is out of sync in the result .mp4 file. It doesn't happen everytime, so I think it might has something with the network.(network is not stable when recording)
The ffmpeg transfer commend is
-fflags +genpts', '-max_muxing_queue_size 99999', '-r 30', '-crf 20'
I am new to media codec and ffmpeg so any help would be appreciated.