Skip to content
TheChatArchiveThe Chat Archive
Human-written demonstration (OpenAssistant volunteers)· OpenAssistant (human-written)Hugging Face OpenAssistant Conversations (oasst2)

How to split a video into images using ffmpeg?

In OpenAssistant data, “assistant” turns were written by human volunteers as demonstrations. They are not model outputs.
  1. User

    How to split a video into images using ffmpeg?

  2. Assistant

    You can split a video into individual images using the following ffmpeg command:

    ffmpeg -i input_video.mp4 -vf fps=1/60 frame%d.jpg
    
    

    Explanation:

    • -i input_video.mp4 specifies the input video file. Replace "input_video.mp4" with the actual name of your video file.
    • -vf fps=1/60 specifies the frame rate to be 1 frame per 60 seconds. You can adjust the value to suit your needs.
    • frame%d.jpg specifies the pattern for the output image files. In this example, each image will be named "frame1.jpg", "frame2.jpg", and so on.
  3. User

    it's not working

  4. Assistant

    Sorry about that. It appears that I mixed up how the options in ffmpeg work the -vf fps=1/60 option should not be there as it will tell ffmpeg to take 1 frame for every 60 seconds of video. Here is an updated version of the command that fixes this:

    ffmpeg -i input_video.mp4 frame%d.jpg
    

Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.