libcimbar icon indicating copy to clipboard operation
libcimbar copied to clipboard

files from phone to laptop

Open Mcofir opened this issue 2 months ago • 11 comments

trying to move files from android phone to laptop, but unfortunately the laptop camera cant catch the barcode shapes due to laptop camera is not so good and phone screen is small, so this combination is really bad.

i thought maybe if you can make a mode with larger shapes & more frames/smaller file sizes support , for such cases , cause this way i couldnt transfer any files.

thank you , i love the idea of the project

Mcofir avatar Oct 27 '25 11:10 Mcofir

Even with mode Bm? Bm is already a bit slow compared to others...

How large are your files?

Anonymous3-a avatar Oct 29 '25 03:10 Anonymous3-a

Even with mode Bm? Bm is already a bit slow compared to others...

How large are your files?

hey , yes i tried all the modes , when i put the phone infront of the camera it catches just some noisy colors, files are under 600kb - (images)

Mcofir avatar Oct 29 '25 05:10 Mcofir

For modern laptop webcams it seems like the resolution is usually ok (especially for mode Bm) but the other stuff (focus, exposure) can be pretty bad for imaging small screens. For auto-exposure, the best bet is to be in a bright room. It doesn't seem like it should help that much but it really does.

Auto-focus is much more annoying. You can try a few things to get it to cooperate better:

  • put your hand in front of the phone to trick the camera into focusing at the right distance
  • repeatedly pause the feed (toggle the sender menu)
  • slow down the sender framerate. This currently requires you to change this line and self-host the webapp with the change, but I've been thinking about a UI option to make it easier

I've also been experimenting with manual focus, but I'm not sure how many browsers/webcams support it well. There's currently a test version (this branch: https://github.com/sz3/libcimbar/tree/webdec-manual-focus5) with a manual focus slider here -- but be warned that it's unfinished and a bit buggy.

(I also tend to replace the code there whenever I want to test something, so it will get unannounced changes/updates/accidental new bugs)

sz3 avatar Oct 31 '25 21:10 sz3

hey, its been few weeks since i opened this issue, i just got a really top high end laptop , used bm , and full screen on my phone , in bright room, i tried also to use the link you sent https://preview.cimbar.org/recv.html but i couldnt find manual focus slider there , maybe you removed it? anyway it still couldnt catch the barcode ...important to mention my phone screen is good size 6.6 inch display, maybe can something be done anyway to improve the ability of this to work?

EDIT:sorry i closed the thread by accident

Mcofir avatar Nov 20 '25 18:11 Mcofir

Sorry about that -- I was testing something else and removed the manual focus for a bit. It's back on the preview site now.

Definitely try pausing the sender (toggle the menu on/off, it'll freeze the animation for a second) to see if that helps.

sz3 avatar Nov 20 '25 21:11 sz3

i tried now your suggestions,

  • it seems like manual focus is not able to switch to manual mode, else of the toggles does allow me to change them but not the focus, i tried with microsoft edge browser as brave didnt had the toggles at all, and chrome for some reason didnt showed the camera preview
  • i tried the to freeze the animation , it didnt help as well

edit: apparently im dumb and again closed the thread, can you please re open it?

Mcofir avatar Nov 20 '25 23:11 Mcofir

it seems like manual focus is not able to switch to manual mode

This is what I'm afraid of where manual focus is concerned -- I'm not sure how well the browser APIs (and cameras!) actually work. So we may be stuck with trying to trick autofocus into doing the right thing.

I wonder if lowering the framerate might help? Obviously that slows down the transfer speed, but right now you're getting 0 bytes at all 🤔 (see https://github.com/sz3/libcimbar/issues/105 -- this would require you to download the code and host it locally though)

One thing you can try is to capture a camera frame (e.g. with a screenshot on the laptop) and we can look at it to see if a human could decode it.

sz3 avatar Nov 21 '25 01:11 sz3

i dont think the issue is the frames, my camera is 60fps, even if i put my finger on the bottom of the screen making the image stop , the image is not clear enough , thats why at first i was suggesting bigger symbols method , here ill add an image while the barcode is frozen and i took a screenshot ,the symbols are not clear enough https://files.catbox.moe/avj1yt.png

Mcofir avatar Nov 21 '25 01:11 Mcofir

actually i tried to check myself , and used the application on my phone and made the barcore in BM full screen on my 16 inch laptop , and still couldnt get the file at all

Mcofir avatar Nov 21 '25 08:11 Mcofir

Not sure if it's just in your image or in general, but make sure you fill as much of the camera feed as you can with the barcode, not just within the marker brackets. (maybe I should move the marker brackets closer to the edges 🤔 ) You basically want to put the barcode squares right inside the edges of your camera feed.

re: framerate

The reason you might want to try a reduced framerate on the sender is related to autofocus. We change frames at a rate of 15 fps, but I've seen that speed trip up certain camera's autofocus, where lower speeds seem slightly more reliable. Usually I've been able to get those working though.

One thing you could also try if you want is a really small file (<7500 bytes) and then freeze the image so it's not animated. If you can't get the camera to focus even on a non-animated frame it sadly can't work.

(another way to try to force it to focus is to put text or something on the screen, wait for the text to be in focus, then swap to the barcode feed...)

actually i tried to check myself , and used the application on my phone and made the barcore in BM full screen on my 16 inch laptop , and still couldnt get the file at all

laptop -> phone is a much better tested path, so I'm a bit more confident that this will work. To summarize,

  • make sure it fills as much of the screen as possible
  • pause to force autofocus. Manually check the the image is clear
  • ambient brightness helps both autofocus and autoexposure
  • try with both mode B and mode Bm (unless mode B works!)

sz3 avatar Nov 21 '25 08:11 sz3

mm , yes i tried now your suggestions , full screen filling the whole camera frame with the barcode it didnt worked so i guess ill wait a bit more to see where this project going , i dont sure if it needs more work or my equipment is not good enough

Mcofir avatar Nov 21 '25 08:11 Mcofir