No, you can’t do that with H.264

Use a codec that doesn’t need a license.

http://bemasc.net/wordpress/2010/02/02/no-you-cant-do-that-with-h264/