Git Product home page Git Product logo

Comments (7)

ThibaultBee avatar ThibaultBee commented on July 20, 2024

Hi,
It seems that your video encoder does not accept the configuration but I can't say why. Do you have any other logs before or after this?

I don't think resolution or codec is a problem. Could be an issue with the fps.
Can you check what:

 (context.getSystemService(Context.DISPLAY_SERVICE) as DisplayManager).getDisplay(Display.DEFAULT_DISPLAY).refreshRate.toInt(),

returns?

from streampack.

hemant-cloudfeather avatar hemant-cloudfeather commented on July 20, 2024

Hi,
These were the only error logs, rest were normal I guess.
And the above code snippet returns 120 as fps in my device.

from streampack.

ThibaultBee avatar ThibaultBee commented on July 20, 2024

Hi,
Could you check that your encoder supports 120 fps? The screen recorder streamer has a field: streamer.helper.video.getSupportedFramerate(MediaFormat.MIMETYPE_VIDEO_AVC)

Alternatively you can set the fps of the VideoConfig in the ScreenRecorderService (method createVideoConfigFromBundle) to 30 and test your live again.

from streampack.

ThibaultBee avatar ThibaultBee commented on July 20, 2024

On my phone getSupportedFramerate returns [0, 240]. I am pretty sure that the framerate of your screen is supported as well.

So I read the code source. The issue could be with the encoder profile/level settings. On most device, when profile and/or level are not supported, the MediaCodec API returns a MediaCodec.CodecException which may be not the case on your phone. The MediaCodec.CodecException is catched and I try to start the encoder without the profile/level settings but if the MediaCodec API throw a IllegalArgumentException, it just returns the exception.

Could you remove these 2 lines in ScreenRecorderService?

            level = bundle.getInt(LEVEL),
            profile = bundle.getInt(PROFILE)

from streampack.

ThibaultBee avatar ThibaultBee commented on July 20, 2024

By the way, in the next version of StreamPack, the library will provide Screen recorder Service. Check out for the develop branch.

from streampack.

hemant-cloudfeather avatar hemant-cloudfeather commented on July 20, 2024

Hi ThibaultBee,
Sorry for late reply but after commenting the level and profile lines from ScreenRecorderService, the screen record streaming worked fine.
Thank you for your response. Will also try out the new version once it is available.

from streampack.

ThibaultBee avatar ThibaultBee commented on July 20, 2024

The new library version will come with service that you could be customizable. It will simplify integration in an application. If you already have your custom Service the new version won't bring anything new.

from streampack.

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.