Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6627091
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T21:58:18+00:00 2026-05-25T21:58:18+00:00

On the FFmpeg documentation ( here , and here ) I read that, by

  • 0

On the FFmpeg documentation (here, and here) I read that, by default, FFmpeg chooses to extract frames at 25 frames per second (otherwise you can specify a framerate with the -r option)

My problem is that I have a folder with dozens of videos, each of them recorded at different frame rates, so my question is:

Is there a way to ask FFmpeg to extract frames from a video at the “native” frame rate (i.e. the original frame rate at which the video was recorded)?

In case it matters, I am working with MP4 files

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-25T21:58:19+00:00Added an answer on May 25, 2026 at 9:58 pm

    To get the original frame rate:

    ffmpeg -i file.mp4 2>&1 | grep -o '[0-9]\{1,3\}\sfps'
    

    Example Output:

    25 fps
    

    You can futher pipe it to sed ... | sed 's/\sfps//' to keep only the 25, and store it into a variable, so you can use that variable to convert the videos e.g. ffmpeg -r $originalFps.

    grep -o will extract the match, instead of the whole line containing the match.

    [0-9]\{1,3\} will match one to three digits

    \sfps will match a white space followed by ‘fps’

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Where is the best documentation of ffmpeg and libavcodec? It appears that ffmpeg supports
I am currently writing an application that read frames from camera, modify them, and
So we have for example ffmpeg that can be compiled into > than 4
I want to use ffmpeg to convert swf to png ,and I can't extract
I've been digging through the mplayer/mencoder and ffmpeg documentation and I can't seem to
I need to read the output from ffmpeg in order to even try the
I wrote a little daemon in Perl that calls up FFMpeg to encode a
Can FFmpeg encode video in VP8 codec? (I mean its trunk vercion)
We were using FFmpeg which is free. And when a bug occurred that broke
Does ffmpeg audio effects like reverb? Can I work with the channels (to detain

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.