Genymobile / scrcpy

Display and control your Android device
Apache License 2.0
109.16k stars 10.5k forks source link

Take a photo with the phone that is sent (transfered) directly to the pc. Phone cameras are way better than typical laptop/pc... #2197

Closed nimusd closed 3 years ago

nimusd commented 3 years ago

Is your feature request related to a problem? Please describe. A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

Describe the solution you'd like A clear and concise description of what you want to happen.

Describe alternatives you've considered A clear and concise description of any alternative solutions or features you've considered.

Additional context Add any other context or screenshots about the feature request here.

Biswa96 commented 3 years ago

You can change the USB mode to transfer any type of file.

rom1v commented 3 years ago

Duplicate of #241

nimusd commented 3 years ago

Thank you Romain! ...but... I am not talking about casting the camera in using it as a webcam. I would like to take a full resolution photo (40 megapixel on mine) that is not saved on the phone but directly on the computer. The usage scenario came when I wanted to scan a large number of documents at high resolution. I had to take the photos with the phone and then transfer them to the pc and delete them from the phone.

I think this is a novel usage for these apps as I scoured the internet but could not find anything that does this. Since I am a developer I thought I could just do it and of course I first searched for some open source examples and I found your marvelous project which is so advanced that it's not worth it for me to start from scratch.

My thinking now is that this should be so simple that it is not worth it for me to get involved. It would take me a long time to get up to speed and I am on Windows, not Linux...

Tu parles français, non? ... moi aussi!

Cheers, Nimus

On Mon, Mar 15, 2021 at 12:36 AM Romain Vimont @.***> wrote:

Closed #2197 https://github.com/Genymobile/scrcpy/issues/2197.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/Genymobile/scrcpy/issues/2197#event-4456967234, or unsubscribe https://github.com/notifications/unsubscribe-auth/AA43VSIEUUDXVSYJM5RUXY3TDW2HPANCNFSM4ZFY7NNQ .

rom1v commented 3 years ago

To access the camera, you'll need a real Android app on the device (scrcpy executes a java application from shell).

From that app, you could take a photo and encode it. Then transfer it to the computer by some mean (either via a socket over adb, or a socket using the IP:port if the device is on the same LAN as the computer). Or just save the picture to some well known location, then adb pull it.

Tu parles français, non? ... moi aussi!

Oui, mieux qu'anglais ;)

LBensman commented 3 years ago

You don't really need any additional support from scrcpy. Do you have Dropbox app/account? If so, you can simply open Dropbox app on the phone to take picutres. Open app, navigate to dropbox folder where you want those saved (and which automatically syncs to your computer), tap ⊕ and then "Take a photo". This should bring up camera view to take a picture. Take a picture, accept, and the image should sync from phone to Dropbox and then to your computer, and voila.

J'aimerais parler français.

nimusd commented 3 years ago

Bonjour à tous et merci beaucoup!

J'ai aussi découvert qu'il est possible de prendre une photo dans Onenote et cela se synchronise bien sûr avec n'importe quoi... De plus, il est possible non seulement de modifier (comme le recadrage) avant la sauvegarde mais aussi d'ajouter plusieurs photos à la suite sur la même page qu'on peut par la suite sauvegarder en format ".pdf". Finalement, les photos ne sont pas sauvegardées localement dans le téléphone portable évitant d'avoir à nettoyer après coup.

C'est absolument génial! ... et j'adore écrire en français... Ça m'arrive si peu souvent!😀

Merci encore une fois et bonne continuation de votre merveilleux project, Nimus

On Mon, Mar 15, 2021 at 11:35 AM LBensman @.***> wrote:

You don't really need any additional support from scrcpy. Do you have Dropbox app/account? If so, you can simply open Dropbox app on the phone to take picutres. Open app, navigate to dropbox folder where you want those saved (and which automatically syncs to your computer), tap ⊕ and then "Take a photo". This should bring up camera view to take a picture. Take a picture, accept, and the image should sync from phone to Dropbox and then to your computer, and voila.

J'aimerais parler français.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/Genymobile/scrcpy/issues/2197#issuecomment-799654568, or unsubscribe https://github.com/notifications/unsubscribe-auth/AA43VSOVE5MWXHR5CHRQGLDTDZHOJANCNFSM4ZFY7NNQ .

LBensman commented 3 years ago

Haha 😂 , I meant to say "I wish I spoke French (but I don't!)" and it seems that Google Translate translated that as more of "I'd like to speak French" and I didn't mean to suggest to switch to French 🤣 . Damn you Google!!!!!!! But let's hope it did translate most of your message intact:

Yes, OneNote can accomplish this as well. It really depends how you want your pictures delivered to you, and how you plan to use it. If you need raw picture files (i.e. your jpegs), then dropbox is best. If capturing on onenote gets those pictures faster to whatever destination you want them at, that certainly works too. I don't recall exactly, but I suspected at one point that OneNote modifies the pictures a little bit when it inserts them into pages (I think it reduces their dimensions and/or transcodes them to lower fidelity to save on space), but if such reduction is ok for you, that'll work. Also, if I remember correctly, with Dropbox it also doesn't save them locally if it was taken with dropbox app (as opposed to camera, and then shared to dropbox app), but that stands to be confirmed as I may be wrong on that.

But either way, whichever method works, it's probably more prudent way.