Scrcpy: Screenshot/Record Screen

Created on 9 Mar 2018  路  16Comments  路  Source: Genymobile/scrcpy

Having a keyboard command to take a screenshot and one to start/stop recording the screen into a video would be an extremely useful feature for scrcpy.

scrcpy seems to already be using ffmpeg on the computer side, so saving the input stream to a file/screenshotting the input stream should be very do-able.

feature request record

Most helpful comment

Or:

Screenshot:

adb exec-out screencap -p > file.png

Video recording:

adb shell screenrecord /sdcard/file.mp4
adb pull /sdcard/file.mp4

All 16 comments

As a workaround for now:

Screenshots: Works on every application:
ALT RIGHT + Print
Then paste the image to your favorite image editor.

... or use the Windows Snipping tool.

Video recoring:
Just use OBS Studio and capture the window.

Or:

Screenshot:

adb exec-out screencap -p > file.png

Video recording:

adb shell screenrecord /sdcard/file.mp4
adb pull /sdcard/file.mp4

I think it is best to leave this kind of feature to other program.

Just to give a bit more details.

The server streams to the client a raw H.264 video stream. This stream does not contain any time information (no timestamps), which is not a problem because it's live. But for recording, we would need to mux the raw stream into a container, with timestamps (especially with a variable-framerate stream).

Ideally, the timestamps would be provided by the server (to be accurate), but this would mean an additional layer to mux on the server + demux on the client, which involves copies, and could increase the lag a bit

Alternatively, the client might mux the stream adding the timestamps according to the date it receives the frames. It could work, but would probably require some dependencies. I'm not sure it's worth it, since adb shell screenrecord /sdcard/file.mp4 already does the job.

adb shell screenrecord /sdcard/file.mp4 does only for 180 seconds. I would like to record more than 1 hr. Any idea how can we use scrcpy to get this recording?

@shahtapan Just use OBS Studio and capture the window.

@shahtapan Some work have been done to support recording in _scrcpy_, so hopefully it will be supported in a future version: https://github.com/Genymobile/scrcpy/pull/292.

Does the OBS Studio solution record the audio outputting from the device? If not then I think if this feature needs to be implemented into the strcpy with consideration to implement audio recording too 馃槃

It would be great! I'm trying to use QuickTime player, but it is quite hassling to start, select area, be quick to remove mouse pointer, and don't forget to stop recording without passing mouse pointer through the recorded area.

If you are interested, you can test the WiP branch record (see https://github.com/Genymobile/scrcpy/pull/292).

This is implemented in v1.5:

scrcpy --record file.mp4

:tada:

@rom1v and screenshot?

@rom1v and screenshot?

adb exec-out screencap -p > screenshot.png

:trollface:

And do you know how to stop screen recording?

Was this page helpful?
0 / 5 - 0 ratings

Related issues

fernandofreamunde picture fernandofreamunde  路  4Comments

YurieCo picture YurieCo  路  4Comments

tonyyang924 picture tonyyang924  路  4Comments

npes87184 picture npes87184  路  3Comments

jonnybrooks picture jonnybrooks  路  3Comments