Canvas 帧捕获并处理 ffmpegserver.js

码农软件 · 软件分类 · 多媒体处理 · 2019-09-12 20:57:30

软件介绍

这是一个简单的 Node 服务器和开发库用于将 Canvas 帧发送到服务器,并使用 ffmpeg 对视频进行压缩。可独立使用或者跟 CCapture.js 一起使用。

使用步骤:

  1. 安装 Node

  2. 克隆此项目源码或者下载源码压缩包

  3. 进入 repo 目录并运行 npm install

  4. 执行 node start.js

示例代码:

var capturer = new CCapture( {
    format: 'ffmpegserver',
    framerate: 60,
    verbose: true,
    name: "foobar",     // videos will be named foobar-#.mp4, untitled if not set.
    extension: ".mp4",  // extension for file. default = ".mp4"
    codec: "mpeg4",     // this is an valid ffmpeg codec "mpeg4", "libx264", "flv1", etc...
                        // if not set ffmpeg guesses based on extension.
} );

capturer.start();

function render(){
  // rendering stuff ...
  capturer.capture( canvas );
}

requestAnimationFrame(render);

capturer.stop();
capturer.save( function( url, size ) { /* ... */ } );

本文地址:https://www.codercto.com/soft/d/14464.html

HTML5

HTML5

Matthew David / Focal Press / 2010-07-29 / USD 39.95

Implement the powerful new multimedia and interactive capabilities offered by HTML5, including style control tools, illustration tools, video, audio, and rich media solutions. Understand how HTML5 is ......一起来看看 《HTML5》 这本书的介绍吧!

JS 压缩/解压工具
JS 压缩/解压工具

在线压缩/解压 JS 代码

CSS 压缩/解压工具
CSS 压缩/解压工具

在线压缩/解压 CSS 代码

Base64 编码/解码
Base64 编码/解码

Base64 编码/解码