[FFmpeg-user] recording @ 120fps on mac fails with 'activeVideoMinFrameDuration not supported'
DopeLabs
dopelabs at dubstep.fm
Wed Nov 15 07:49:36 EET 2017
what you are seeing is from the status line during the encode... this shows you the current encoding frame rate. if its below the specified framerate, the 'speed' value at the end of that line will be less than 1.
basically your current system hardware, and current ffmpeg encoding options can not encode in 'real time'.
if you press q to stop the encode, and then use ffprobe on the file, you will notice that it encoded a 120fps file.
$ ffmpeg -y -f avfoundation -r 120 -pixel_format yuyv422 -i "1:" -s 320x240 out.avi
ffmpeg version N-86825-g99c5ac2039 Copyright (c) 2000-2017 the FFmpeg developers
built with Apple LLVM version 8.1.0 (clang-802.0.42)
configuration: --enable-shared --enable-pthreads --cc=/usr/bin/clang --enable-vda --enable-videotoolbox --arch=x86_64 --enable-yasm --enable-gpl --enable-postproc --enable-libx264 --enable-libxvid --enable-filter=coreimage --enable-filter=coreimagesrc --enable-filter=frei0r --enable-filter=frei0r_src --enable-swscale --enable-avfilter --enable-avresample --enable-libmp3lame --enable-libvorbis --enable-libopus --enable-libtheora --enable-libopenjpeg --enable-libmodplug --enable-libvpx --enable-libsoxr --enable-libspeex --enable-libass --enable-lzma --enable-gnutls --enable-fontconfig --enable-libfreetype --enable-libfribidi --enable-libx265 --enable-version3 --enable-libwavpack --enable-libssh --enable-librtmp --enable-libfdk-aac --enable-nonfree --enable-libzmq --enable-opencl --enable-ffplay --enable-libcaca
libavutil 55. 68.100 / 55. 68.100
libavcodec 57.102.100 / 57.102.100
libavformat 57. 76.100 / 57. 76.100
libavdevice 57. 7.100 / 57. 7.100
libavfilter 6. 95.100 / 6. 95.100
libavresample 3. 6. 0 / 3. 6. 0
libswscale 4. 7.101 / 4. 7.101
libswresample 2. 8.100 / 2. 8.100
libpostproc 54. 6.100 / 54. 6.100
[avfoundation @ 0x7fcd75806a00] Stream #0: not enough frames to estimate rate; consider increasing probesize
Input #0, avfoundation, from '1:':
Duration: N/A, start: 33968.230000, bitrate: N/A
Stream #0:0: Video: rawvideo (YUY2 / 0x32595559), yuyv422, 1920x1080, 1000k tbr, 1000k tbn, 1000k tbc
Stream mapping:
Stream #0:0 -> #0:0 (rawvideo (native) -> mpeg4 (native))
Press [q] to stop, [?] for help
Output #0, avi, to 'out.avi':
Metadata:
ISFT : Lavf57.76.100
Stream #0:0: Video: mpeg4 (FMP4 / 0x34504D46), yuv420p, 320x240, q=2-31, 200 kb/s, 120 fps, 120 tbn, 120 tbc
Metadata:
encoder : Lavc57.102.100 mpeg4
Side data:
cpb: bitrate max/min/avg: 0/0/200000 buffer size: 0 vbv_delay: -1
frame= 1115 fps= 90 q=31.0 Lsize= 650kB time=00:00:09.29 bitrate= 573.2kbits/s speed=0.746x
video:618kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 5.142043%
[30][09:44:53] dopelabs at jeez:~ $ ffprobe out.avi
ffprobe version N-86825-g99c5ac2039 Copyright (c) 2007-2017 the FFmpeg developers
built with Apple LLVM version 8.1.0 (clang-802.0.42)
configuration: --enable-shared --enable-pthreads --cc=/usr/bin/clang --enable-vda --enable-videotoolbox --arch=x86_64 --enable-yasm --enable-gpl --enable-postproc --enable-libx264 --enable-libxvid --enable-filter=coreimage --enable-filter=coreimagesrc --enable-filter=frei0r --enable-filter=frei0r_src --enable-swscale --enable-avfilter --enable-avresample --enable-libmp3lame --enable-libvorbis --enable-libopus --enable-libtheora --enable-libopenjpeg --enable-libmodplug --enable-libvpx --enable-libsoxr --enable-libspeex --enable-libass --enable-lzma --enable-gnutls --enable-fontconfig --enable-libfreetype --enable-libfribidi --enable-libx265 --enable-version3 --enable-libwavpack --enable-libssh --enable-librtmp --enable-libfdk-aac --enable-nonfree --enable-libzmq --enable-opencl --enable-ffplay --enable-libcaca
libavutil 55. 68.100 / 55. 68.100
libavcodec 57.102.100 / 57.102.100
libavformat 57. 76.100 / 57. 76.100
libavdevice 57. 7.100 / 57. 7.100
libavfilter 6. 95.100 / 6. 95.100
libavresample 3. 6. 0 / 3. 6. 0
libswscale 4. 7.101 / 4. 7.101
libswresample 2. 8.100 / 2. 8.100
libpostproc 54. 6.100 / 54. 6.100
Input #0, avi, from 'out.avi':
Metadata:
encoder : Lavf57.76.100
Duration: 00:00:09.29, start: 0.000000, bitrate: 573 kb/s
Stream #0:0: Video: mpeg4 (Simple Profile) (FMP4 / 0x34504D46), yuv420p, 320x240 [SAR 1:1 DAR 4:3], 545 kb/s, 120 fps, 120 tbr, 120 tbn, 120 tbc
> On Nov 14, 2017, at 7:58 03PM, Roman Puttkammer <rputtkammer at gmail.com> wrote:
>
> I did run into another issue; though the frame rate 320/240 @ 120fps is set
> successfully, ffmpeg reports only 30+ fps later on. (It starts off at 50,
> then drops down to 30+ shortly thereafter.) This seems less straightforward
> - unless I'm not using the command line options right (or am
> misunderstanding how the frame rate works.)
>
> See the third before the last line below - "frame= 220 fps= 37 ..."
>
> Any suggestions?
>
>
> *Romans-MBP:ffmpeg putt$ ffmpeg/ffmpeg -y -f avfoundation -video_size
> 320x240 -r 120.101366 -pixel_format uyvy422 -i "0:none" out.avi*
> ffmpeg version N-89047-g54f8ac199f Copyright (c) 2000-2017 the FFmpeg
> developers
> built with Apple LLVM version 9.0.0 (clang-900.0.38)
> configuration: --prefix=/usr/local --enable-gpl --enable-nonfree
> --enable-libfdk-aac --enable-libfreetype --enable-libmp3lame
> --enable-libtheora --enable-libvorbis --enable-libvpx --enable-libx264
> --enable-libx265 --enable-libopus --enable-libxvid
> libavutil 56. 0.100 / 56. 0.100
> libavcodec 58. 3.101 / 58. 3.101
> libavformat 58. 2.100 / 58. 2.100
> libavdevice 58. 0.100 / 58. 0.100
> libavfilter 7. 0.101 / 7. 0.101
> libswscale 5. 0.101 / 5. 0.101
> libswresample 3. 0.101 / 3. 0.101
> libpostproc 55. 0.100 / 55. 0.100
> Input #0, avfoundation, from '0:none':
> Duration: N/A, start: 12615.043733, bitrate: N/A
> Stream #0:0: Video: rawvideo (UYVY / 0x59565955), uyvy422, 320x240, 33
> tbr, 1000k tbn, 1000k tbc
> Stream mapping:
> Stream #0:0 -> #0:0 (rawvideo (native) -> mpeg4 (native))
> Press [q] to stop, [?] for help
> Output #0, avi, to 'out.avi':
> Metadata:
> ISFT : Lavf58.2.100
> Stream #0:0: Video: mpeg4 (FMP4 / 0x34504D46), yuv420p, 320x240,
> q=2-31, 200 kb/s, 120.10 fps, 120.10 tbn, 120.10 tbc
> Metadata:
> encoder : Lavc58.3.101 mpeg4
> Side data:
> cpb: bitrate max/min/avg: 0/0/200000 buffer size: 0 vbv_delay: -1
> *frame= 220 fps= 37 q=19.6 Lsize= 112kB time=00:00:01.83 bitrate=
> 499.0kbits/s speed=0.305x *
> video:101kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB
> muxing overhead: 10.726502%
> Exiting normally, received signal 2.
>
>
> On Tue, Nov 14, 2017 at 9:18 PM Roman Puttkammer <rputtkammer at gmail.com>
> wrote:
>
>> Never mind, found the issue. The code in avfoundation.m breaks out of one
>> loop only instead of two. I'll submit a patch.
>>
>>
>> On Tue, Nov 14, 2017 at 9:03 PM Roman Puttkammer <rputtkammer at gmail.com>
>> wrote:
>>
>>> Carl - thanks, I tried that now. Same thing happens.
>>>
>>> I found this link that seems to describe a similar problem,
>>> https://github.com/piemonte/PBJVision/issues/127, but that's for the
>>> iOS; that said, could it be also related to the order in which the
>>> format/frame rate or other properties are set?
>>>
>>> I'll look at the code but I'm a newbie with ffmpeg and video capture.
>>> Any/all pointers really appreciated.
>>>
>>>
>>> ### Version - compiled as per
>>> https://trac.ffmpeg.org/wiki/CompilationGuide/macOS but without libass
>>> ###
>>> Romans-MBP:ffmpeg putt$ ffmpeg/ffmpeg -h
>>> ffmpeg version N-89047-g54f8ac199f Copyright (c) 2000-2017 the FFmpeg
>>> developers
>>> built with Apple LLVM version 9.0.0 (clang-900.0.38)
>>> configuration: --prefix=/usr/local --enable-gpl --enable-nonfree
>>> --enable-libfdk-aac --enable-libfreetype --enable-libmp3lame
>>> --enable-libtheora --enable-libvorbis --enable-libvpx --enable-libx264
>>> --enable-libx265 --enable-libopus --enable-libxvid
>>> libavutil 56. 0.100 / 56. 0.100
>>> libavcodec 58. 3.101 / 58. 3.101
>>> libavformat 58. 2.100 / 58. 2.100
>>> libavdevice 58. 0.100 / 58. 0.100
>>> libavfilter 7. 0.101 / 7. 0.101
>>> libswscale 5. 0.101 / 5. 0.101
>>> libswresample 3. 0.101 / 3. 0.101
>>> libpostproc 55. 0.100 / 55. 0.100
>>>
>>> ### FAIL: framerate 120.101366
>>> ###
>>> Romans-MBP:ffmpeg putt$ ffmpeg/ffmpeg -f avfoundation -video_size 320x240
>>> -framerate 120.101366 -pixel_format uyvy422 -i "0:none" out.avi
>>> ffmpeg version N-89047-g54f8ac199f Copyright (c) 2000-2017 the FFmpeg
>>> developers
>>> built with Apple LLVM version 9.0.0 (clang-900.0.38)
>>> configuration: --prefix=/usr/local --enable-gpl --enable-nonfree
>>> --enable-libfdk-aac --enable-libfreetype --enable-libmp3lame
>>> --enable-libtheora --enable-libvorbis --enable-libvpx --enable-libx264
>>> --enable-libx265 --enable-libopus --enable-libxvid
>>> libavutil 56. 0.100 / 56. 0.100
>>> libavcodec 58. 3.101 / 58. 3.101
>>> libavformat 58. 2.100 / 58. 2.100
>>> libavdevice 58. 0.100 / 58. 0.100
>>> libavfilter 7. 0.101 / 7. 0.101
>>> libswscale 5. 0.101 / 5. 0.101
>>> libswresample 3. 0.101 / 3. 0.101
>>> libpostproc 55. 0.100 / 55. 0.100
>>> [avfoundation @ 0x7fc399003400] An error occurred: The
>>> activeVideoMinFrameDuration passed is not supported by the device. Use
>>> -activeFormat.videoSupportedFrameRateRanges to discover valid
>>> ranges.0:none: Input/output error
>>>
>>> ### Fail: framerate 120
>>> ###
>>> Romans-MBP:ffmpeg putt$ ffmpeg/ffmpeg -f avfoundation -video_size 320x240
>>> -framerate 120 -pixel_format uyvy422 -i "0:none" out.avi
>>> ffmpeg version N-89047-g54f8ac199f Copyright (c) 2000-2017 the FFmpeg
>>> developers
>>> built with Apple LLVM version 9.0.0 (clang-900.0.38)
>>> configuration: --prefix=/usr/local --enable-gpl --enable-nonfree
>>> --enable-libfdk-aac --enable-libfreetype --enable-libmp3lame
>>> --enable-libtheora --enable-libvorbis --enable-libvpx --enable-libx264
>>> --enable-libx265 --enable-libopus --enable-libxvid
>>> libavutil 56. 0.100 / 56. 0.100
>>> libavcodec 58. 3.101 / 58. 3.101
>>> libavformat 58. 2.100 / 58. 2.100
>>> libavdevice 58. 0.100 / 58. 0.100
>>> libavfilter 7. 0.101 / 7. 0.101
>>> libswscale 5. 0.101 / 5. 0.101
>>> libswresample 3. 0.101 / 3. 0.101
>>> libpostproc 55. 0.100 / 55. 0.100
>>> [avfoundation @ 0x7fd85b803400] Selected framerate (120.000000) is not
>>> supported by the device
>>> [avfoundation @ 0x7fd85b803400] Supported modes:
>>> [avfoundation @ 0x7fd85b803400] 320x240@[120.101366 120.101366]fps
>>> [avfoundation @ 0x7fd85b803400] 640x480@[120.101366 120.101366]fps
>>> [avfoundation @ 0x7fd85b803400] 800x600@[60.000240 60.000240]fps
>>> [avfoundation @ 0x7fd85b803400] 1024x768@[30.000030 30.000030]fps
>>> [avfoundation @ 0x7fd85b803400] 1280x720@[60.000240 60.000240]fps
>>> [avfoundation @ 0x7fd85b803400] 1280x1024@[30.000030 30.000030]fps
>>> [avfoundation @ 0x7fd85b803400] 1920x1080@[30.000030 30.000030]fps
>>> [avfoundation @ 0x7fd85b803400] 320x240@[30.000030 30.000030]fps
>>> [avfoundation @ 0x7fd85b803400] 640x480@[30.000030 30.000030]fps
>>> [avfoundation @ 0x7fd85b803400] 800x600@[20.000000 20.000000]fps
>>> [avfoundation @ 0x7fd85b803400] 1024x768@[6.000002 6.000002]fps
>>> 0:none: Input/output error
>>>
>>>
>>> On Tue, Nov 14, 2017 at 12:11 PM Carl Eugen Hoyos <ceffmpeg at gmail.com>
>>> wrote:
>>>
>>>> 2017-11-14 4:54 GMT+01:00 Roman Puttkammer <rputtkammer at gmail.com>:
>>>>
>>>>> ffmpeg version 3.4 Copyright (c) 2000-2017 the FFmpeg developers
>>>>
>>>> Please test current FFmpeg git head.
>>>>
>>>> Carl Eugen
>>>> _______________________________________________
>>>> ffmpeg-user mailing list
>>>> ffmpeg-user at ffmpeg.org
>>>> http://ffmpeg.org/mailman/listinfo/ffmpeg-user
>>>>
>>>> To unsubscribe, visit link above, or email
>>>> ffmpeg-user-request at ffmpeg.org with subject "unsubscribe".
>>>
>>>
> _______________________________________________
> ffmpeg-user mailing list
> ffmpeg-user at ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/ffmpeg-user
>
> To unsubscribe, visit link above, or email
> ffmpeg-user-request at ffmpeg.org with subject "unsubscribe".
More information about the ffmpeg-user
mailing list