ffmpeg writing to an audio device on MacOS

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

ffmpeg writing to an audio device on MacOS

Michael Glenn Williams
Hi All,

We noticed that if ffnpeg is built with avfoundation, we can read from an
audio device on MacOS, but we cannot write to one.

Is there any way to coerce ffmpeg into writing to an audio device on MacOS
mojave?
We would like to have the audio from our videos sent into the MacOS
coreaudio framework.

This command lists the devices that are available:

ffmpeg -f avfoundation -list_devices true -i ""

Michaels-Mac-Pro:~ MGW$ ffmpeg -f avfoundation -list_devices true -i ""

ffmpeg version N-79453-g5256250-tessus Copyright (c) 2000-2016 the FFmpeg
developers

  built with Apple LLVM version 6.0 (clang-600.0.57) (based on LLVM 3.5svn)

  configuration: --cc=/usr/bin/clang --prefix=/opt/ffmpeg --as=yasm
--extra-version=tessus --enable-avisynth --enable-fontconfig --enable-gpl
--enable-libass --enable-libbluray --enable-libfreetype --enable-libgsm
--enable-libmodplug --enable-libmp3lame --enable-libopencore-amrnb
--enable-libopencore-amrwb --enable-libopus --enable-libschroedinger
--enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libtheora
--enable-libvidstab --enable-libvo-amrwbenc --enable-libvorbis
--enable-libvpx --enable-libwavpack --enable-libx264 --enable-libx265
--enable-libxavs --enable-libxvid --enable-libzmq --enable-version3
--disable-ffplay --disable-indev=qtkit --disable-indev=x11grab_xcb

  libavutil      55. 20.100 / 55. 20.100

  libavcodec     57. 33.100 / 57. 33.100

  libavformat    57. 29.101 / 57. 29.101

  libavdevice    57.  0.101 / 57.  0.101

  libavfilter     6. 40.102 /  6. 40.102

  libswscale      4.  1.100 /  4.  1.100

  libswresample   2.  0.101 /  2.  0.101

  libpostproc    54.  0.100 / 54.  0.100

[AVFoundation input device @ 0x7fefad100280] AVFoundation video devices:

[AVFoundation input device @ 0x7fefad100280] [0] Capture screen 0

[AVFoundation input device @ 0x7fefad100280] [1] Capture screen 1

[AVFoundation input device @ 0x7fefad100280] AVFoundation audio devices:

[AVFoundation input device @ 0x7fefad100280] [0] Aggregate Device

[AVFoundation input device @ 0x7fefad100280] [1] System Audio Recorder

[AVFoundation input device @ 0x7fefad100280] [2] Quartet

[AVFoundation input device @ 0x7fefad100280] [3] Loopback Stereo

[AVFoundation input device @ 0x7fefad100280] [4] Loopback 64ch

[AVFoundation input device @ 0x7fefad100280] [5] Loopback Monitor

[AVFoundation input device @ 0x7fefad100280] [6] Loopback Audio

[AVFoundation input device @ 0x7fefad100280] [7] Soundflower (64ch)

[AVFoundation input device @ 0x7fefad100280] [8] Soundflower (2ch)

[AVFoundation input device @ 0x7fefad100280] [9] USB audio CODEC

: Input/output error

but we cannot seem to access them for output. Is it possible somehow?

--
<https://meetings.hubspot.com/michael-glenn-williams> Michael Williams

CEO | CTO

Smart Blonde Experiential
8054991994
[hidden email]
totalvu.tv
13900 Marquesas Way, Marina Del Rey, CA
<http://totalvu.tv>
[image: facebook]
<https://www.facebook.com/boldstream/app/128953167177144/> [image:
twitter] <https://twitter.com/smartblondecorp> [image: linkedin]
<https://www.linkedin.com/in/michaelglennwilliams/>
_______________________________________________
ffmpeg-user mailing list
[hidden email]
https://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
[hidden email] with subject "unsubscribe".
Reply | Threaded
Open this post in threaded view
|

Re: ffmpeg writing to an audio device on MacOS

Carl Eugen Hoyos-2
Am Mi., 20. Mai 2020 um 19:41 Uhr schrieb Michael Glenn Williams
<[hidden email]>:

> We noticed that if ffnpeg is built with avfoundation, we can read from an
> audio device on MacOS, but we cannot write to one.

Patch welcome!

Carl Eugen
_______________________________________________
ffmpeg-user mailing list
[hidden email]
https://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
[hidden email] with subject "unsubscribe".
Reply | Threaded
Open this post in threaded view
|

Re: ffmpeg writing to an audio device on MacOS

