fix: add the av1_nvenc and vp9_qsv encoders the monitor form offers to the encoder table refs #5928

This commit is contained in:
Jash committed 2026-11-15 09:47:15 +05:30
1 parent 5f0573207c
commit d7fda32484
4 files changed
+39 -1

No files matched your search

+2
View File
@@ -74,6 +74,8 @@ static CodecData enc_codecs[] = {
{ AV_CODEC_ID_H264, "h264", "h264_v4l2m2m", AV_PIX_FMT_YUV420P, AV_PIX_FMT_YUV420P, AV_HWDEVICE_TYPE_NONE, nullptr, nullptr },
{ AV_CODEC_ID_AV1, "av1", "av1_qsv", AV_PIX_FMT_YUV420P, AV_PIX_FMT_QSV, AV_HWDEVICE_TYPE_QSV, nullptr, nullptr },
{ AV_CODEC_ID_AV1, "av1", "av1_vaapi", AV_PIX_FMT_YUV420P, AV_PIX_FMT_VAAPI, AV_HWDEVICE_TYPE_VAAPI, nullptr, nullptr },
{ AV_CODEC_ID_AV1, "av1", "av1_nvenc", AV_PIX_FMT_NV12, AV_PIX_FMT_NV12, AV_HWDEVICE_TYPE_NONE, nullptr, nullptr },
{ AV_CODEC_ID_VP9, "vp9", "vp9_qsv", AV_PIX_FMT_YUV420P, AV_PIX_FMT_QSV, AV_HWDEVICE_TYPE_QSV, nullptr, nullptr },
#endif
{ AV_CODEC_ID_H265, "hevc", "libx265", AV_PIX_FMT_YUV420P, AV_PIX_FMT_YUV420P, AV_HWDEVICE_TYPE_NONE, nullptr, nullptr },
{ AV_CODEC_ID_H264, "h264", "h264", AV_PIX_FMT_YUV420P, AV_PIX_FMT_YUV420P, AV_HWDEVICE_TYPE_NONE, nullptr, nullptr },
+1
View File
@@ -97,6 +97,7 @@ set(TEST_SOURCES
zm_ffmpeg_fallback.cpp
zm_ffmpeg_options.cpp
zm_ffmpeg_option_number.cpp
zm_ffmpeg_encoder_choices.cpp
zm_go2rtc_check.cpp
zm_janus_ids.cpp
zm_janus_refresh.cpp
+35
View File
@@ -0,0 +1,35 @@
/*
* This file is part of the ZoneMinder Project. See AUTHORS file for Copyright information
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
* Free Software Foundation; either version 2 of the License, or (at your
* option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include "zm_catch2.h"
#include "zm_ffmpeg.h"
TEST_CASE("every encoder the monitor form offers is selectable", "[ffmpeg]") {
const char *offered[] = {
"libx264", "h264_nvenc", "h264_omx", "h264_qsv", "h264_vaapi", "h264_v4l2m2m",
"libx265", "hevc_nvenc", "hevc_qsv", "hevc_vaapi",
"libvpx-vp9", "vp9_qsv", "libsvtav1", "libaom-av1", "av1_qsv", "av1_vaapi", "av1_nvenc",
};
for (const char *name : offered) {
CAPTURE(name);
if (!avcodec_find_encoder_by_name(name)) continue;
const auto found = get_encoder_data("", name);
REQUIRE(found.size() == 1);
REQUIRE(std::string(found.front()->codec_name) == name);
}
}
+1 -1
View File
@@ -1277,7 +1277,7 @@ $videowriter_encoders = array(
'hevc_qsv' => 'hevc_qsv',
'hevc_vaapi' => 'hevc_vaapi',
'libvpx-vp9' => 'libvpx-vp9',
'vp9-qsv' => 'vp9-qsv',
'vp9_qsv' => 'vp9_qsv',
'libsvtav1' => 'libsvtav1',
'libaom-av1' => 'libaom-av1',
'av1_qsv' => 'av1_qsv',