Coder Social home page Coder Social logo

obs-aja-output-filter's People

Contributors

norihiro avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar

obs-aja-output-filter's Issues

How do I install it?

hello. Norihiro. Thanks for making the filter. Can you tell me how to install the filter? (win64)

Slow performance causing dropped frame for main streaming/recording

Issue description

When enable this filter, sometimes it causes dropped frame for main streaming and recording.

Current status of investigation

Profile

Checking rendering time with adding profile.

ajaof_render: min=2.579 ms, median=4.488 ms, max=10.32 ms, 99th percentile=9.094 ms
  • Trial 1 - Separate stage-surface
    With separating staging (until gs_stage_texture) and mapping (gs_stagesurface_map and later) into different iteration, rendering time is reduced and the number of dropped frame looks reduced. (I had 3 runs and the numbers are slightly different.)
    The code is 2ac4699.
ajaof_render: min=0.017 ms, median=0.602 ms, max=19.639 ms, 99th percentile=17.333 ms
ajaof_render_render: min=0.017 ms, median=0.272 ms, max=5.12 ms, 99th percentile=0.861 ms
ajaof_render_output: min=0.565 ms, median=0.92 ms, max=19.637 ms, 99th percentile=17.748 ms
ajaof_render: min=0.055 ms, median=0.584 ms, max=15.644 ms, 99th percentile=10.016 ms
ajaof_render_render: min=0.054 ms, median=0.259 ms, max=4.331 ms, 99th percentile=0.64 ms
ajaof_render_output: min=0.565 ms, median=0.693 ms, max=15.644 ms, 99th percentile=12.179 ms
ajaof_render: min=0.029 ms, median=0.669 ms, max=19.953 ms, 99th percentile=16.839 ms
ajaof_render_render: min=0.028 ms, median=0.285 ms, max=3.744 ms, 99th percentile=0.788 ms
ajaof_render_output: min=0.61 ms, median=1.297 ms, max=19.952 ms, 99th percentile=17.677 ms
  • Trial 2 - Breakdown profile more
    It is not clear which is actually slow. Maybe gs_stagesurface_map or video_output_lock_frame. If later, prepare a new thread to call video_output_lock_frame.
  • Trial 3 - Run stage-surface as the graphics task
    The graphics tasks are executed after all other rendering while the rendering routine ajaof_render is called at very beginning of rendering the main texture. Assuming gs_stage_texture is actually executed in pipeline, this approach might improve performance without slowing the output.
    If Trial 2 reveals the necessity to have another thread, another idea is call gs_stagesurface_map from the new thread. The call will be automatically delayed by obs_enter_graphics().
  • Misc - memcpy
    If linesize == video_linesize, call just one memcpy.
    On i7-7700, This improve time of copying 1920x1080 frame data from 1.122 ms to 0.607 ms

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.