openstf / stf

Control and manage Android devices from your browser.
https://openstf.io
Other
13.37k stars 2.79k forks source link

Screen recording support #32

Open arcxyz opened 9 years ago

arcxyz commented 9 years ago

Android 4.4+ have a built-in support for screen recording:

shell@mako:/ $ screenrecord --help                                             
Usage: screenrecord [options] <filename>

Android screenrecord v1.2.  Records the device's display to a .mp4 file.

Options:
--size WIDTHxHEIGHT
    Set the video size, e.g. "1280x720".  Default is the device's main
    display resolution (if supported), 1280x720 if not.  For best results,
    use a size supported by the AVC encoder.
--bit-rate RATE
    Set the video bit rate, in bits per second.  Value may be specified as
    bits or megabits, e.g. '4000000' is equivalent to '4M'.  Default 4Mbps.
--bugreport
    Add additional information, such as a timestamp overlay, that is helpful
    in videos captured to illustrate bugs.
--time-limit TIME
    Set the maximum recording time, in seconds.  Default / maximum is 180.
--verbose
    Display interesting information on stdout.
--help
    Show this message.

Recording continues until Ctrl-C is hit or the time limit is reached.
sorccu commented 9 years ago

What kind of a feature are you looking for?

arcxyz commented 9 years ago

I usually record some app behaviour with this command. I am looking for something like the screenshots feature but for taking screencasts.

gunta commented 9 years ago

According to this, Android devices over 4.4 are just about 50%. In order to support this in older versions we will have to look for another way.

Currently you can use screenrecord from the Shell command, however you will not be able to download the file, for that follow this other issue #39.

codeskyblue commented 9 years ago

image

I make a continous screenshot button. I call it screen capture. If you feel that useful, I will make a pr or just ignore me.

gunta commented 9 years ago

@codeskyblue Sure, make a PR and we can evaluate it. It would be good if it's also implemented server-side and not only client side.

codeskyblue commented 9 years ago

Pull requested.

Ashraf-Ali-aa commented 8 years ago

it would be nice to record it to a video format or a gif

skylve commented 8 years ago

Any update on this feature ? I feel it would really help exchange between developer <-> QA.

sorccu commented 8 years ago

It does make sense, but unfortunately we have no time to implement it.

codeskyblue commented 8 years ago

Today, I think use ffmpeg to convert images to video is a better way.

nanoscopic commented 4 years ago

+1 on this. Having a way to start and stop video recording, and have video actually saved in h264 format would be useful. To work reasonably it would have to utilize raw video streaming features of android rather than hacking on top of the current minicap jpeg serving.