How can I convert a series of images to a valid HTML5 video

僤鯓⒐⒋嵵緔 提交于 2019-12-11 20:11:54

问题


I am attempting to encode a video from an image sequence, for embedding as an HTML5 video.

If any one have a answer....


回答1:


ffmpeg is a free and versatile command line tool that will convert between a number of video formats and codecs, including image sequences. Some instructions for converting from an image sequence to a video file are here:

http://www.ffmpeg.org/faq.html#How-do-I-encode-single-pictures-into-movies_003f

To make it work in the majority of web browsers, you'll want two versions of the video file: one in mp4 and one in webm. The command line would look roughly like this:

ffmpeg -f image2 -i image%d.jpg -vcodec libvpx -acodec libvorbis output.webm ffmpeg -f image2 -i image%d.jpg -vcodec libx264 -acodec libfaac output.mp4

You may also want to look into options for setting the bitrates and other options.




回答2:


HTML5 supports .mp4, .webm and .ogg videos, learn more here: http://www.w3schools.com/html/html5_video.asp

To convert other video formats to HTML5 supported video formats, follow the steps: http://www.aolor.com/video-converter/user-guide.html



来源:https://stackoverflow.com/questions/20033744/how-can-i-convert-a-series-of-images-to-a-valid-html5-video

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!