Accessing webcam mic from command line version of FFMPEG for android

I am currently testing audio and video streaming from a webcam using a command line version of FFMPEG on an android box. I am having a problem accessing the webcam micUsing Ubuntu as a reference, the correct command to determine the recording devices available is arecord -L . Unfortunately arecord -L does not work on the Android box The current command option alsa for accessing the webcam mic is ffmpeg -f alsa -alsa_device_name.. and the previous option of oss does not work either, ie ffmpeg -f -oss.. does not work either. The listed audio devices shown in /dev/snd shows the mic portion of the webcam as pcmC3D0c and controlC3. The reason I know this is because if I unplug the webcam these values vanish from the directory listing. Has anyone tried successfully to access the mic portion of a webcam using ffmpeg on an android box? How do you formulate the correct format of the command to access the webcam mic. Please note that I am able to access the audio and video on my Ubuntu PC using ffmpeg hence i know that both devices work

Answers


I finally figured out what I was doing wrong. The issue was with my build of FFMpeg To use either the camera or mic portion(s) of a webcam, one needs to call the device(s) using the appropriate format(s) in FFMPEG. The camera portion is controlled by video4linux2, while the mic portion of the webcam is controlled by alsa. I should have checked and made sure that my build of FFMPEG had both formats - alsa and video4linux available in my FFMPEG build. The command to use is ./ffmpeg -formats The output would show somewhere in the output listing as DE alsa for sound, which means alsa is available for Decoding and Encoding. Likewise for the video portion, D video4linux - meaning that video4linux was available to decoode the video coming from the camera portion of the webcam.. Because alsa was not available, the command ./ffmpeg -f alsa... always gave a syntax error I guess the lesson is check your ffmpeg build for all the features you need to make sure they are there before you attempt to use it. "Thank you" to all who looked at the question!


Need Your Help

Add folder outside the git repo (Workflow)

git workflow version-control

I am trying to figure out a git workflow. At the moment we have a httpdocs directory with the old legacy live site, which we don't want to be part of a git repo. I have been building a newer mobile

ReactNative picker value resets on selection

ios facebook reactjs react-native

I am working on a react native component where it has a listview with different listitems. ListItems have button on click of which it should show a reactnative pickerview . Now everything works fine