obs-studio
obs-studio copied to clipboard
mac-videotoolbox: Add HEVC encoders (hw+sw)
Description
Add support for HEVC (in addition to the existing AVC) for mac-videotoolbox.
Motivation and Context
MacOS videotoolbox plugin should allow HEVC encoding.
How Has This Been Tested?
Cmake variable ENABLE_HEVC should be enabled (-DENABLE_HEVC=ON
)
- HDR video was recorded using "Apple VT HEVC Hardware" encoder. Video parameters were tested using the
ffprobe
tool. The recorded video was played usingmpv
. - HDR Video was streamed to YouTube using "Apple VT HEVC Hardware" encoder. Video parameters were tested using the
Stats for nerds
YouTube feature. The streamed video was viewed usingchrome web browser
.
Mac mini (M1) / 11.6 Big Sur, MacBook Pro (i7) / 12.5 Monterey
Types of changes
- New feature (non-breaking change which adds functionality)
- H.264(AVC) related code moved to the
mac-videotoolbox/encoder-h264.c
. - Contents of
mac-videotoolbox/encoder.c
made H.264/H.265 universal. - H.265(HEVC) staff placed in the
mac-videotoolbox/encoder-h265.c
.
- H.264(AVC) related code moved to the
Checklist:
- [x] My code has been run through clang-format.
- [x] I have read the contributing document.
- [x] My code is not on the master branch.
- [x] The code has been tested.
- [x] All commit messages are properly formatted and commits squashed where appropriate.
- [ ] I have included updates to all appropriate documentation.
Please split your commits and explain your changes in detail if possible. There appear to be changes not directly related to HEVC.
Done. Non related HEVC code removed.
I'll update PR soon - will merge changes into one source file to simplify review and merging with others changes.
The code has been combined into one file to make it easier to review.
I looked through the diffs, and this PR has been superset by other commits. It should be fine to close.