问题描述
我想从我的Android应用程序中下载服务器的单个视频文件.我不在前面下载完整视频.将该框架用作缩略图向用户显示,因此,如果用户选择可以下载.
推荐答案
ffmpeg可以使用此命令从视频流创建缩略图:
ffmpeg -itsoffset -4 -i http://somevideosite/test.avi -vcodec mjpeg -vframes 1\ -an -f rawvideo -s 320x240 thumb.jpg
其他推荐答案
如果您的服务器为YouTube/DailyMotion提供的每个视频提供的缩略图会更容易.当视频添加到服务器时,您可以创建此缩略图.
ex: http://img.youtube.com/vi/ <VIDEO_ID>/ C3> .jpg
问题描述
I want to download a single frame of a video file from a server from my android application. I do not wat to download the full video at front. Use that frame as a thumbnail to display to the user, so that if choosen by user it can be downloaded.
推荐答案
ffmpeg can create a thumbnail from a video stream using this command:
ffmpeg -itsoffset -4 -i http://somevideosite/test.avi -vcodec mjpeg -vframes 1\ -an -f rawvideo -s 320x240 thumb.jpg
To get ffmpeg into android seems doable.
其他推荐答案
It will be easier if your server provided thumbnails for each video like youtube/dailymotion does. You could create this thumbnail when video is added to the server.
Ex: http://img.youtube.com/vi/<VIDEO_ID>/<1,2,3>.jpg