Android - 从服务器检索视频的缩略图并显示在手机上

发布于 2024-12-03 03:21:47 字数 261 浏览 4 评论 0原文

我的问题是如何检索视频的缩略图(例如,视频位于 http: //www.yo-yo.org/mp4/yu.mp4)。我想首先从服务器下载缩略图并将其显示在手机上,当用户单击缩略图时,将使用视频文件的 uri 启动视频播放器。

那么,直接从服务器创建缩略图的过程是什么,因为我看到了一些用于 SD 卡中实际存在的文件的方法(但我不是在寻找这些样式)。

谢谢

My question is how do I retrieve a thumbnail of a video(for example, video present at http://www.yo-yo.org/mp4/yu.mp4). I want to first download just a thumbnail from the server and display it on the phone and when the user clicks on the thumbnail, will start the video player using the uri of the video file.

So, what is the process to create a thumbnail directly from the server, as I see some methods for files which are actually present in the sdcard(but I am not looking for these styles).

Thanks

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

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

发布评论

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

评论(1

∝单色的世界 2024-12-10 03:21:47

假设网站应用程序

U 可以简单地读取第一个视频关键帧/I 帧并使用例如解码。然而,对于 ffmpeg,您将实现 C++ 代码,可能在后端读取第一帧并将其转换为,例如。 JPEG,然后将其发送回调用者(网页)

Assuming a web-site application

U can simply read the first video Key-Frame / I-Frame and have it decoded using eg. ffmpeg, however, for that you'll to implement C++ code, probably in your backend to read that first frame and convert it to, eg. a JPEG, and then, send it back to the caller ( web-page )

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文