Wednesday, March 6, 2013

Stripping .mp4 files...

On a whim, I tried dropping an mp4 file, with video, in to the jukebox on Chrome, just to see what would happen. Turns out... Chrome automatically strips off the video stream, and plays the audio just fine!

MP4 files... if you don't know much/anything about this file format, MP4 is simply a container format, with hooks that allow audio streams (like AAC) and video streams (like h.264) to attach content, synchronize during playback, and do other media-ish things. An .mp4 file doesn't mean very much. If the video or audio stored in the file uses an obscure or unsupported codec, you can't play it.

Leaving work this afternoon, I wondered whether the <audio> tag would support playback of just the audio stream, since it plays .m4a files, which are intended to be mp4 files with only the audio stream. Looks like it does!

I'm going to come back to this topic later, and peel back some of the .mp4 file format. Stripping the video stream isn't very difficult, conceptually, and should be able to be done with very little effort.

No comments:

Post a Comment