Expose Camera and Microphone
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 4.3k
- Forks
- 920
- PR merge metrics
- No merged PRs in 30d
Description
Feature description
Termux has a very complete collection of packages that can help to create a streaming server from the phone (eg. rtmpdump, icecast, nginx, etc), so I think it would be very useful to get the real-time data from those devices, instead of saving them to a file.
So to clarify the idea, I'm thinking of accesing the micro and camera as I would in a GNU/Linux system (through /dev/videoX or /dev/snd), but in this case would use the termux-api lib. So let's say I want to record from termux (with ffmpeg) my camera, it would be something like:
ffmpeg -i video=${termux-api Camera} -i ${termux-api Microphone} -o $OUTPUT
So ffmpeg is so versatile that $OUTPUT can be anything: a file, a streaming server, an URL, etc.
Reference implementation
Mobile WebCam - Though I couldn't manage to stream the camera through MJPEG (I believe because is outdated), it is supposed to do it.
Termux, SoX, PulseAudio - Here is an example of how to record the microphone input with pulseaudio, instead of termux-microphone-record
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reviewing the existing termux-api interfaces and the termux-microphone-record behavior, then compare them with the Mobile WebCam and Termux, SoX, PulseAudio references. The work is complete when camera and microphone data can be exposed in real time for tools such as ffmpeg, rather than only being saved to a file.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- android, java
- Domain
- api, audio-video-rtc, mobile
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Active
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100