0

I have an script which will record the screen of the device in our build server.

adb shell "screenrecord --verbose --size 960x1920 --bit-rate 500000 /sdcard/screenCast.mp4;
screenrecord --verbose --size 960x1920 --bit-rate 500000 /sdcard/screenCast1.mp4;
screenrecord --verbose --size 960x1920 --bit-rate 500000 /sdcard/screenCast2.mp4;
screenrecord --verbose --size 960x1920 --bit-rate 500000 /sdcard/screenCast3.mp4;
screenrecord --verbose --size 960x1920 --bit-rate 500000 /sdcard/screenCast4.mp4;
screenrecord --verbose --size 960x1920 --bit-rate 500000 /sdcard/screenCast5.mp4;
screenrecord --verbose --size 960x1920 --bit-rate 500000 /sdcard/screenCast6.mp4; 
screenrecord --verbose --size 960x1920 --bit-rate 500000 /sdcard/screenCast7.mp4; 
screenrecord --verbose --size 960x1920 --bit-rate 500000 /sdcard/screenCast8.mp4; 
screenrecord --verbose --size 960x1920 --bit-rate 500000 /sdcard/screenCast9.mp4; 
screenrecord --verbose --size 960x1920 --bit-rate 500000 /sdcard/screenCast10.mp4; 
screenrecord --verbose --size 960x1920 --bit-rate 500000 /sdcard/screenCast11.mp4;" 

This scipt can record the screen for around 30 plus minutes. It works for me locally and not in the build server.

I get the following result when I execute it locally for each of the individual steps. It can record for the full 30 minutes plus.

Main display is 1440x2880 @60.00fps (orientation=0)
Configuring recorder for 960x1920 video/avc at 0.50Mbps
Content area is 960x1920 at offset x=0 y=0
Time limit reached
Encoder stopping; recorded 10 frames in 180 seconds
Stopping encoder and muxer
Executing: /system/bin/am broadcast -a android.intent.action.MEDIA_SCANNER_SCAN_FILE -d file:///sdcard/screenCast.mp4
Broadcasting: Intent { act=android.intent.action.MEDIA_SCANNER_SCAN_FILE dat=file:///sdcard/screenCast.mp4 flg=0x400000 }
Broadcast completed: result=0

And the following result when I execute it on the build server.

Main display is 1440x2880 @60.00fps (orientation=0)
Configuring recorder for 960x1920 video/avc at 0.50Mbps
Content area is 960x1920 at offset x=0 y=0
Time limit reached
Encoder stopping; recorded 9 frames in 180 seconds
Stopping encoder and muxer
Executing: /system/bin/am broadcast -a android.intent.action.MEDIA_SCANNER_SCAN_FILE -d file:///sdcard/screenCast.mp4
Broadcasting: Intent { act=android.intent.action.MEDIA_SCANNER_SCAN_FILE dat=file:///sdcard/screenCast.mp4 flg=0x400000 

I never get back Broadcast completed: result=0 on the build server and the script doesn't work for me. I only get the recording of first 3 minutes and not further.

What is the problem and is there a better way to have the screen recording for more than 30 minutes.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.