Our Blog

More on Videos and HTML 5

by BillyTheKid June 15, 2010 08:37

After my last blog post on videos Encoding H264 for the iPhone I ran into a little issue with the videos I was encoding when trying to stream to the iPhone it would say "Movie could not be played".   The only difference I could see between one that I found that would play and mine was the codec, which was set to ISOM, instead of mp42 for one that worked.

It was quite a simple fix actually, just changing -f mp4 to -f ipod in the ffmpeg command line changes the format to M4V which the iPhone will stream without issue.  FFMpeg makes a minor complaint about using a .mp4 extension with m4v format, but it all works fine.  Credits to the Metal Toad Media blog for the fix.

Now we have H264 encoded .mp4 files which can be streamed to Safari or Chrome, as well as the iPhone.  Here is a very simple example of the HTML 5 video tag.

<html>
<head>
<title>Video Testing</title>
</head>
<body style="background-color:#FFFFFF; ">
<center>
<video controls>
<source src="http://www.technoponics.com/media/expo67.mp4" type="video/mp4">
</video>
</center>
</body>
</html>

Add comment




  Country flag

biuquote
  • Comment
  • Preview
Loading