[FFmpeg-user] ffmpeg -f avfoundation HELL - please help!

Demián Andrés Rodriguez demian85 at gmail.com
Tue Jan 3 18:55:47 EET 2017


Hi,

This is a refactor of my last email, which is stuck in moderation queue.
Hope this gets sent asap.

I've recently posted my question here
<http://superuser.com/questions/1162961/screen-capture-using-ffmpeg-f-avfoundation-and-libvpx-too-many-problems>,
so please, as you are all "ffmpeg-experts" (more than me for sure), I'd
appreciate your help.

Thank you very much.

On Tue, Jan 3, 2017 at 10:43 AM Demián Andrés Rodriguez <demian85 at gmail.com>
wrote:

> Hi guys,
>
> I'm trying to capture screen and audio with ffmpeg (latest static build
> snapshot) on Mac OSX 10.12.2.
>
> This library is my last option, since web technologies suck at video
> capture or have bugs <https://github.com/electron/electron/issues/8325>,
> and I'm not a Swift developer
> <https://developer.apple.com/reference/avfoundation>.
>
> I would like to capture screen and audio and encode using
> vp8/vp9/vorbis/opus. I'm getting video but audio breaks, there is no audio
> at all.
> Capturing audio only works fine using both vorbis and opus.
>
> Here are my two commands. I'm spawning process using Node.js and stopping
> after 10 seconds for testing.
> Am I missing one of the million options available for video encoding or
> one of the million options available for audio encoding? Is this a bug?
>
> ffmpeg  -y -f avfoundation -capture_cursor 1 -framerate 25 -i 1:0 -c:v
> libvpx -c:a libvorbis -b:v 1M -b:a 128K capture.webm
>
> *Output:*
>
> ffmpeg version N-82977-g8fd3e02-tessus Copyright (c) 2000-2016 the FFmpeg
> developers
>   built with Apple LLVM version 8.0.0 (clang-800.0.42.1)
>   configuration: --cc=/usr/bin/clang --prefix=/opt/ffmpeg
> --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. 43.100 / 55. 43.100
>   libavcodec     57. 70.100 / 57. 70.100
>   libavformat    57. 61.100 / 57. 61.100
>   libavdevice    57.  2.100 / 57.  2.100
>   libavfilter     6. 68.100 /  6. 68.100
>   libswscale      4.  3.101 /  4.  3.101
>   libswresample   2.  4.100 /  2.  4.100
>   libpostproc    54.  2.100 / 54.  2.100
> [avfoundation @ 0x7fdcc1800800] Selected pixel format (yuv420p) is not
> supported by the input device.
> [avfoundation @ 0x7fdcc1800800] Supported pixel formats:
> [avfoundation @ 0x7fdcc1800800]   uyvy422
> [avfoundation @ 0x7fdcc1800800]   yuyv422
> [avfoundation @ 0x7fdcc1800800]   nv12
> [avfoundation @ 0x7fdcc1800800]   0rgb
> [avfoundation @ 0x7fdcc1800800]   bgr0
> [avfoundation @ 0x7fdcc1800800] Overriding selected pixel format to use
> uyvy422 instead.
> [avfoundation @ 0x7fdcc1800800] Stream #0: not enough frames to estimate
> rate; consider increasing probesize
> Input #0, avfoundation, from '1:0':
>   Duration: N/A, start: 13946.237833, bitrate: 2822 kb/s
>     Stream #0:0: Video: rawvideo (UYVY / 0x59565955), uyvy422, 2560x1600,
> 1000k tbr, 1000k tbn, 1000k tbc
>     Stream #0:1: Audio: pcm_f32le, 44100 Hz, stereo, flt, 2822 kb/s
> [libvpx @ 0x7fdcc0045600] v1.6.0
> Output #0, webm, to 'capture.webm':
>   Metadata:
>     encoder         : Lavf57.61.100
>     Stream #0:0: Video: vp8 (libvpx), yuv420p, 2560x1600, q=-1--1, 1000
> kb/s, 1000k fps, 1k tbn, 1000k tbc
>     Metadata:
>       encoder         : Lavc57.70.100 libvpx
>     Side data:
>       cpb: bitrate max/min/avg: 0/0/0 buffer size: 0 vbv_delay: -1
>     Stream #0:1: Audio: vorbis (libvorbis), 44100 Hz, stereo, fltp, 128
> kb/s
>     Metadata:
>       encoder         : Lavc57.70.100 libvorbis
> Stream mapping:
>   Stream #0:0 -> #0:0 (rawvideo (native) -> vp8 (libvpx))
>   Stream #0:1 -> #0:1 (pcm_f32le (native) -> vorbis (libvorbis))
> Press [q] to stop, [?] for help
> frame=   16 fps=1.7 q=0.0 Lsize=     998kB time=00:00:09.52 bitrate=
> 858.9kbits/s speed=1.01x
> video:993kB audio:0kB subtitle:0kB other streams:0kB global headers:4kB
> muxing overhead: 0.485425%
> Exiting normally, received signal 15.
>
> ffmpeg  -y -f avfoundation -capture_cursor 1 -framerate 25 -i 1:0 -c:v
> libvpx-vp9 -c:a libopus -crf 10 -b:v 0 -b:a 128K capture.webm
>
> *Output:*
>
> ffmpeg version N-82977-g8fd3e02-tessus Copyright (c) 2000-2016 the FFmpeg
> developers
>   built with Apple LLVM version 8.0.0 (clang-800.0.42.1)
>   configuration: --cc=/usr/bin/clang --prefix=/opt/ffmpeg
> --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. 43.100 / 55. 43.100
>   libavcodec     57. 70.100 / 57. 70.100
>   libavformat    57. 61.100 / 57. 61.100
>   libavdevice    57.  2.100 / 57.  2.100
>   libavfilter     6. 68.100 /  6. 68.100
>   libswscale      4.  3.101 /  4.  3.101
>   libswresample   2.  4.100 /  2.  4.100
>   libpostproc    54.  2.100 / 54.  2.100
> [avfoundation @ 0x7fc973800000] Selected pixel format (yuv420p) is not
> supported by the input device.
> [avfoundation @ 0x7fc973800000] Supported pixel formats:
> [avfoundation @ 0x7fc973800000]   uyvy422
> [avfoundation @ 0x7fc973800000]   yuyv422
> [avfoundation @ 0x7fc973800000]   nv12
> [avfoundation @ 0x7fc973800000]   0rgb
> [avfoundation @ 0x7fc973800000]   bgr0
> [avfoundation @ 0x7fc973800000] Overriding selected pixel format to use
> uyvy422 instead.
> [avfoundation @ 0x7fc973800000] Stream #0: not enough frames to estimate
> rate; consider increasing probesize
> Input #0, avfoundation, from '1:0':
>   Duration: N/A, start: 14060.817500, bitrate: 2822 kb/s
>     Stream #0:0: Video: rawvideo (UYVY / 0x59565955), uyvy422, 2560x1600,
> 1000k tbr, 1000k tbn, 1000k tbc
>     Stream #0:1: Audio: pcm_f32le, 44100 Hz, stereo, flt, 2822 kb/s
> [libvpx-vp9 @ 0x7fc97488ca00] v1.6.0
> Output #0, webm, to 'capture.webm':
>   Metadata:
>     encoder         : Lavf57.61.100
>     Stream #0:0: Video: vp9 (libvpx-vp9), yuv422p, 2560x1600, q=-1--1,
> 1000k fps, 1k tbn, 1000k tbc
>     Metadata:
>       encoder         : Lavc57.70.100 libvpx-vp9
>     Side data:
>       cpb: bitrate max/min/avg: 0/0/0 buffer size: 0 vbv_delay: -1
>     Stream #0:1: Audio: opus (libopus), 48000 Hz, stereo, flt, 128 kb/s
>     Metadata:
>       encoder         : Lavc57.70.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=   32 fps=3.7 q=0.0 size=       1kB time=00:00:01.65 bitrate=
> 2.6kbits/s speed=0.193x
>
>
> frame=   33 fps=1.5 q=0.0 Lsize=    1423kB time=00:00:09.08
> bitrate=1283.6kbits/s speed=0.422x
> video:1411kB audio:11kB subtitle:0kB other streams:0kB global headers:0kB
> muxing overhead: 0.079128%
> Exiting normally, received signal 15.
>
> Please I need help!
>
> Thanks!
>
>


More information about the ffmpeg-user mailing list