Michael Glenn Williams
Hi Carl, Thilo

We might be interested in taking this on. Could you help me to find the
necessary repos I suppose
avfoundation and also ffmpeg ?

On Wed, May 20, 2020 at 12:37 PM Carl Eugen Hoyos <[hidden email]>
wrote:

> Am Mi., 20. Mai 2020 um 19:41 Uhr schrieb Michael Glenn Williams
> <[hidden email]>:
>
> > We noticed that if ffnpeg is built with avfoundation, we can read from an
> > audio device on MacOS, but we cannot write to one.
>
> Patch welcome!
>
> Carl Eugen
> _______________________________________________
> ffmpeg-user mailing list
> [hidden email]
> https://ffmpeg.org/mailman/listinfo/ffmpeg-user
>
> To unsubscribe, visit link above, or email
> [hidden email] with subject "unsubscribe".



--
<https://meetings.hubspot.com/michael-glenn-williams> Michael Williams

CEO | CTO

Smart Blonde Experiential
8054991994
[hidden email]
totalvu.tv
13900 Marquesas Way, Marina Del Rey, CA
<http://totalvu.tv>
[image: facebook]
<https://www.facebook.com/boldstream/app/128953167177144/> [image:
twitter] <https://twitter.com/smartblondecorp> [image: linkedin]
<https://www.linkedin.com/in/michaelglennwilliams/>
_______________________________________________
ffmpeg-user mailing list
[hidden email]
https://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
[hidden email] with subject "unsubscribe".
Reply | Threaded
Open this post in threaded view
|

Re: ffmpeg writing to an audio device on MacOS

Carl Zwanzig
In reply to this post by Michael Glenn Williams
On 5/20/2020 10:41 AM, Michael Glenn Williams wrote:
> ffmpeg version N-79453-g5256250-tessus Copyright (c) 2000-2016 the FFmpeg

Have you tried a more modern version of ffmpeg? That one is positively
_ancient_. If not, please get the -latest- and try that (start at
https://ffmpeg.org/download.html)

Also, top-posting is highly discouraged on this list-
https://ffmpeg.org/mailing-list-faq.html.

z!
_______________________________________________
ffmpeg-user mailing list
[hidden email]
https://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
[hidden email] with subject "unsubscribe".
Reply | Threaded
Open this post in threaded view
|

Re: ffmpeg writing to an audio device on MacOS

Michael Glenn Williams
>
> Have you tried a more modern version of ffmpeg? That one is positively
> _ancient_. If not, please get the -latest- and try that (start at
> https://ffmpeg.org/download.html)
>
Thank you yes! There doesn't seem to be a build with avfoundation?


>
> Also, top-posting is highly discouraged on this list-
> https://ffmpeg.org/mailing-list-faq.html.
>
> Also thanks!
_______________________________________________
ffmpeg-user mailing list
[hidden email]
https://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
[hidden email] with subject "unsubscribe".
Reply | Threaded
Open this post in threaded view
|

Re: ffmpeg writing to an audio device on MacOS

Thilo Borgmann-2
In reply to this post by Michael Glenn Williams
Am 20.05.20 um 23:18 schrieb Michael Glenn Williams:
> Hi Carl, Thilo

Sorry I just realized my previous mail only went out to Michael instead to the list...


> We might be interested in taking this on. Could you help me to find the
> necessary repos I suppose
> avfoundation and also ffmpeg ?

There is no repo needed for avfoundation, it's an Apple framework delivered with the OS.


>> Am 21.05.20 um 00:04 schrieb Michael Glenn Williams:
>>
>> Have you tried a more modern version of ffmpeg? That one is positively
>> _ancient_. If not, please get the -latest- and try that (start at
>> https://ffmpeg.org/download.html)
>>
> Thank you yes! There doesn't seem to be a build with avfoundation?

Updating FFmpeg will not help you because the avfoundation device has always been input-only for all its existence...


> On Wed, May 20, 2020 at 12:37 PM Carl Eugen Hoyos <[hidden email]>
> wrote:
>
>> Am Mi., 20. Mai 2020 um 19:41 Uhr schrieb Michael Glenn Williams
>> <[hidden email]>:
>>
>>> We noticed that if ffnpeg is built with avfoundation, we can read from an
>>> audio device on MacOS, but we cannot write to one.
>>
>> Patch welcome!

... so as Carl Eugen said, this is a feature to be implemented first. If you don't want to try to implement it yourself, you might consider added a feature request / wish ticket on our trac.ffmpeg.org about it, fwiw.

-Thilo
_______________________________________________
ffmpeg-user mailing list
[hidden email]
https://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
[hidden email] with subject "unsubscribe".