Science Blog of Dr. Yuan分享 http://blog.sciencenet.cn/u/albumns This blog is mainly on Molecular molecular modelling and simulations

博文

generating MP4 files supporting HTML5 preview

已有 2016 次阅读 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  

 



https://blog.sciencenet.cn/blog-355217-1035411.html

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

0

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

数据加载中...

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

GMT+8, 2024-4-23 17:06

Powered by ScienceNet.cn

Copyright © 2007- 中国科学报社

返回顶部