Click here to Skip to main content
15,889,773 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Can anyone tell me which codec is best for mp4, the generated mp4 file should be playable in html5 video tag and in all the possible os(windows/mac/android/ios) also.
Posted

1 solution

The problem is not just the codec, the problem is the codec and the container (which is also sometimes confusingly called "format"): http://en.wikipedia.org/wiki/Media_container[^].

Now, with HTML5, the real problem is not the codec+container, the problem is the choice of combination which is supposed to be supported on most systems. This is really a problem, because, unfortunately, "the current HTML5 draft specification does not specify which video formats browsers should support": http://en.wikipedia.org/wiki/HTML5_video#Supported_video_formats[^].

To me, it looks like these days it would be most practical to use WebM, but, by apparent reasons, I cannot be 100% sure. Please see:
http://en.wikipedia.org/wiki/WebM[^],
http://www.webmproject.org/[^],
http://en.wikipedia.org/wiki/VP8[^],
http://en.wikipedia.org/wiki/VP9[^].

Or it could be Ogg Theora:
http://en.wikipedia.org/wiki/Theora[^],
http://en.wikipedia.org/wiki/Use_of_Ogg_formats_in_HTML5[^],
http://www.theora.org/[^].

So, just in case, get ready to be able to re-master your media clips as situation and trends change.

The best remastering/trans-coding and most portable tool available these days, I think, would be FFMpeg or libavcodec, related open-source libraries and utilities. So far, I was able to solve all the problems related to media, sometimes even quite tricky which I could not solve using anything else. Please see:
http://en.wikipedia.org/wiki/Ffmpeg[^],
http://ffmpeg.org/[^],
http://en.wikipedia.org/wiki/Libavcodec[^],
http://libav.org/[^].

—SA
 
Share this answer
 
v3

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900