What are the limitations of accessing /dev/video0 on an android device?
from tetris11@lemmy.ml to linux@lemmy.ml on 22 May 14:25
https://lemmy.ml/post/30497161
from tetris11@lemmy.ml to linux@lemmy.ml on 22 May 14:25
https://lemmy.ml/post/30497161
Conceptually I can understand that Termux cant take a photo or video from a camera device because it doesnt have access to the camera drivers that Android has…
…except that the Termux API does allow you to take a photo. So why is video off limits?
threaded - newest
Probably because it still uses the android camera API to do so rather than directly access /dev/video0.
github.com/…/app%2Fsrc%2Fmain%2Fjava%2Fcom%2Fterm…
I’m sure it is possible to add a video capture to the API 😉
Yeah, I mean it’s not like they’re calling native Android functions there (in
proceedWithOpenCamera
), it looks like the CameraDevice object might offer a lot more capture modes that just aren’t being tapped into. Is it just a programming issue, or does Android only offer Photo contexts but not Video ones, or…?here is the script that kinda does what you want: gist.github.com/…/1635bdcaf616e3c310a9492d993ec17…
Yeah I have a bash script that does similar, using the notification API for interactivity
It just needs ffmpeg tied to the exit function
Android doesn’t handle users and groups like standard Linux, but the user account assigned to Termux is not a member of the camera group.
Is it just a permissions issue? On a rooted phone, could I not simply add termux user to the camera group
That seems likely to work.