Code Monkey home page Code Monkey logo

Comments (7)

vvalladolidIV avatar vvalladolidIV commented on June 24, 2024

Hi, ¿could you give us information about your test device? ¿Maybe your console information? The output format is .mp4 so is strange media player don't recognise it.

from flutter_screen_recording.

msugamsingh avatar msugamsingh commented on June 24, 2024

I tried running your example code in a physical Xiaomi (Android 8) device and in emulator (Android 9), but it didn't work.
There's no warning or error in console.
Also, The size of the .mp4 output file in storage is always less than 10kb.
App permissions: Storage and microphone

from flutter_screen_recording.

salime45 avatar salime45 commented on June 24, 2024

I checked in different devices and works normally. Can you check the permission section and see if all permissions are enabled?

Are you sure not log appear in the console? We put in all critical places for get more info

from flutter_screen_recording.

msugamsingh avatar msugamsingh commented on June 24, 2024

I apologize that I did not notice before.
I'm getting some errors in console.

D/permissions_handler(20570): No android specific permissions needed for: 9
I/System.out(20570): Scaled Density
I/System.out(20570): 2.0
I/System.out(20570): Original Resolution
I/System.out(20570): 720 x 1344
I/System.out(20570): Calcule Resolution
I/System.out(20570): 685 x 1280
F/SoftVideoEncoderOMXComponent(21104): frameworks/av/media/libstagefright/omx/SoftVideoEncoderOMXComponent.cpp:465 CHECK((width & 1) == 0) failed.
E/MediaRecorder(20570): stop failed: -1007
D/--INIT-RECORDER(20570): stop failed.
I/System.out(20570): stopRecordScreen error
I/System.out(20570): stop failed.
D/TAG (20570): MediaProjection Stopped
I/flutter (20570): Opening video
I/flutter (20570): /storage/emulated/0/DCIM/hello.mp4

Again, I apologize for my mistake.

from flutter_screen_recording.

salime45 avatar salime45 commented on June 24, 2024

In my experience when you try to record the screen with a low reoslution like 685 the MediaRecorder doesnt work.

Can you try to modify maxRes in calculeResolution with a higher value?

The function to edit is in
flutter_screen_recording/android/src/main/kotlin/com/isvisoft/flutter_screen_recording/FlutterScreenRecordingPlugin.kt

from flutter_screen_recording.

msugamsingh avatar msugamsingh commented on June 24, 2024

I modified maxRes to 680 and its working now.

However, The quality is low but it will work for me.

Thanks 🙂

from flutter_screen_recording.

salime45 avatar salime45 commented on June 24, 2024

The Android library for record screen have some problems with the resolution. Thanks for your feedback

from flutter_screen_recording.

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.