颤动的视频延期器端到头

发布于 2025-01-20 10:51:37 字数 78 浏览 5 评论 0原文

我正在尝试制作一个带有加密视频的颤振视频播放器,我该如何使用我制作的算法来解密该文件? 有没有办法在将缓冲区提供给视频播放器之前访问该缓冲区?

I'm trying to make a flutter videoplayer with an encrypted video, how can I do to decrypt the file with an algorithm made by me?
is there a way to have access to the buffer before giving it to the videoplayer?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

撑一把青伞 2025-01-27 10:51:37

如果您使用的是 video_player 软件包,它接受file> file> file> file作为输入。

因此,与其从网络中提供加密视频作为控制器的来源:

_videoController = VideoPlayerController.network(videoUrl)

您可以做的是自己从网络中获取视频,并解密它(我假设在此过程结束时,您将拥有一个<代码> uint8list )。然后,将其转换为file,并将其作为来源提供给视频播放器:

import 'dart:io';

...

final video = fetchVideo(videoUrl);
final Uint8List decryptedVideoBytes = decryptVideo(video);
final File videoFile = File.fromRawPath(Uint8List uint8List);
_videoController = VideoPlayerController.file(videoFile);

If you're using the video_player package, it accepts File as inputs.

So instead of giving the encrypted video from the web as the source for the controller:

_videoController = VideoPlayerController.network(videoUrl)

What you can do instead is get your video from the web yourself, and decrypt it (I assume that at the end of this process you'd have a Uint8List). Then, convert it into a File and give it to the video player as the source:

import 'dart:io';

...

final video = fetchVideo(videoUrl);
final Uint8List decryptedVideoBytes = decryptVideo(video);
final File videoFile = File.fromRawPath(Uint8List uint8List);
_videoController = VideoPlayerController.file(videoFile);
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文