[FFmpeg-user] ffmpeg - avfoundation Audio stutters / sounds broken with screen capture [sample, config, output included]
kevin
kevincastiglione at gmail.com
Mon Apr 27 03:08:18 CEST 2015
On Sun, Apr 26, 2015 at 2:04 PM, Carl Eugen Hoyos <cehoyos at ag.or.at> wrote:
> kevin <kevincastiglione <at> gmail.com> writes:
>
> > ffmpeg -f avfoundation -i "1:0" -r 25 -c:v mpeg4
> > -c:a libfdk_aac -b:a 128k -ar 44100 screen-default-mpeg4-fdk-aac.mp4
> > ffmpeg version 2.6.1 Copyright (c) 2000-2015 the FFmpeg developers
>
> Please test current FFmpeg git head with "framerate" and
> please test if a smaller framerate makes a difference.
>
> While at it, please use "-acodec aac -strict -2" if it
> allows to reproduce the issue.
>
I tried 3 framerates: 30, 25, and 15. All three have the same problem.
Here are the commands and the corresponding files produced. The complete
output is at the end of this email. Please let me know if I should try any
other command or with other options.
framerate: 30
./ffmpeg -f avfoundation -video_size 640x480 -framerate 30 -i "1:0" -c:v
mpeg4 -c:a aac -strict -2 -r 30 ffmpeg-git-head-30.mp4
https://www.dropbox.com/s/hf6zqxwq7y394yd/ffmpeg-git-head-30.mp4?dl=1
framerate:25
./ffmpeg -f avfoundation -video_size 640x480 -framerate 25 -i "1:0" -c:v
mpeg4 -c:a aac -strict -2 -r 25 ffmpeg-git-head-25.mp4
https://www.dropbox.com/s/k1ijq5zyzfqgewf/ffmpeg-git-head-25.mp4?dl=1
framerate:15
./ffmpeg -f avfoundation -video_size 640x480 -framerate 15 -i "1:0" -c:v
mpeg4 -c:a aac -strict -2 -r 15 ffmpeg-git-head-15.mp4
https://www.dropbox.com/s/0zptd9e8alvf050/ffmpeg-git-head-15.mp4?dl=1
Is -ar 44100 needed to reproduce the issue? If not,
> please remove it.
>
Removed this option. And still the same problem.
Hardware info: MacBook Air (13-inch, Late 2010)
Processor: 2.13 GHz Intel Core 2 Duo
Memory: 4 GB 1067 MHz DDR3
FFmpeg output:
Framerate 30:
./ffmpeg -f avfoundation -video_size 640x480 -framerate 30 -i "1:0" -c:v
mpeg4 -c:a aac -strict -2 -r 30 ffmpeg-git-head-30.mp4
ffmpeg version N-71716-g7b94a2f-HootScreenCapture 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=/Users/live/src/github/ffmpeg-static/target
--arch=x86_64 --as=yasm --extra-version=HootScreenCapture --disable-shared
--enable-static --enable-gpl --enable-nonfree --enable-pthreads
--enable-postproc --enable-libmp3lame --enable-libx264 --enable-bzlib
--enable-zlib --enable-version3 --enable-libfdk-aac --enable-filters
--enable-runtime-cpudetect --disable-sdl --enable-nonfree
--enable-libfdk-aac
libavutil 54. 23.101 / 54. 23.101
libavcodec 56. 35.101 / 56. 35.101
libavformat 56. 31.100 / 56. 31.100
libavdevice 56. 4.100 / 56. 4.100
libavfilter 5. 14.100 / 5. 14.100
libswscale 3. 1.101 / 3. 1.101
libswresample 1. 1.100 / 1. 1.100
libpostproc 53. 3.100 / 53. 3.100
[avfoundation @ 0x7fb21980da00] Selected pixel format (yuv420p) is not
supported by the input device.
[avfoundation @ 0x7fb21980da00] Supported pixel formats:
[avfoundation @ 0x7fb21980da00] uyvy422
[avfoundation @ 0x7fb21980da00] yuyv422
[avfoundation @ 0x7fb21980da00] nv12
[avfoundation @ 0x7fb21980da00] 0rgb
[avfoundation @ 0x7fb21980da00] bgr0
[avfoundation @ 0x7fb21980da00] Overriding selected pixel format to use
uyvy422 instead.
[avfoundation @ 0x7fb21980da00] Stream #0: not enough frames to estimate
rate; consider increasing probesize
Input #0, avfoundation, from '1:0':
Duration: N/A, start: 11862.478333, bitrate: N/A
Stream #0:0: Video: rawvideo (UYVY / 0x59565955), uyvy422, 1440x900,
1000k tbr, 1000k tbn, 1000k tbc
Stream #0:1: Audio: pcm_f32le, 44100 Hz, stereo, flt, 2822 kb/s
Output #0, mp4, to 'ffmpeg-git-head-30.mp4':
Metadata:
encoder : Lavf56.31.100
Stream #0:0: Video: mpeg4 ( [0][0][0] / 0x0020), yuv420p, 1440x900,
q=2-31, 200 kb/s, 30 fps, 15360 tbn, 30 tbc
Metadata:
encoder : Lavc56.35.101 mpeg4
Stream #0:1: Audio: aac ([64][0][0][0] / 0x0040), 44100 Hz, stereo,
fltp, 128 kb/s
Metadata:
encoder : Lavc56.35.101 aac
Stream mapping:
Stream #0:0 -> #0:0 (rawvideo (native) -> mpeg4 (native))
Stream #0:1 -> #0:1 (pcm_f32le (native) -> aac (native))
Press [q] to stop, [?] for help
frame= 270 fps= 30 q=31.0 Lsize= 2030kB time=00:00:09.06
bitrate=1835.8kbits/s
video:1922kB audio:100kB subtitle:0kB other streams:0kB global headers:0kB
muxing overhead: 0.403519%
Framerate:25
./ffmpeg -f avfoundation -video_size 640x480 -framerate 25 -i "1:0" -c:v
mpeg4 -c:a aac -strict -2 -r 25 ffmpeg-git-head-25.mp4
ffmpeg version N-71716-g7b94a2f-HootScreenCapture 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=/Users/live/src/github/ffmpeg-static/target
--arch=x86_64 --as=yasm --extra-version=HootScreenCapture --disable-shared
--enable-static --enable-gpl --enable-nonfree --enable-pthreads
--enable-postproc --enable-libmp3lame --enable-libx264 --enable-bzlib
--enable-zlib --enable-version3 --enable-libfdk-aac --enable-filters
--enable-runtime-cpudetect --disable-sdl --enable-nonfree
--enable-libfdk-aac
libavutil 54. 23.101 / 54. 23.101
libavcodec 56. 35.101 / 56. 35.101
libavformat 56. 31.100 / 56. 31.100
libavdevice 56. 4.100 / 56. 4.100
libavfilter 5. 14.100 / 5. 14.100
libswscale 3. 1.101 / 3. 1.101
libswresample 1. 1.100 / 1. 1.100
libpostproc 53. 3.100 / 53. 3.100
[avfoundation @ 0x7fcfe181bc00] Selected pixel format (yuv420p) is not
supported by the input device.
[avfoundation @ 0x7fcfe181bc00] Supported pixel formats:
[avfoundation @ 0x7fcfe181bc00] uyvy422
[avfoundation @ 0x7fcfe181bc00] yuyv422
[avfoundation @ 0x7fcfe181bc00] nv12
[avfoundation @ 0x7fcfe181bc00] 0rgb
[avfoundation @ 0x7fcfe181bc00] bgr0
[avfoundation @ 0x7fcfe181bc00] Overriding selected pixel format to use
uyvy422 instead.
[avfoundation @ 0x7fcfe181bc00] Stream #0: not enough frames to estimate
rate; consider increasing probesize
Input #0, avfoundation, from '1:0':
Duration: N/A, start: 11911.471833, bitrate: N/A
Stream #0:0: Video: rawvideo (UYVY / 0x59565955), uyvy422, 1440x900,
1000k tbr, 1000k tbn, 1000k tbc
Stream #0:1: Audio: pcm_f32le, 44100 Hz, stereo, flt, 2822 kb/s
Output #0, mp4, to 'ffmpeg-git-head-25.mp4':
Metadata:
encoder : Lavf56.31.100
Stream #0:0: Video: mpeg4 ( [0][0][0] / 0x0020), yuv420p, 1440x900,
q=2-31, 200 kb/s, 25 fps, 12800 tbn, 25 tbc
Metadata:
encoder : Lavc56.35.101 mpeg4
Stream #0:1: Audio: aac ([64][0][0][0] / 0x0040), 44100 Hz, stereo,
fltp, 128 kb/s
Metadata:
encoder : Lavc56.35.101 aac
Stream mapping:
Stream #0:0 -> #0:0 (rawvideo (native) -> mpeg4 (native))
Stream #0:1 -> #0:1 (pcm_f32le (native) -> aac (native))
Press [q] to stop, [?] for help
frame= 232 fps= 25 q=31.0 Lsize= 1848kB time=00:00:09.31
bitrate=1625.5kbits/s
video:1730kB audio:110kB subtitle:0kB other streams:0kB global headers:0kB
muxing overhead: 0.445773%
Framerate:15
./ffmpeg -f avfoundation -video_size 640x480 -framerate 15 -i "1:0" -c:v
mpeg4 -c:a aac -strict -2 -r 15 ffmpeg-git-head-15.mp4
ffmpeg version N-71716-g7b94a2f-HootScreenCapture 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=/Users/live/src/github/ffmpeg-static/target
--arch=x86_64 --as=yasm --extra-version=HootScreenCapture --disable-shared
--enable-static --enable-gpl --enable-nonfree --enable-pthreads
--enable-postproc --enable-libmp3lame --enable-libx264 --enable-bzlib
--enable-zlib --enable-version3 --enable-libfdk-aac --enable-filters
--enable-runtime-cpudetect --disable-sdl --enable-nonfree
--enable-libfdk-aac
libavutil 54. 23.101 / 54. 23.101
libavcodec 56. 35.101 / 56. 35.101
libavformat 56. 31.100 / 56. 31.100
libavdevice 56. 4.100 / 56. 4.100
libavfilter 5. 14.100 / 5. 14.100
libswscale 3. 1.101 / 3. 1.101
libswresample 1. 1.100 / 1. 1.100
libpostproc 53. 3.100 / 53. 3.100
[avfoundation @ 0x7f8172009600] Selected pixel format (yuv420p) is not
supported by the input device.
[avfoundation @ 0x7f8172009600] Supported pixel formats:
[avfoundation @ 0x7f8172009600] uyvy422
[avfoundation @ 0x7f8172009600] yuyv422
[avfoundation @ 0x7f8172009600] nv12
[avfoundation @ 0x7f8172009600] 0rgb
[avfoundation @ 0x7f8172009600] bgr0
[avfoundation @ 0x7f8172009600] Overriding selected pixel format to use
uyvy422 instead.
[avfoundation @ 0x7f8172009600] Stream #0: not enough frames to estimate
rate; consider increasing probesize
Input #0, avfoundation, from '1:0':
Duration: N/A, start: 11987.682500, bitrate: N/A
Stream #0:0: Video: rawvideo (UYVY / 0x59565955), uyvy422, 1440x900,
1000k tbr, 1000k tbn, 1000k tbc
Stream #0:1: Audio: pcm_f32le, 44100 Hz, stereo, flt, 2822 kb/s
Output #0, mp4, to 'ffmpeg-git-head-15.mp4':
Metadata:
encoder : Lavf56.31.100
Stream #0:0: Video: mpeg4 ( [0][0][0] / 0x0020), yuv420p, 1440x900,
q=2-31, 200 kb/s, 15 fps, 15360 tbn, 15 tbc
Metadata:
encoder : Lavc56.35.101 mpeg4
Stream #0:1: Audio: aac ([64][0][0][0] / 0x0040), 44100 Hz, stereo,
fltp, 128 kb/s
Metadata:
encoder : Lavc56.35.101 aac
Stream mapping:
Stream #0:0 -> #0:0 (rawvideo (native) -> mpeg4 (native))
Stream #0:1 -> #0:1 (pcm_f32le (native) -> aac (native))
Press [q] to stop, [?] for help
frame= 118 fps= 15 q=31.0 Lsize= 1188kB time=00:00:07.86
bitrate=1237.2kbits/s
video:1076kB audio:106kB subtitle:0kB other streams:0kB global headers:0kB
muxing overhead: 0.533504%
More information about the ffmpeg-user
mailing list