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