w0rp zone
  • Blog
  • Video and Audio Are Great Now!

    I just wanted to write a mini post as a reminder about how great the world is now (in one respect), because <video> and <audio> work fantastically in web browsers these days. There was once a long and crazy battle between .webm and .mp4. It’s a fascinating topic in of itself, but essentially every browser, mobile, and computer vendor was fighting a ding-dong battle about which formats should be used on the web. This meant that HTML5 video and audio just didn’t work for years and years. I offer no citations because I’m lazy. Long story short, despite having weird ass scary licencing, H.264 won as the video format.

    Here is what you can use reliably in browsers today.

    format container
    H.264/AVC <video src="foo.mp4">
    AAC <video src="foo.mp4">, <audio src="foo.mp4">
    MP3 <audio src="foo.mp3">
    FLAC <audio src="foo.flac">

    It just works!

    Firefox will screw up if you upload AAC audio in .aac files, so just upload audio as .mp4 if you want AAC, or use MP3 for audio only.

    You will likely need to add controls="controls" to your tags, but you don’t need source or nuffin, just use HTML5 elements today, and only opt for something like YouTube or an MP3 sharing website if you run out of bandwidth. Enjoy the modern web!