Open super0610 opened 1 year ago
I tested with several phones, Galaxy S8, Pixel 3, S21, preview works with these phones. But when I try with Doogee S51 phone, preview is green colored.
https://www.doogee.cc/s51/specs.html
https://play.google.com/store/apps/details?id=net.usb.usby4 This app works with S51 doogee phone.
Hope your reply asap, thanks.
Is the preview OK?
The preview from this repo is like the above screenshot that I need to solve. But the Endoscope app from google play is okay (Preview is okay) Thanks for the reply, Hope you can guide me.
1, Save a video and send to me: quantum6@yeah.net 2, Try this: https://github.com/quantum6/Android-UVC-Camera-Bulk-Transfer
Hi @quantum6 I've sent email with video attached. Hope you can check and help me how to fix it. Thanks.
1, When you move camera, is video frame changed? 2, Point to a obj, create 3 files: video, take photo, use a phone take photo.
Hi @quantum6 I tried to take picture and record video , but it didn't work, file size is 0B. Anyway, I attached preview screen with camera movement, as you can see preview is changed,
https://github.com/jiangdongguo/AndroidUSBCamera I tried to debug with this repo(built in my side, and put debug code in native library), UVCPreview.cpp.
But the preview data is almost 0x00, also preview data is rarely updated (maybe fps is less than 1), for working phone, preview frame data is updated very fast.
Can you know the reason?
hi @quantum6 , when I debug with above repo, the preview frame data size is different with working phone. for same resolution (640 x 480)
Hi @quantum6 , any suggestion?
I tried and record video OK. So you should: Is the app has permission? Is the save path right? If you can save and upload the video, I can check the format.
Hi @quantum6 Please check videos, hope you can find reason.
As you can see from the image, frame byte is different with working phone (it is 614400)
Also, fps is 1 from video.
m6/Android-USB-OTG-Camera/assets/44995535/44b10844-08d8-4a9c-afd4-9acb93a8887a
It's seems easy to fix. I add a "Record YUV" menu on this repo:
https://github.com/quantum6/Quantum6-Android-USB-OTG-Camera
Use "Record YUV" and upload the file(like 123785-640x480.yuv). I will check it.
case R.id.menu_recording_yuv: if (mCameraHelper == null || !mCameraHelper.isCameraOpened()) { showShortMsg("sorry,camera open failed"); return super.onOptionsItemSelected(item); } if (isRecordYuv) { isRecordYuv = false; FileUtils.releaseFile(); showShortMsg("stop record..."); } else { isRecordYuv = true; FileUtils.createFile(getRecordFileName()); showShortMsg("start record..."); } break;
what this code will do? anyway I tried to build your project (Q6 app), but file size is 0B
just clicked "Recording YUV" to start record, and clicked again to stop.
The code save yuv format to fille. And I tested again it work well. You can click recodr to comfirm. And I upload my apk, you can try it. Good luck!
Where is apk to try? I built app in my side and tried yuv record, however video file size is 0. (mine is Samsung Galaxy S8, preview works) But with Doogee phone, preview didn't work, almost green like before. I think, *.so files needs to be updated?
1, Do you open the repo? 2, Is the apk size OK? 3, When Record(not Record YUV), the file is OK?
Hi, as you can see from my screen, all file size is 0B I downloaded your apk and tried both yuv, and recording. my phone is samsung galaxy s8 (android 9) Thanks.
Did you plug the camera?
Sure, I did.
1, the mp4 you upload, use which apk? 2, what the info on screen? 3, try other phone.
https://github.com/jiangdongguo/AndroidUSBCamera
I've built apk from this repo and above videos are from this apk. I think, you are using same .so files? Camera preview are green in both apks, so I think it can't be fixed if .so files are not modified. Can't use other phone, only apk is not working with Doogee phone. Thanks.
do you know why fps is 1? actually one frame every few seconds, so actually fps is less than 1.
Hi @quantum6 I tried to make some log with AndroidUSBCamera repo, preview.zip Please check this file, and let me know your thought.
As you can see from this image, one frame in 3 seconds, can you help?
1, This code is forked from that. I rebuild and upload, anyone can download and build directly. 2, fps=1means no video frame received. 3, How you record the video file?
I built this repo (https://github.com/jiangdongguo/AndroidUSBCamera) and used apk to record. Record works even the preview is almost green, and low fps (= 1). Did you check yuv file? can know anything?
I researched that repo. By this time, I don't know (where the data come from). So I can;'t record yuv data.
In specific Android, camera preview is green. Can you guide me how to solve this?