Currently, this is failing to build due to the most recent update to the official ffnvcodec-headers package (the official arch package updated about 16 hours ago as of this comment):
libavcodec/nvenc.c: In function ‘nvenc_setup_hevc_config’:
libavcodec/nvenc.c:1373:9: error: ‘NV_ENC_CONFIG_HEVC’ has no member named ‘pixelBitDepthMinus8’
1373 | hevc->pixelBitDepthMinus8 = IS_10BIT(ctx->data_pix_fmt) ? 2 : 0;
| ^~
libavcodec/nvenc.c: In function ‘nvenc_setup_av1_config’:
libavcodec/nvenc.c:1458:8: error: ‘NV_ENC_CONFIG_AV1’ has no member named ‘inputPixelBitDepthMinus8’
1458 | av1->inputPixelBitDepthMinus8 = IS_10BIT(ctx->data_pix_fmt) ? 2 : 0;
| ^~
libavcodec/nvenc.c:1459:8: error: ‘NV_ENC_CONFIG_AV1’ has no member named ‘pixelBitDepthMinus8’
1459 | av1->pixelBitDepthMinus8 = (IS_10BIT(ctx->data_pix_fmt) || ctx->highbitdepth) ? 2 : 0;
| ^~
CC libavcodec/opus_celt.o
libavcodec/nvenc.c: In function ‘nvenc_map_buffer_format’:
libavcodec/nvenc.c:1692:16: error: ‘NV_ENC_BUFFER_FORMAT_YV12_PL’ undeclared (first use in this function); did you mean ‘NV_ENC_BUFFER_FORMAT_YV12’?
1692 | return NV_ENC_BUFFER_FORMAT_YV12_PL;
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
| NV_ENC_BUFFER_FORMAT_YV12
libavcodec/nvenc.c:1692:16: note: each undeclared identifier is reported only once for each function it appears in
libavcodec/nvenc.c:1694:16: error: ‘NV_ENC_BUFFER_FORMAT_NV12_PL’ undeclared (first use in this function); did you mean ‘NV_ENC_BUFFER_FORMAT_NV12’?
1694 | return NV_ENC_BUFFER_FORMAT_NV12_PL;
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
| NV_ENC_BUFFER_FORMAT_NV12
CC libavcodec/opus_metadata_bsf.o
libavcodec/nvenc.c:1700:16: error: ‘NV_ENC_BUFFER_FORMAT_YUV444_PL’ undeclared (first use in this function); did you mean ‘NV_ENC_BUFFER_FORMAT_YUV444’?
1700 | return NV_ENC_BUFFER_FORMAT_YUV444_PL;
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| NV_ENC_BUFFER_FORMAT_YUV444
It appeears that about 6 days ago the official Videolan.org project (Official git.videolan.org Commit Diff here) removed the pixelBitDepthMinus8 property from the NV_ENC_CONFIG_HEVC struct:
@@ -1793,7 +1843,7 @@ typedef struct _NV_ENC_CONFIG_HEVC
uint32_t repeatSPSPPS :1; /**< [in]: Set 1 to output VPS,SPS and PPS for every IDR frame.*/
uint32_t enableIntraRefresh :1; /**< [in]: Set 1 to enable gradual decoder refresh or intra refresh. If the GOP structure uses B frames this will be ignored */
uint32_t chromaFormatIDC :2; /**< [in]: Specifies the chroma format. Should be set to 1 for yuv420 input, 3 for yuv444 input.*/
- uint32_t pixelBitDepthMinus8 :3; /**< [in]: Specifies pixel bit depth minus 8. Should be set to 0 for 8 bit input, 2 for 10 bit input.*/
+ uint32_t reserved3 :3; /**< [in]: Reserved and must be set to 0.*/
uint32_t enableFillerDataInsertion :1; /**< [in]: Set to 1 to enable insertion of filler data in the bitstream.
This flag will take effect only when CBR rate control mode is in use and both
NV_ENC_INITIALIZE_PARAMS::frameRateNum and
As well as removed the other two properties inputPixelBitDepthMinus8 and pixelBitDepthMinus8 from the NV_ENC_CONFIG_AV1 struct:
@@ -1910,10 +1973,7 @@ typedef struct _NV_ENC_CONFIG_AV1
uint32_t enableBitstreamPadding : 1; /**< [in]: Set 1 to enable bitstream padding. */
uint32_t enableCustomTileConfig : 1; /**< [in]: Set 1 to enable custom tile configuration: numTileColumns and numTileRows must have non zero values and tileWidths and tileHeights must point to a valid address */
uint32_t enableFilmGrainParams : 1; /**< [in]: Set 1 to enable custom film grain parameters: filmGrainParams must point to a valid address */
- uint32_t inputPixelBitDepthMinus8 : 3; /**< [in]: Specifies pixel bit depth minus 8 of video input. Should be set to 0 for 8 bit input, 2 for 10 bit input.*/
- uint32_t pixelBitDepthMinus8 : 3; /**< [in]: Specifies pixel bit depth minus 8 of encoded video. Should be set to 0 for 8 bit, 2 for 10 bit.
- HW will do the bitdepth conversion internally from inputPixelBitDepthMinus8 -> pixelBitDepthMinus8 if bit dpeths differ
- Support for 8 bit input to 10 bit encode conversion only */
+ uint32_t reserved4 : 6; /**< [in]: Reserved and must be set to 0.*/
uint32_t reserved : 14; /**< [in]: Reserved bitfields.*/
uint32_t idrPeriod; /**< [in]: Specifies the IDR/Key frame interval. If not set, this is made equal to gopLength in NV_ENC_CONFIG.Low latency application client can set IDR interval to NVENC_INFINITE_GOPLENGTH so that IDR frames are not inserted automatically. */
uint32_t intraRefreshPeriod; /**< [in]: Specifies the interval between successive intra refresh if enableIntrarefresh is set. Requires enableIntraRefresh to be set.
Sadly, I'm not smart enough to figure out what to replace with since they just flat out removed those two properties. Maybe this is a bug (nervously hopeful)?
Anybody else stuck with being unable to build here's what I did to re-build:
Downgraded my official archlinux ffnvcodec-headers package by cloning it from: https://gitlab.archlinux.org/archlinux/packaging/packages/ffnvcodec-headers
Then I just checked out the previous 12.1.14.0-1 tagged commit:
git clone https://gitlab.archlinux.org/archlinux/packaging/packages/ffnvcodec-headers.git
git checkout -b 12.1.14.0-1 tags/12.1.14.0-1
makepkg -s
sudo pacman -U ffnvcodec-headers-12.1.14.0-1-any.pkg.tar.zst
So far so good.. Though I need to test OBS with hardware NVENC... Though my GPU is not powerful enough to do HEVC or AV1...
Pinned Comments
tytan652 commented on 2022-07-23 05:48 (UTC) (edited on 2024-06-21 13:15 (UTC) by tytan652)
Please, this package follow Arch Linux
ffmpeg
package version (not the staging or the testing one).Don't put
ffmpeg-obs
out-of-date if both packages are on the same version. If you do, you might be ignored in the future.tytan652 commented on 2021-12-17 15:32 (UTC)
OBS Project actually patch FFmpeg to fix some issues and also add RIST support starting from 27.2.
So I created this package, a ffmpeg package that ensure that you have those.
I really wanted to not do this but some fixes are needed, so I did my best to add those "feature-set options".
They allow you to build ffmpeg with feature-set based on other ffmpeg packages from AUR.
Read the PKGBUILD for more information about them.