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

✨ Android: Return Video size and duration #77

Closed
mrousavy opened this issue Mar 17, 2021 · 6 comments
Closed

✨ Android: Return Video size and duration #77

mrousavy opened this issue Mar 17, 2021 · 6 comments
Assignees
Labels
🤖 android Issue affects the Android platform 🐛 bug Something isn't working

Comments

@mrousavy
Copy link
Owner

mrousavy commented Mar 17, 2021

On Android the video duration and size are not set correctly because CameraX doesn't provide that information in the Callback.

https://github.com/cuvent/react-native-vision-camera/blob/dff8fc71788311c324e6eb80976a6ec50596d3e5/android/src/main/java/com/mrousavy/camera/CameraView%2BRecordVideo.kt#L32-L36

The only workaround for this would be reading the Video's Metadata, but that's an extra overhead I don't want to introduce.

With frame processors I'm going to have to create a custom Video recorder and encoder anyways, I can manually use a stopwatch for this then. So #2 probably fixes this issue.

@mrousavy mrousavy added 🐛 bug Something isn't working 🤖 android Issue affects the Android platform labels Mar 17, 2021
@mrousavy mrousavy changed the title 🐛 Android: Video doesn't have duration set 🐛 Android: Video doesn't have duration or size Mar 17, 2021
@mrousavy mrousavy changed the title 🐛 Android: Video doesn't have duration or size ✨ Android: Return Video size and duration Mar 17, 2021
@mrousavy mrousavy self-assigned this Apr 12, 2021
@hirbod
Copy link
Contributor

hirbod commented Jan 13, 2022

@mrousavy would love to have feature parity here. Missing the duration for android.

@mrousavy
Copy link
Owner Author

This is actually implemented on Android already with one of my latest PRs.

@hirbod
Copy link
Contributor

hirbod commented Jan 14, 2022

Oh really? Duration is there for android? I just implemented ffprobe and some crazy async tasks for it :D

@mrousavy
Copy link
Owner Author

Did you check if it was there?

@hirbod
Copy link
Contributor

hirbod commented Jan 14, 2022

Nope, I saw this ticket and I knew it wasn't there couple of weeks ago.

@hirbod
Copy link
Contributor

hirbod commented Jan 14, 2022

Yes, it is there... yarn remove react-native-ffmpeg-kit
:D

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🤖 android Issue affects the Android platform 🐛 bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants