Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

If it's so simple, why does it take 30k or so lines of code for scrcpy to do it?


Because there are a lot of features beyond just streaming a screen capture, it supports many versions of Android, and it is a polished utility.

The actually screen recording part is simple since you are just using existing Android APIs to have hook up the diplay server to a media encoder and the media encoder to the network.

https://github.com/Genymobile/scrcpy/blob/a3cdf1a6b86ea22786...


That is reasonablish as video APIs go. But it's quite a small part of all scrcpy has to do to mirror the screen over the network.

Most of that code would be covered with something like "gst-launch pipewiresrc ! encodebin" and the whole mirroring with adding a few elements.

Well, in theory at least; gstreamer has the habbit of getting quite fiddly oftentimes. But I don't see any fundamental problems why this too couldn't work with simple composable tools.




Consider applying for YC's Winter 2026 batch! Applications are open till Nov 10

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: