Download the first frame of the video android programmatically

I want to download one frame of a video file from the server from my Android application. I do not want to upload the full video to the front. Use this frame as a thumbnail to display to the user so that when the user selects it, it can be downloaded.

+2
source share
2 answers

ffmpeg can create a thumbnail of the video stream using the following command:

 ffmpeg -itsoffset -4 -i http://somevideosite/test.avi -vcodec mjpeg -vframes 1\ -an -f rawvideo -s 320x240 thumb.jpg 

Getting ffmpeg in android seems doable .

+3
source

It will be easier if your server provides thumbnails for each video, for example youtube / dailymotion. You can create this thumbnail when a video is added to the server.

Example: http://img.youtube.com/vi/ <VIDEO_ID> / <1,2,3> .jpg

0
source

All Articles