I can't capture android screen using adb screen recording tool

I have a nexus 4 with KitKat android.

I tried recording on the screen with the following commands:

adb shell screenrecord --verbose /sdcard/demo.mp4 adb shell screenrecord --bit-rate 8000000 --time-limit 30 /sdcard/kitkat.mp4 

Both times, the team returned this message:

 Main display is 768x1280 @60.00fps (orientation=0) Configuring recorder for 768x1280 video at 4.00Mbps ERROR: unable to create video/avc codec instance 

In the debug console I opened in AndroidStudio, the following log messages were shown:

 02-02 18:16:29.058 176-4045/? E/OMX-VENC-720p﹕ Is component secure 0 02-02 18:16:29.058 176-4045/? E/OMX-VENC-720p﹕ ERROR: Omx_venc::Comp Init Returning failure 02-02 18:16:29.058 176-4045/? E/OMX-VENC-720p﹕ ERROR: venc_open failed 02-02 18:16:29.058 176-4045/? E/OMX-VENC-720p﹕ Destroy C2D instance 02-02 18:16:29.058 11072-11086/? E/ACodec﹕ Unable to instantiate a decoder for type 'video/avc'. 02-02 18:16:29.058 11072-11085/? E/MediaCodec﹕ Codec reported an error. (omx error 0x80001003, internalError -2147483648) 

Has anyone figured out how to solve this? (I tried fewer permissions, but without success)

+7
android screen-record mediacodec
source share
5 answers

I have the same problem ... and I managed to solve it ... but I don’t know how ...

When I ran:

$> adb.exe shell screenrecord --verbose / sdcard / kitkat.mp4

I got this error:

Main display - 768x1280 @ 60.00fps (orientation = 0) Configuring the recorder for 768x1280 video at 4.00Mbp ERROR: unable to create video / avc codec instance

And to solve my problem, I first lowered the bitrate:

$> adb.exe shell screenrecord - bit-rate 1,000,000 - time-limit 30 --verbose / sdcard / kitkat.mp4

And then when I ran the default command ...:

$> adb.exe shell screenrecord --verbose / sdcard / kitkat.mp4

He works...

Perhaps because I started the adb server again after the first error ...

Very strange...

+3
source share

for those who can still run into this problem, I had the same problem. I could not find anything on the Internet that would help me fix this.

In any case, at some point I opened the Camera application on my Nexus 4, and I found out that for some reason I could no longer record video - the function simply did not work.

At that moment, I thought something might be damaged. I did factory reset the phone data, and when reset was complete, I tried again using screenrecord, and the problem disappeared. I was able to record the screen on my phone without any problems.

I still don’t know what caused the problem, or if it has anything to do with the problem that I had with the video recording function of the Camera application, but resetting my phone to factory settings solved this problem for me.

Hope this helps!

+2
source share

Reboot my phone after:

 ERROR: unable to create video/avc codec instance 

Then it worked ...

+2
source share

I do not know if this will help, but:

Despite the error, the device should actually record. So ignore the warning and check / sdcard, your entry should be there.

Also try this (without any other things)

 adb shell screenrecord /sdcard/demo.mp4 

That should work. If you get an error message

 ERROR: unable to configure codec (err-2147483648) WARNING: failed at ___x___,retrying at ___x___ 

Do not worry about it.

Just a side note (I'm sure you have it all installed), double-check that the drivers are installed correctly and the paths are configured, etc.

I am working on a small project for recording Nexus / KitKat devices: http://goo.gl/LEALYL (Project blog post: http://goo.gl/BnBzNw )

0
source share

Try turning off power saving mode. Samsung's power-saving mode reduces screen speed; screenrecord does not take this inconsistency into account. Other ROMs also use this feature.

0
source share

All Articles