Creating thumbnails from video files with Python

前端 未结 7 1929
陌清茗
陌清茗 2020-12-24 07:48

I need to create thumbnails for a video file once I\'ve uploaded to a webapp running python.

How would I go about this... I need a library that can basically either

7条回答
  •  梦谈多话
    2020-12-24 08:24

    You can use ffvideo

    from ffvideo import VideoStream
    pil_image = VideoStream('0.flv').get_frame_at_sec(5).image()
    pil_image.save('frame5sec.jpeg')
    

提交回复
热议问题