Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

File format isn't supported! #17

Closed
msugamsingh opened this issue Jun 1, 2020 · 7 comments
Closed

File format isn't supported! #17

msugamsingh opened this issue Jun 1, 2020 · 7 comments

Comments

@msugamsingh
Copy link

Getting File format isn't supported or files are corrupted. when opening in any media player.

@vvalladolidIV
Copy link
Contributor

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.

@msugamsingh
Copy link
Author

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

@salime45
Copy link
Member

salime45 commented Jun 3, 2020

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

@msugamsingh
Copy link
Author

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.

@salime45
Copy link
Member

salime45 commented Jun 3, 2020

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

@msugamsingh
Copy link
Author

I modified maxRes to 680 and its working now.

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

Thanks 🙂

@salime45
Copy link
Member

salime45 commented Jun 3, 2020

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants