Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Compression Techniques using FFmpeg API for H264 frame capture

  • using FFmpeg API for H264 frame capture

    Posted by Coco Serujil on November 7, 2010 at 4:36 pm

    I would like to use FFmpeg to grab still frames from video files. i’m only interested in H264 encoded videos, and maybe one another codec later.
    how is it possible to use the ffmpeg code in my project, so that i’ll be able to do this?

    thanks,
    c.s.

    Coco Serujil replied 15 years, 6 months ago 3 Members · 3 Replies
  • 3 Replies
  • Amir Rhi

    November 8, 2010 at 6:19 am

    Hi
    Your question is my question also and i look forw the answer. even i tried to extract i-frames by ffmpeg directly( not in another program) and i could not . just i found that if you like to convert all frames to i-frame, the command would be:
    ffmpeg -i -vcodec mpeg2video -qscale 1 -qmin 1 -intra -an output.m2v

  • Michael Rampe

    November 9, 2010 at 11:20 am

    [coco serujil] “I would like to use FFmpeg to grab still frames from video files. i’m only interested in H264 encoded videos”

    This works for me.

    ffmpeg -vframes 1 -ss 10 -i default.mp4 -f image2 -vcodec mjpeg frame%d.jpg

    “-vframes 1” means only render one frame.
    “-ss 10” means pull the frame at 10 seconds.
    This was tested with H.264 footage.

    Michael

  • Coco Serujil

    November 10, 2010 at 6:29 am

    Actually, i’m not trying to use regular FFmpeg to do so, but to compile it so that it will include only a few codecs (H.264 and a few more).
    I want to do this in order to lower the final size of FFmpeg’s binary.

    Can anyone help me?

We use anonymous cookies to give you the best experience we can.
Our Privacy policy | GDPR Policy