如何在视频/图像上添加图像或文本(水印)-Flutter / Dart [英] How to add an image or text (Watermark) on a video/image - Flutter/Dart

查看:1307
本文介绍了如何在视频/图像上添加图像或文本(水印)-Flutter / Dart的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在构建一个 Flutter 应用程序,该应用程序需要在视频和图像上添加标记。
是否可以通过 firebase (或任何其他服务)实现这一目标?我可以在客户端上执行此操作,但是我也找不到与视频/图像处理相关的任何flutter / Dart程序包。

I'm building a Flutter application which needs to add waermark on videos and images. Is there any way to achieve this with firebase (or any other service)? I could do this on client-side but also there i can't find any flutter/Dart package related to video/image processing.

请指导我如何做。

谢谢

推荐答案

对于视频:

  • https://github.com/tanersener/flutter-ffmpeg, though I couldn’t find anything that explicitly documents a way to edit the video, such as a watermark. But it should be possible according to others https://stackoverflow.com/a/57847155/6668797.
  • https://pub.dev/packages/video_manipulation


将静止帧添加到现有视频,例如水印

Adding still frames to an existing video, e.g. watermarks

.generateVideo(列表路径,字符串文件名,整数fps,双倍
速度)。

参数 paths 个输入文件路径列表。可以是用于生成新视频的图像(.jpg或
.png)或视频文件(.mp4)。
例如: [ documents / input.mp4, documents / watermark.jpg]

Parameters paths list of input file paths. Can be images (.jpg or .png) or video files (.mp4) that are used to generate the new video. E.g.: ["documents/input.mp4", "documents/watermark.jpg]


对于图像:

加载,保存和处理各种不同文件格式的图像。

load, save and manipulate images in a variety of different file formats.

> https://github.com/brendan-duncan/image/wiki/Examples

drawString(image,arial_24,0,0,'Hello World');


关于其他服务,我不知道,但是Firebase不提供此服务。

As for other services, I don't know, but Firebase does not offer this service.

否则,在客户端/应用程序端,当前没有太多其他视频,但是还有更多可用的图像,您可以搜索 https://pub.dev/flutter/packages?q=image+editor 。但是,要获得更多选择,您必须寻找本机Android / iOS库和 custom通过平台渠道整合它们

Otherwise, client/app-side, there’s currently not much else for videos, but there's more available for images, you can search https://pub.dev/flutter/packages?q=image+editor. However, for more options, you’ll have to seek out native Android/iOS libraries and custom integrate them through the platform channels.

这篇关于如何在视频/图像上添加图像或文本(水印)-Flutter / Dart的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