0

I have Google this proplem, Here is a simliar problem

But when i exectue following command

val command = arrayOf("/usr/local/bin/ffmpeg",
    "-f", "avfoundation",
    "-i", ":2",
    "-t", "5",
    "-ar", "11025",
    "-ac", "1",
    "-acodec","aac", "-")

I got this error Unknown input format: 'avfoundation' Who has ideas for this problem?

PS: My platform is android, i am using android-ffmpeg lib.

Cyrus
  • 8,995
  • 9
  • 31
  • 58

1 Answers1

1

Looks like you're running ffmpeg on Android, but avfoundation is only supported by Apple devices.

llogan
  • 121,796
  • 28
  • 232
  • 243
  • yes, i am running ffmpeg on Android, so Do you know what kind of commands i should use? – Cyrus Jun 05 '20 at 01:32
  • @Cyrus I don't know anything about Android, but perhaps it supports ALSA. See [docs](https://ffmpeg.org/ffmpeg-devices.html#alsa) and [wiki](https://trac.ffmpeg.org/wiki/Capture/ALSA). – llogan Jun 05 '20 at 05:12
  • 1
    You can type `ffmpeg -devices` to list the available devices (regardless of the platform where you're running it). However, I just tried to run the command from Android and only got back the `lavfi`, being the `Libavfilter` input virtual device. It seems that `ffmpeg` doesn't get the internal devices on Android (but I might be wrong) – gbernardi Aug 13 '20 at 13:48