[FFmpeg-user] ffmpeg - avfoundation Audio stutters / sounds broken with screen capture [sample, config, output included]

kevin kevincastiglione at gmail.com
Sun Apr 26 15:56:18 CEST 2015


Hi Moritz

On Sun, Apr 26, 2015 at 3:14 AM, Moritz Barsnick <barsnick at gmx.net> wrote:

> Hi Kevin,
>
> On Sat, Apr 25, 2015 at 20:42:12 -0700, kevin wrote:
> > The recorded audio is stuttering, breaks, or there is short bursts.
> >
> > ffmpeg -f avfoundation -i "1:0" -r 25  -c:v libx264 -preset fast -crf 22
> > -c:a libfdk_aac  -b:a 128k -ar 44100 -s 640x480 screen.mp4
>
> What happens to the audio if you disable the capturing of video?
> (Something like "-vn".) Just an idea of something to test.
>


With -vn audio quality is great, no problem at all.
Furthermore, as mentioned in my first email, with -i "0:0" [FaceTime camera
and mic] both audio and video is great.
The problem is only with -i "1:0".


Furthermore, instead of using "-r", avfoundation should recently
> support the input option "-framerate" (to be set before "-i"). This has
> nothing to do with your issue


If I add -framerate before "-i" and also before -f it exits with error
message option not found:

ffmpeg -f avfoundation -framerate 25 -i "1:0"  -c:v libx264 -preset fast
-crf 22  -c:a libfdk_aac  -b:a 128k -ar 44100 -s 640x480 -vn screen.mp4
ffmpeg -framerate 25 -f avfoundation -i "1:0"  -c:v libx264 -preset fast
-crf 22  -c:a libfdk_aac  -b:a 128k -ar 44100 -s 640x480 -vn screen.mp4

 Option framerate not found.

Full output at end of email.



> I'm not at all sure any of this will help you though. I'm just thinking
> out loud.
>
Thank you very much for replying and helping, I really appreciate it.
FFmpeg is amazing and so is the community around it.






ffmpeg -f avfoundation -framerate 25 -i "1:0"  -c:v libx264 -preset fast
-crf 22  -c:a libfdk_aac  -b:a 128k -ar 44100 -s 640x480 -vn screen.mp4
ffmpeg version 2.6.1 Copyright (c) 2000-2015 the FFmpeg developers
  built with Apple LLVM version 6.1.0 (clang-602.0.49) (based on LLVM
3.6.0svn)
  configuration: --prefix=/usr/local/Cellar/ffmpeg/2.6.1 --enable-shared
--enable-pthreads --enable-gpl --enable-version3 --enable-hardcoded-tables
--enable-avresample --cc=clang --host-cflags= --host-ldflags=
--enable-libx264 --enable-libmp3lame --enable-libvo-aacenc --enable-libxvid
--enable-libfreetype --enable-libvorbis --enable-libvpx --enable-libfaac
--enable-libass --enable-ffplay --enable-libfdk-aac --enable-openssl
--enable-libopus --enable-libquvi --enable-libx265 --enable-nonfree
--enable-vda
  libavutil      54. 20.100 / 54. 20.100
  libavcodec     56. 26.100 / 56. 26.100
  libavformat    56. 25.101 / 56. 25.101
  libavdevice    56.  4.100 / 56.  4.100
  libavfilter     5. 11.102 /  5. 11.102
  libavresample   2.  1.  0 /  2.  1.  0
  libswscale      3.  1.101 /  3.  1.101
  libswresample   1.  1.100 /  1.  1.100
  libpostproc    53.  3.100 / 53.  3.100
[avfoundation @ 0x7fd77400da00] Selected pixel format (yuv420p) is not
supported by the input device.
[avfoundation @ 0x7fd77400da00] Supported pixel formats:
[avfoundation @ 0x7fd77400da00]   uyvy422
[avfoundation @ 0x7fd77400da00]   yuyv422
[avfoundation @ 0x7fd77400da00]   nv12
[avfoundation @ 0x7fd77400da00]   0rgb
[avfoundation @ 0x7fd77400da00]   bgr0
[avfoundation @ 0x7fd77400da00] Overriding selected pixel format to use
uyvy422 instead.
Option framerate not found.


More information about the ffmpeg-user mailing list