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 9024373
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T05:59:29+00:00 2026-06-16T05:59:29+00:00

I am trying to capture windows screen (continuous screen shots) and encode them into

  • 0

I am trying to capture windows screen (continuous screen shots) and encode them into x264. For that I am using avcodec_encode_video2 function available with libavcodec. However, it takes a huge amount of time. The time fluctuates between 25 – 1800 milliseconds for encoding individual frames.

I tried tried both 1080p and 720p with video recording on screen.

These are the settings I am using. This was tested on Windows 7, win32 release build with 4 GB of RAM.

bit_rate = 2000, width = 1920, height = 1080
qmin = 0, qmax = 0, max_b_frames = 0, frame_rate = 25, pixel_format = YUV 4:4:4.
The remaining settings are default which are fetched using avcodec_get_context_defaults3().

Sample data(in milliseconds) for 20 frames (consecutive and chosen randomly) in a set of 250 frames.
{ 121, 106, 289, 126, 211, 30, 181, 58, 213, 34, 245, 50, 56, 364, 247, 171, 254, 83, 82, 229 }

For the application it is a must that it captures at least at 15 fps. Can someone help out to tell whether any options can be used to improve the frame rate. I need to encode lossless, but I am open to some file size increase.

Thanks in advance.

  • 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-06-16T05:59:30+00:00Added an answer on June 16, 2026 at 5:59 am

    The Simple solution to the problem is to use libx264 directly rather than going through avcodec. This allows you to have a better control over x264 and thereby, the encoding speed improves. With avcodec, it also does some not needed processing. That can be avoided with libx264.

    Moral of the story, use the x264 API directly.

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

Sidebar

Related Questions

I am trying to capture screen shots in my JavaFX application using Robot class,
I'm trying to capture http request that occurs in a callback function : //
I am trying to capture audio from the mic using the windows core audio
I'm using a Windows x64 machine and am trying to capture the STDOUT and
I am trying to capture the screen whilst my windows mobile application is running.
I'm trying to capture the output of a windows program using Qt and Python.
I'm trying to write a simple app that will do a screen capture of
I'm trying to capture the Tab key in a Windows Forms application and do
I am trying to use Windows.Media.Capture.CameraCaptureUI() of Metro Style app in WPF application in
I trying to capture packets using SharpPcap library. I'm able to return the packets

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.