video-automation
所属分类:matlab编程
开发工具:HTML
文件大小:0KB
下载次数:0
上传日期:2016-08-31 03:22:26
上 传 者:
sh-1993
说明: 简单的Go程序,以编程方式生成一系列视频,基于一些YAML数据和HTML模板...
(Simple Go program to generate a series of videos programmatically, based on some YAML data and an HTML template with animations.)
文件列表:
data.yaml (323, 2016-08-30)
event.yaml (152, 2016-08-30)
images/ (0, 2016-08-30)
images/gomtl-logo-512.png (52830, 2016-08-30)
images/sponsors/ (0, 2016-08-30)
images/sponsors/google.svg (2123, 2016-08-30)
images/sponsors/intel-security.png (31850, 2016-08-30)
images/sponsors/intel-security.svg (14988, 2016-08-30)
images/sponsors/la-gare.png (28159, 2016-08-30)
images/sponsors/shopify-logo.svg (33768, 2016-08-30)
main.go (3727, 2016-08-30)
models.go (1078, 2016-08-30)
sponsors.yaml (300, 2016-08-30)
talks.yaml (900, 2016-08-30)
technology/ (0, 2016-08-30)
technology/technology.css (8334, 2016-08-30)
technology/technology.html (8369, 2016-08-30)
template.html (5107, 2016-08-30)
Generate videos out of animated HTML pages
==========================================
This little project does only one simple thing: it generates a series
of videos based on some data in `.yaml` files and a `template.html`,
rendering each as MP4 files (using ffmpeg) from the moment an element
`.capture` is displayed, until it is hidden.
My primary goal was to create dynamic videos to introduce speakers in
the video recording of the sessions at Golang Montréal meetups
(https://golangmontreal.org). I wanted to cut the post-production
cost of doing videos recordings of the session, so I coded the
repetitive stuff.
Check `talks.yaml`, `sponsors.yaml` and `event.yaml` to see the
format. This mostly refers to the structure we use in
https://github.com/gomtl/golangmontreal.org `content` and `data` dirs.
See the included `template.html` for an example template.
It then uses ChromeDriver (using
[the agouti WebDriver implementation](https://github.com/sclevine/agouti)
) to open the browser, resize it properly, load the template from its
own internal web server. It waits until an HTML node with a `capture`
class appears (on the body for example). It then starts `ffmpeg` to
capture the screen at 25 fps, writing an .mp4 file in H.264 to disk for each
entry in the `data.yaml`. When the `capture` class disappears, the
video stops. It then proceeds to the next video.
Pretty simple eh ?
Dependencies
------------
You need to have the binary for `ffmpeg` available in your PATH (with
libx264 support). You also need
[chromedriver](https://sites.google.com/a/chromium.org/chromedriver/downloads)
to be in your PATH for agouti to pick up. You'll also need Google
Chrome install.. I'll let you figure that one out.
Limitations
-----------
This currently runs only on Linux (uses the x11grab ffmpeg
module). The window-decorations dimensions are modeled around the
Ubuntu Unity environment and are currently hard-coded.
It could be adapted to run on Windows though.
近期下载者:
相关文件:
收藏者: