0

I'm trying to find a way to convert a MKV file into MP4 and actually already start to view it, while it's still converting. The output file would be viewed via Chrome or Firefox and I would like to use ffmpeg or avconv (or similar available on a headless server) to convert.

Any advice? Maybe even on recommended settings?

*edit: if it is quality-wise possible, webM could also be an option

1

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 <encoding parameters> -movflags +frag_keyframe+separate_moof+omit_tfhd_offset+empty_moov out.mp4

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.