Convert mkv to mp4 (or webM) with the output file viewable in the process
This is possible for MP4, with a caveat. The command below will generate a fragmented MP4, which you can view in a browser while the conversion is taking place. However, only the fragments completely encoded at the time of launching the file, will be viewable. To view fragments encoded after that point, you'll have to reload the file/page.

ffmpeg -i input &lt;encoding parameters&gt; -movflags +frag_keyframe+separate_moof+omit_tfhd_offset+empty_moov out.mp4