Science Blog of Dr. Yuan分享 This blog is mainly on Molecular molecular modelling and simulations


generating MP4 files supporting HTML5 preview

已有 1742 次阅读 2017-2-22 22:41 |个人分类:Linux相关|系统分类:科研笔记

Making a movie to show the simulation results has became a more and more popular task in computational structural biology. However, the raw movies generated by many tools, including VMD, ffmpeg or mencode, do not support playing  .mp4 files in a Web browser. This is mainly because these tools do not support libx264 code by default.

The solution for this issue is also quite straightforwad: either use the static precompiled ffmpeg or recompile ffmpeg with two addtional options "--enable-libx264 --enable-gpl".

Once it is done, one can generate or convert a .mp4 file, which supports being played in a HTML5 Web browser, using command line:

ffmpeg -i out.ogv -c:v libx264 -c:a aac -strict experimental -pix_fmt yuv420p -movflags +faststart x.mp4

上一篇:Basel Computational Biology Conference 2017
下一篇:PyMOL 1.8.6 released
收藏 IP: 212.27.185.*| 热度|


该博文允许注册用户评论 请点击登录 评论 (0 个评论)


Archiver|手机版|科学网 ( 京ICP备07017567号-12 )

GMT+8, 2022-11-29 19:51

Powered by

Copyright © 2007- 中国科学报社