[FFmpeg-user] How to capture video and audio from MacBook's camera/microphone?

Kuu Miyazaki miyazaqui at gmail.com
Sun Oct 11 14:24:38 CEST 2015


>My internal MIC works fine here - please report back if you don't get it
>working.

I'm still unable to hear the sound.
I tried with a different Macbook Pro (OSX 10.11 El Capitan.)
But the result was the same, no sound.
Below is the output:

$ ffmpeg -f avfoundation -video_size 320x240 -pixel_format bgr0 -i
"0:0" video-audio.webm

ffmpeg version 2.8 Copyright (c) 2000-2015 the FFmpeg developers
  built with Apple LLVM version 7.0.0 (clang-700.0.72)
  configuration: --prefix=/usr/local/Cellar/ffmpeg/2.8 --enable-shared
--enable-pthreads --enable-gpl --enable-version3
--enable-hardcoded-tables --enable-avresample --cc=clang
--host-cflags= --host-ldflags= --enable-opencl --enable-libx264
--enable-libmp3lame --enable-libvo-aacenc --enable-libxvid
--enable-libvorbis --enable-libvpx --enable-ffplay --enable-libopus
--enable-vda
  libavutil      54. 31.100 / 54. 31.100
  libavcodec     56. 60.100 / 56. 60.100
  libavformat    56. 40.101 / 56. 40.101
  libavdevice    56.  4.100 / 56.  4.100
  libavfilter     5. 40.101 /  5. 40.101
  libavresample   2.  1.  0 /  2.  1.  0
  libswscale      3.  1.101 /  3.  1.101
  libswresample   1.  2.101 /  1.  2.101
  libpostproc    53.  3.100 / 53.  3.100

Input #0, avfoundation, from '0:0':
  Duration: N/A, start: 52850.629467, bitrate: N/A
    Stream #0:0: Video: rawvideo (BGR[0] / 0x524742), bgr0, 320x240,
17 tbr, 1000k tbn, 1000k tbc
    Stream #0:1: Audio: pcm_f32le, 44100 Hz, stereo, flt, 2822 kb/s
[libvpx-vp9 @ 0x7f85c3072400] v1.4.0
[libopus @ 0x7f85c3088800] No bit rate set. Defaulting to 96000 bps.
Output #0, webm, to 'video-audio.webm':
  Metadata:
    encoder         : Lavf56.40.101
    Stream #0:0: Video: vp9 (libvpx-vp9), yuv444p, 320x240, q=-1--1,
200 kb/s, 17 fps, 1k tbn, 17 tbc
    Metadata:
      encoder         : Lavc56.60.100 libvpx-vp9
    Stream #0:1: Audio: opus (libopus), 48000 Hz, stereo, flt, 96 kb/s
    Metadata:
      encoder         : Lavc56.60.100 libopus
Stream mapping:
  Stream #0:0 -> #0:0 (rawvideo (native) -> vp9 (libvpx-vp9))
  Stream #0:1 -> #0:1 (pcm_f32le (native) -> opus (libopus))
Press [q] to stop, [?] for help
frame=   36 fps=1.8 q=0.0 Lsize=      54kB time=00:00:06.41 bitrate=
69.6kbits/s
video:42kB audio:12kB subtitle:0kB other streams:0kB global
headers:0kB muxing overhead: 2.447533%

$ ffplay video-audio.webm

* snip *

Input #0, matroska,webm, from 'video-audio.webm': sq=    0B f=0/0
  Metadata:
    encoder         : Lavf56.40.101
  Duration: 00:00:06.41, start: 0.004000, bitrate: 69 kb/s
    Stream #0:0: Video: vp9 (Profile 1), yuv444p(tv), 320x240, SAR 1:1
DAR 4:3, 17 fps, 17 tbr, 1k tbn, 1k tbc (default)
    Stream #0:1: Audio: opus, 48000 Hz, stereo, fltp (default)
2015-10-11 21:09:30.166 ffplay[41579:227848] 21:09:30.166 WARNING:
140: This application, or a library it uses, is using the deprecated
Carbon Component Manager for hosting Audio Units. Support for this
will be removed in a future release. Also, this makes the host
incompatible with version 3 audio units. Please transition to the
API's in AudioComponent.h.
   8.89 A-V:  0.050 fd=   0 aq=    0KB vq=    0KB sq=    0B f=0/0

2015-10-11 3:59 GMT+09:00 Thilo Borgmann <thilo.borgmann at mail.de>:
> Am 10.10.15 um 17:43 schrieb Kuu Miyazaki:
>>> You will have to use the filters "video:audio" syntax, or the
>> -audio/video_device_index options.
>>
>> Thank you very much.
>> Now I can get a V+A file.
>>
>> Though the sound is still silent, the audio data itself seems to be included.
>> I will try tweaking some parameters.
>
> My internal MIC works fine here - please report back if you don't get it
> working.
>
> -Thilo
>
> _______________________________________________
> ffmpeg-user mailing list
> ffmpeg-user at ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/ffmpeg-user


More information about the ffmpeg-user mailing list