I see other questions addressing the same subject:
But they are old and on this subject having updated information I think is crucial.
I am using now video/webm;codecs=vp9
but I am having problems with some browsers
So what format(s)/codec(s) versions of my video should I offer to support the last version of the major browsers in Windows, Linux, Mac, Android and iOS?
I am generating the video in the browser it self using MediaRecorder so if the suggested format(s)/codec(s) can be generated using this system this will save me the extra step to re-encode it on the server.
If you have a ffmpeg
command configuration to generate the format(s)/codec(s) this will also help me.
As @Offbeatmammal suggested on his/her comment, we can see the actual compatibility for the video codecs here:
But the amount of information there is huge and difficult to digest in a specific answer.
Our friends from developer.mozilla.org have some specific suggestions to make and I hope they are updated:
Result:
<video controls>
<source src="video.webm" type='video/webm; codecs="vp9, opus"'>
<source src="video.mp4" type='video/mp4; codecs="avc1, aac"'>
</video>
These are the ffmpeg
most basic configurations to generate such files:
# Webm
ffmpeg -i #INPUT -c:v libvpx-vp9 -c:a libopus video.webm
# MP4
ffmpeg -i #INPUT -c:v libx264 -c:a aac video.mp4