#10885: Encoding with hevc_videotoolbox (hardware) using Mac OS Sonoma 14.3.1 
on M1
fails with error
-------------------------------------+-------------------------------------
             Reporter:  D Holo       |                     Type:  defect
               Status:  new          |                 Priority:  normal
            Component:               |                  Version:  6.1
  undetermined                       |
             Keywords:               |               Blocked By:
  hevc_videotoolbox                  |
             Blocking:               |  Reproduced by developer:  0
Analyzed by developer:  0            |
-------------------------------------+-------------------------------------
 hevc_videotoolbox encoding fails after update to Mac OS Sonoma on Apple M1
 hardware.

 The same ffmpeg binary worked on previous Mac OS, for example on Venture
 or Big Sur.

 Below are two logs.

 The first log shows it failing on Sonoma and the second log working on
 Macs OS Big Sur.

 I've used the latest and greatest static build
 (N-113723-g80131321c4-tessus) for the purposes of demonstrating.

 The input and output file can be substituted as required as it does not
 appear to be related to the media.

 The error given is "error: cannot create compression session: -12908**"

 Thank-You very much.

 **
 LOG FROM SONOMA MAC OS 14.3.1**

 ./ffmpeg -I "input.mov" -c:v hevc_videotoolbox -profile:v main10 -pix_fmt
 p010le -c:a aac -ac 2 -b:a 64k -profile:a aac_low -b:v 2M -vf
 "scale=1280:720" "output.mp4"


 ffmpeg version N-113723-g80131321c4-tessus  https://evermeet.cx/ffmpeg/
 Copyright (c) 2000-2024 the FFmpeg developers
   built with Apple clang version 15.0.0 (clang-1500.1.0.2.5)
   configuration: --cc=/usr/bin/clang --prefix=/opt/ffmpeg --extra-
 version=tessus --enable-avisynth --enable-fontconfig --enable-gpl
 --enable-libaom --enable-libass --enable-libbluray --enable-libdav1d
 --enable-libfreetype --enable-libgsm --enable-libmodplug --enable-
 libmp3lame --enable-libmysofa --enable-libopencore-amrnb --enable-
 libopencore-amrwb --enable-libopenh264 --enable-libopenjpeg --enable-
 libopus --enable-librubberband --enable-libshine --enable-libsnappy
 --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libtwolame
 --enable-libvidstab --enable-libvmaf --enable-libvo-amrwbenc --enable-
 libvorbis --enable-libvpx --enable-libwebp --enable-libx264 --enable-
 libx265 --enable-libxavs --enable-libxml2 --enable-libxvid --enable-
 libzimg --enable-libzmq --enable-libzvbi --enable-version3 --pkg-config-
 flags=--static --disable-ffplay
   libavutil      58. 39.100 / 58. 39.100
   libavcodec     60. 39.101 / 60. 39.101
   libavformat    60. 21.101 / 60. 21.101
   libavdevice    60.  4.100 / 60.  4.100
   libavfilter     9. 17.100 /  9. 17.100
   libswscale      7.  6.100 /  7.  6.100
   libswresample   4. 13.100 /  4. 13.100
   libpostproc    57.  4.100 / 57.  4.100
 [aist#0:1/pcm_s16le @ 0x7f9beb707100] Guessed Channel Layout: stereo
 Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'input.mov':
   Metadata:
     major_brand     : qt
     minor_version   : 537199360
     compatible_brands: qt ?
     creation_time   : 2021-11-29T13:57:01.000000Z
   Duration: 00:00:02.00, start: 0.000000, bitrate: 213133 kb/s
   Stream #0:0[0x1](eng): Video: prores (HQ) (apch / 0x68637061),
 yuv422p10le(bt709, progressive), 1920x1080, 189441 kb/s, SAR 1:1 DAR 16:9,
 24 fps, 24 tbr, 2400 tbn (default)
       Metadata:
         creation_time   : 2021-11-29T13:57:01.000000Z
         handler_name    : Video Media Handler
         vendor_id       : appl
         encoder         : Apple ProRes 422 HQ
         timecode        : 00:00:00:00
   Stream #0:1[0x2](eng): Audio: pcm_s16le (sowt / 0x74776F73), 48000 Hz,
 stereo, s16, 1536 kb/s (default)
       Metadata:
         creation_time   : 2021-11-29T13:57:01.000000Z
         handler_name    : Sound Media Handler
         vendor_id       : [0][0][0][0]
   Stream #0:2[0x3](eng): Data: none (tmcd / 0x64636D74), 0 kb/s (default)
       Metadata:
         creation_time   : 2021-11-29T13:57:01.000000Z
         handler_name    : Time Code Media Handler
         timecode        : 00:00:00:00
 File 'output.mp4' already exists. Overwrite? [y/N] y
 Stream mapping:
   Stream #0:0 -> #0:0 (prores (native) -> hevc (hevc_videotoolbox))
   Stream #0:1 -> #0:1 (pcm_s16le (native) -> aac (native))
 Press [q] to stop, [?] for help
 **[hevc_videotoolbox @ 0x7f9beb7085c0] Error: cannot create compression
 session: -12908**
 [hevc_videotoolbox @ 0x7f9beb7085c0] Try -allow_sw 1. The hardware encoder
 may be busy, or not supported.
 [vost#0:0/hevc_videotoolbox @ 0x7f9beb708140] Error while opening encoder
 - maybe incorrect parameters such as bit_rate, rate, width or height.
 [vf#0:0 @ 0x7f9beb708e80] Error sending frames to consumers: Generic error
 in an external library
 [vf#0:0 @ 0x7f9beb708e80] Task finished with error code: -542398533
 (Generic error in an external library)
 [vf#0:0 @ 0x7f9beb708e80] Terminating thread with return code -542398533
 (Generic error in an external library)
 [vost#0:0/hevc_videotoolbox @ 0x7f9beb708140] Could not open encoder
 before EOF
 [vost#0:0/hevc_videotoolbox @ 0x7f9beb708140] Task finished with error
 code: -22 (Invalid argument)
 [vost#0:0/hevc_videotoolbox @ 0x7f9beb708140] Terminating thread with
 return code -22 (Invalid argument)
 [out#0/mp4 @ 0x7f9beb706e80] Nothing was written into output file, because
 at least one of its streams received no packets.

 **LOG FROM BIG SUR MAC OS 11.3**

 ./ffmpeg -I "input.mov" -c:v hevc_videotoolbox -profile:v main10 -pix_fmt
 p010le -c:a aac -ac 2 -b:a 64k -profile:a aac_low -b:v 2M -vf
 "scale=1280:720" "output.mp4"


 ffmpeg version N-113723-g80131321c4-tessus https://evermeet.cx/ffmpeg/
 Copyright (c) 2000-2024 the FFmpeg developers
  built with Apple clang version 15.0.0 (clang-1500.1.0.2.5)
  configuration: --cc=/usr/bin/clang --prefix=/opt/ffmpeg --extra-
 version=tessus --enable-avisynth --enable-fontconfig --enable-gpl
 --enable-libaom --enable-libass --enable-libbluray --enable-libdav1d
 --enable-libfreetype --enable-libgsm --enable-libmodplug --enable-
 libmp3lame --enable-libmysofa --enable-libopencore-amrnb --enable-
 libopencore-amrwb --enable-libopenh264 --enable-libopenjpeg --enable-
 libopus --enable-librubberband --enable-libshine --enable-libsnappy
 --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libtwolame
 --enable-libvidstab --enable-libvmaf --enable-libvo-amrwbenc --enable-
 libvorbis --enable-libvpx --enable-libwebp --enable-libx264 --enable-
 libx265 --enable-libxavs --enable-libxml2 --enable-libxvid --enable-
 libzimg --enable-libzmq --enable-libzvbi --enable-version3 --pkg-config-
 flags=--static --disable-ffplay
  libavutil   58. 39.100 / 58. 39.100
  libavcodec   60. 39.101 / 60. 39.101
  libavformat  60. 21.101 / 60. 21.101
  libavdevice  60. 4.100 / 60. 4.100
  libavfilter   9. 17.100 / 9. 17.100
  libswscale   7. 6.100 / 7. 6.100
  libswresample  4. 13.100 / 4. 13.100
  libpostproc  57. 4.100 / 57. 4.100
 [aist#0:1/pcm_s16le @ 0x7fa7c8410b40] Guessed Channel Layout: stereo
 Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'input.mov':
  Metadata:
   major_brand   : qt
   minor_version  : 537199360
   compatible_brands: qt ?
   creation_time  : 2021-11-29T13:57:01.000000Z
  Duration: 00:00:02.00, start: 0.000000, bitrate: 213133 kb/s
  Stream #0:0[0x1](eng): Video: prores (HQ) (apch / 0x68637061),
 yuv422p10le(bt709, progressive), 1920x1080, 189441 kb/s, SAR 1:1 DAR 16:9,
 24 fps, 24 tbr, 2400 tbn (default)
    Metadata:
     creation_time  : 2021-11-29T13:57:01.000000Z
     handler_name  : Video Media Handler
     vendor_id    : appl
     encoder     : Apple ProRes 422 HQ
     timecode    : 00:00:00:00
  Stream #0:1[0x2](eng): Audio: pcm_s16le (sowt / 0x74776F73), 48000 Hz,
 stereo, s16, 1536 kb/s (default)
    Metadata:
     creation_time  : 2021-11-29T13:57:01.000000Z
     handler_name  : Sound Media Handler
     vendor_id    : [0][0][0][0]
  Stream #0:2[0x3](eng): Data: none (tmcd / 0x64636D74), 0 kb/s (default)
    Metadata:
     creation_time  : 2021-11-29T13:57:01.000000Z
     handler_name  : Time Code Media Handler
     timecode    : 00:00:00:00
 Stream mapping:
  Stream #0:0 -> #0:0 (prores (native) -> hevc (hevc_videotoolbox))
  Stream #0:1 -> #0:1 (pcm_s16le (native) -> aac (native))
 Press [q] to stop, [?] for help
 [hevc_videotoolbox @ 0x7fa7c8412480] This device does not support the qmin
 option. Value ignored.
 [hevc_videotoolbox @ 0x7fa7c8412480] This device does not support the qmax
 option. Value ignored.
 [hevc_videotoolbox @ 0x7fa7c8412480] This device does not support the qmin
 option. Value ignored.
 [hevc_videotoolbox @ 0x7fa7c8412480] This device does not support the qmax
 option. Value ignored.
 Output #0, mp4, to 'output.mp4':
  Metadata:
   major_brand   : qt
   minor_version  : 537199360
   compatible_brands: qt ?
   encoder     : Lavf60.21.101
  Stream #0:0(eng): Video: hevc (hev1 / 0x31766568), p010le(tv, bt709,
 progressive), 1280x720 [SAR 1:1 DAR 16:9], q=2-31, 2000 kb/s, 24 fps,
 12288 tbn (default)
    Metadata:
     creation_time  : 2021-11-29T13:57:01.000000Z
     handler_name  : Video Media Handler
     vendor_id    : appl
     timecode    : 00:00:00:00
     encoder     : Lavc60.39.101 hevc_videotoolbox
  Stream #0:1(eng): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo,
 fltp, 64 kb/s (default)
    Metadata:
     creation_time  : 2021-11-29T13:57:01.000000Z
     handler_name  : Sound Media Handler
     vendor_id    : [0][0][0][0]
     encoder     : Lavc60.39.101 aac
 frame=  22 fps=0.0 q=-0.0 size=    0KiB time=00:00:00.87 bitrate=
 0.4kbits[out#0/mp4 @ 0x7fa7c840f740] video:277KiB audio:16KiB
 subtitle:0KiB other streams:0KiB global headers:0KiB muxing overhead:
 1.005124%
 frame=  48 fps=0.0 q=-0.0 Lsize=   296KiB time=00:00:01.95
 bitrate=1238.5kbits/s speed=3.15x
 [aac @ 0x7fa7c8606200] Qavg: 236.350
-- 
Ticket URL: <https://trac.ffmpeg.org/ticket/10885>
FFmpeg <https://ffmpeg.org>
FFmpeg issue tracker
_______________________________________________
FFmpeg-trac mailing list
FFmpeg-trac@avcodec.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-trac

To unsubscribe, visit link above, or email
ffmpeg-trac-requ...@ffmpeg.org with subject "unsubscribe".

Reply via email to