Giter Site home page Giter Site logo

displayrecorder's People

Contributors

kennykerr avatar niiightmarexd avatar robmikh avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

displayrecorder's Issues

Errors don't automatically end a recording

Currently an error on the encoder thread only stops that thread. The user must still press ENTER to stop the recording, after which the error will be printed.

Ideally, an error would immediately end the recording. Although a stop-gap may be to print that the error thread is ending due to an error to tell the user the recording isn't happening.

Allow custom encoder settings

The current encoder settings for bit rate, frame rate, and resolution are determined automatically. Users should be able to specify their own settings values if they wish.

  • Bit rate
  • Frame rate
  • Resolution
  • Encoder device

Potential memory leak when writing to sink

Hey! First, just want to say thank you for making this repo, I've learned a lot.

I've been playing with this code for a bit and I've created a few fairly long screen recordings with it. I noticed that memory seems to increase at the same rate as the output file. I am fairly new to Rust and very new to Media Foundation and Window Graphics Capture. That said, I was able to get memory usage way down by calling RemoveAllBuffers() on the output sample.

pub fn write(&self, sample: &IMFSample) -> Result<()> {
    unsafe {
        self.sink_writer
            .WriteSample(self.sink_writer_stream_index, sample)?;
        sample.RemoveAllBuffers()
    }
}

Doing this however seems to corrupt the end of the file in some way :/

There are a few other things that seem to stick around causing memory to still increase at random times. Using VS debug profiler I can see there are two things being created repeatedly that are consistent in their size.

EDIT:

Doing this however seems to corrupt the end of the file in some way :/

The above was actually not true, I need to rethink programming at 3am.

Low framerate

I'm stuck at around 15 fps (capturing 4k@60 Hz) even though I'm using Nvidia hw encoding. My CPU is pretty much idling. I assume it's the encoder keeping the frames for too long and missing new frames.
Are you getting decent framerates?

Better error messages for unsupported configurations

We need better error messages for the following scenarios:

  • No suitable input media type was found for the given encoder.
  • Windows.Graphics.Capture is unavailable.
  • No hardware encoders found.
  • Invalid path specified.

ARM64 version doesn't work

Testing v0.1.0 on a Surface Pro X ends with E_INVALIDARG:

thread 'main' panicked at 'HRESULT 0x80070057', src\main.rs:149:22
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

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.