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

[Enhancement]: Use screenrecord streaming instead of anything else for current frame ? #30

Open
darkyen opened this issue Mar 31, 2015 · 5 comments

Comments

@darkyen
Copy link

darkyen commented Mar 31, 2015

As found on stackoverflow, the command

  $> adb shell screenrecord --output-format=h264 -

Pushes the output buffer to stdout. Perhaps add that as an addon ? It is much faster and the most logical and only real streaming way over usb.

http://stackoverflow.com/questions/26786926/android-screen-capture

@sorccu
Copy link
Member

sorccu commented Mar 31, 2015

Hi,

While true, we're currently trying to keep the API methods fairly backwards-compatible so that they'll work on any 2.3+ device. Then again, I would accept a complete pull request for it. Note that you can still do the same thing with .shell(), although you'll need to make sure you're giving the right options to each version of android.

@darkyen
Copy link
Author

darkyen commented Mar 31, 2015

Whoa ! Thanks for the quick reply.

I have thought of a way to do this, falling back to framebuffer but the streaming on those will rely on unreliable framebuffer but again 16bpp may be able to pull graceful fps.

@sorccu
Copy link
Member

sorccu commented Mar 31, 2015

From personal experience most devices max out at around 5MB/s, making it very difficult to get even 1fps on 1080x1920 displays using raw pixel data. Here at the company we do have a way around this to get quite reasonable FPS even on older devices, but that part hasn't been open sourced yet. We are currently planning on releasing it next month along with other goodies.

However, from what I understand, the "graphics" group which is needed for framebuffer, screenrecord and screencap access got removed from ADB a while ago - it's still there in 5.1 but it's a bit unsure if screenrecord/screencap will continue to work in future releases :(

@darkyen
Copy link
Author

darkyen commented Mar 31, 2015

Oh wow am excited to see what you come out with, I found the the stdout while trying to write a tool to control my headless nexus 5 (I broke the screen and the device is locked, on network 2g ... the only way out is to control it somehow :D) the mp4's framerate seems much superior to what i used to get on screencap and display

@juanpicado
Copy link

@sorccu I decided to use client.shell() like is done here https://github.com/mindmelting/adb-screenrecord/blob/master/bin/adb-screenrecord#L31 , any idea how to stop that programmatically? . To implement something similar to the topic of this ticket, I just previously recognize the Android version and then out of the box avoid record in devices < 4.4. Dirt but works for testing purposes.

pimterry pushed a commit to httptoolkit/adbkit that referenced this issue Dec 13, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants