fashion1993

一个在线视频编辑平台,视频轴怎么实现 ?

  •  
  •   fashion1993 · Oct 7, 2019 · 4017 views
    This topic created in 2434 days ago, the information mentioned may be changed or developed.

    视频轴

    纯前端可以实现么?

    想到一种办法是本地上传视频 后端生成每一帧的图片传给前端

    或者是将视频转成 blob 对象再 slice()分割,试了下没有实现,可能是姿势不对

    https://online-video-cutter.com/cn/ 功能类似这种,上传视频后有一个视频轨道可以对视频进行裁剪,看请求 视频轴应该是前端实现的

    有第三方库可以实现么?

    1 replies    2019-10-07 22:46:02 +08:00
    lizheming
        1
    lizheming  
       Oct 7, 2019   ❤️ 1
    生成 blob 然后直接 video.currentTime 跳转到要截图的时间,生成一个 canvas 画布直接 ctx.drawImage(video, 0, 0, width, height) 在 toDataURL 一下就可以拿到对应时间的截图了
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   1396 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 28ms · UTC 17:04 · PVG 01:04 · LAX 10:04 · JFK 13:04
    ♥ Do have faith in what you're doing.