2

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.

sanjeev
  • 1,343
  • 3
  • 16
  • 28

2 Answers2

2

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.

Community
  • 1
  • 1
dacwe
  • 43,066
  • 12
  • 116
  • 140
  • Use the [`ProcessBuilder`](http://developer.android.com/reference/java/lang/ProcessBuilder.html) API. – dacwe Jan 16 '14 at 11:23
0

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

Francois
  • 10,730
  • 7
  • 47
  • 80