Git Product home page Git Product logo

Comments (4)

FD- avatar FD- commented on August 17, 2024

I'm able to reproduce the problem and have traced it back to the max_dec_frame_buffering injection in the video renderer. I played around with the max_dec_frame_buffering value a bit, and it seems reducing it to 4 works with iOS (portrait and landscape) and mirroring the native monitor and a 1080p external monitor from macOS.

So, please modify line 301 of renderers/video_renderer_rpi.c to:

h->sps->vui.max_dec_frame_buffering = 4;

And let me know if that helps!

If you don't want macOS to change the screen resolution while mirroring the native monitor, change the "Optimise for" monitor setting to "Built-in Retina Display" in the system settings.

Technical background:
The max_dec_frame_buffering injection is used to reduce video pipeline latency on the Raspberry Pi GPU. The idea is mentioned in a thread on the RPi forums, but since we don't have any control over the stream creation, we have to inject it into the SPS NAL at the receiver end, which is hacky on its own (And I don't really know why only certain values work, while values slightly higher or lower don't). From my testing, the h264 library RPiPlay uses isn't 100% reliable, so that adds another potential error source.

While implementing max_dec_frame_buffering injection, for a while the code for constructing modified_data had a bug that I only noticed when I tested iOS portrait before publishing my code. The currently used max_dec_frame_buffering value 8 was tested with macOS and iOS while that bug was still present.

from rpiplay.

FD- avatar FD- commented on August 17, 2024

@kevin-hv Can you confirm the fix?

from rpiplay.

kevin-hv avatar kevin-hv commented on August 17, 2024

Just Building it, sry I wasn’t available.
Commenting asap.

from rpiplay.

kevin-hv avatar kevin-hv commented on August 17, 2024

Now the mirroring works, thank you for the quick fix.

from rpiplay.

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.