Android - 从服务器检索视频的缩略图并显示在手机上
我的问题是如何检索视频的缩略图(例如,视频位于 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 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
假设网站应用程序
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 )