Giter Site home page Giter Site logo

Comments (10)

baSSiLL avatar baSSiLL commented on June 1, 2024

Hi
At first sight looks like frame sequence you provide to SharpAvi has an actual frame rate lower than the value you've set for an AVI file. This usually happen when time needed to process a single frame being recorded from a live source (like camera or screencast) is more than 1/FPS.
Could you put more details about your problem? Are you talking about the sample screencast app or your own program? If the latter, what is it purpose, how the recording process is implemented?

from sharpavi.

anand1688 avatar anand1688 commented on June 1, 2024

Hi

I have used the same logic as the sample code.

I have modified it to capture just a particular application window.

Everything else is the same.If I record a video for 10 s the out put video length is 2s

from sharpavi.

baSSiLL avatar baSSiLL commented on June 1, 2024

What frame rate do you set for a video? And what is an actual rate of screenshots you write to an output video stream? To get the latter, count how many frames have been written in total and divide that by recording time.

from sharpavi.

anand1688 avatar anand1688 commented on June 1, 2024

Hi

Frame rate I have set at 10
FramesPerSecond=10
The frame interval to capture is deduced as
var time_between_capture=TimeSpan.FromSeconds((1 / (double)writer.FramesPerSecond));

Also if I select any other codec than MotionJpeg, I get an vfw exception

from sharpavi.

baSSiLL avatar baSSiLL commented on June 1, 2024

Check the number of frames that have been actually written to the stream - AviVideoStream.FramesWritten property. Is it close to 10 * < total seconds > or 2 * < total seconds >?

from sharpavi.

baSSiLL avatar baSSiLL commented on June 1, 2024

As for codecs failure. Whether you run the program in 32 or 64 bits? The only MPEG-4 codec I've found working reliably in 64 bits is x264vfw. Of course, its 64-bit version should be installed.

from sharpavi.

anand1688 avatar anand1688 commented on June 1, 2024

hi

I recorded for 20 s approx at FramePerSecond=10 the value is 31.

from sharpavi.

baSSiLL avatar baSSiLL commented on June 1, 2024

So the actual frame rate is ~1.5 frames/second! When player opens an AVI file it plays those frames at 10 fps because this value is stored in header hence the playback looks accelerated.
You need to find a reason why your capture pipeline does not keep up with target 10 fps. Measure which part of frame processing takes the most time - getting screenshot, writing to a stream, thread synchronization or image processing if you have any.

from sharpavi.

anand1688 avatar anand1688 commented on June 1, 2024

Hi I found the issue,I was finding the window each time the capture was happenning

from sharpavi.

baSSiLL avatar baSSiLL commented on June 1, 2024

Cool! Thanks for letting know.

from sharpavi.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.