MacOS update broke h264_videotoolbox export

What is your operating system?
MacOS 15.0 Sequoia

What is your Shotcut version (see Help > About Shotcut)?
Shotcut 24.09.13

Can you repeat the problem? If so, what are the steps?
Export using Codec h264_videotoolbox fails every time after updating MacOS to version 15.0 on my M1 Macbook Pro. This was working perfectly prior to the OS update. Is this an issue that Apple needs to address in their OS or is there an adjustment that can be made in Shotcut?

Export using hevc_videotoolbox or no hardware encoder (very slow) still works.

Reboot, reinstall of Shotcut, and changing various export parameters have not made a difference. A video file is created, but it’s less than a second and a couple hundred KB in size. It looks like maybe the first frame of the video. Shotcut shows the job ‘failed’.

Error log:
[matroska,webm @ 0x123f318d0] parser not found for codec utvideo, packets or times may be invalid.
[matroska,webm @ 0x123f318d0] parser not found for codec pcm_f32le, packets or times may be invalid.
[matroska,webm @ 0x123f318d0] parser not found for codec utvideo, packets or times may be invalid.
[matroska,webm @ 0x123f318d0] parser not found for codec pcm_f32le, packets or times may be invalid.
[matroska,webm @ 0x123f328c0] parser not found for codec utvideo, packets or times may be invalid.
[matroska,webm @ 0x123f328c0] parser not found for codec pcm_f32le, packets or times may be invalid.
[matroska,webm @ 0x123f328c0] parser not found for codec utvideo, packets or times may be invalid.
[matroska,webm @ 0x123f328c0] parser not found for codec pcm_f32le, packets or times may be invalid.
[matroska,webm @ 0x145917470] parser not found for codec utvideo, packets or times may be invalid.
[matroska,webm @ 0x145917470] parser not found for codec pcm_f32le, packets or times may be invalid.
[matroska,webm @ 0x145917470] parser not found for codec utvideo, packets or times may be invalid.
[matroska,webm @ 0x145917470] parser not found for codec pcm_f32le, packets or times may be invalid.
[producer avformat] audio: total_streams 1 max_stream 1 total_channels 2 max_channels 2
[AVIOContext @ 0x123f31b30] Statistics: 789378 bytes read, 3 seeks
[chain avformat-novalidate] /Users/[redacted]/Downloads/IMG_0021 - Converted.mkv
checking VFR: pkt.duration 33
[link swresample] 2(independent) f32le 44100Hz → 2(stereo) f32le 48000Hz
[h264_videotoolbox @ 0x145911560] Color range not set for nv12. Using MPEG range.
[mp4 @ 0x145910f90] pts (1001) < dts (2002) in stream 0
[consumer avformat] error writing video frame: -22
[mp4 @ 0x145910f90] Starting second pass: moving the moov atom to the beginning of the file
[AVIOContext @ 0x1459177f0] Statistics: 285262 bytes read, 0 seeks
[aac @ 0x145911c30] Qavg: 64896.324
[aac @ 0x145911c30] 2 frames left in the queue on closing
[AVIOContext @ 0x143fffea0] Statistics: 572008 bytes written, 4 seeks, 7 writeouts

[AVIOContext @ 0x1459176d0] Statistics: 28679205 bytes read, 0 seeks
[AVIOContext @ 0x123f32e30] Statistics: 52169812 bytes read, 3 seeks
Failed with exit code 1

Thank you,

-L

It is working OK for me on M1 Mac Mini with macOS 12.7 and Intel MacBook with macOS 14.6. I am not going to upgrade either to macOS 15 yet. I guess this is the problem:

[consumer avformat] error writing video frame: -22

This is related to writing the file deep within the FFmpeg libraries. It basically means the library tried some invalid operation on the file. There could be all sorts of reasons.

I doubt the new Shotcut version has anything to do with it. You can download the previous version; it does not need to be in /Applications. Load the same project and try.

A H.264 hardware encoder is not very useful or interesting on a fast, modern machine because x264 is so fast. I just compared export of a 2:28 project on my M1 MacMini, and it took 1:03 with h264_videotoolbox and 1:07 with x264.

I’m not familiar with x264, would I simply select that as a codec (seeing libx264 as an option) and leave the other settings the same?

I think when I tried a non-hardware encoder a while back the temperatures on the processor cores seemed higher than usual - in the 95 to 100° range. Is that cause for concern?

Apologies for the novice questions, I’m still new to video editing and have not had much experience with the tools.

Thank you,

-L

It is the most popular H.264 encoder in the world for at least the past 15 years. To use it instead of h264_videotoolbox,

  1. Click Configure… next to Export > Hardware encoder
  2. Uncheck h264_videotoolbox
  3. Click OK
  4. Click Reset at the bottom of Export

I would not expect a modern Apple designed machine to damage itself. It should throttle itself to keep temperature within its tolerance for the system. If you are concerned about the heat affecting you or the battery, you can use hevc_toolbox instead. Why not? Apple prefers HEVC for just about everything now including photos.

1 Like

Thank you for the prompt reply, I’ll give this a try when I’m back home.

  • L

I did some test runs on familiar projects and hevc_toolbox seems to be a viable alternative. The output works on the devices I typically use for playback. File sizes are similar. Export times are acceptable. And temperatures seem about 20° cooler than the non-hardware encoder option. Thanks for taking the time to explain the options.

Best regards,

-L