Skip to content

Commit

Permalink
Add qsv codec options
Browse files Browse the repository at this point in the history
  • Loading branch information
connortechnology committed Feb 26, 2023
1 parent c1c25ae commit 6505bba
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 6 deletions.
13 changes: 8 additions & 5 deletions src/zm_videostore.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -42,18 +42,21 @@ extern "C" {
VideoStore::CodecData VideoStore::codec_data[] = {
#if HAVE_LIBAVUTIL_HWCONTEXT_H && LIBAVCODEC_VERSION_CHECK(57, 107, 0, 107, 0)
{ AV_CODEC_ID_H265, "h265", "hevc_vaapi", AV_PIX_FMT_NV12, AV_PIX_FMT_VAAPI, AV_HWDEVICE_TYPE_VAAPI },
{ AV_CODEC_ID_H265, "h265", "hevc_qsv", AV_PIX_FMT_NV12, AV_PIX_FMT_QSV, AV_HWDEVICE_TYPE_QSV },
{ AV_CODEC_ID_H265, "h265", "hevc_nvenc", AV_PIX_FMT_NV12, AV_PIX_FMT_NV12, AV_HWDEVICE_TYPE_NONE },
{ AV_CODEC_ID_H265, "h265", "libx265", AV_PIX_FMT_YUV420P, AV_PIX_FMT_YUV420P, AV_HWDEVICE_TYPE_NONE },
{ AV_CODEC_ID_H265, "h265", "libx265", AV_PIX_FMT_YUV420P, AV_PIX_FMT_YUV420P, AV_HWDEVICE_TYPE_NONE },

{ AV_CODEC_ID_H264, "h264", "h264_vaapi", AV_PIX_FMT_NV12, AV_PIX_FMT_VAAPI, AV_HWDEVICE_TYPE_VAAPI },
{ AV_CODEC_ID_H264, "h264", "h264_qsv", AV_PIX_FMT_NV12, AV_PIX_FMT_QSV, AV_HWDEVICE_TYPE_QSV },
{ AV_CODEC_ID_H264, "h264", "h264_nvenc", AV_PIX_FMT_NV12, AV_PIX_FMT_NV12, AV_HWDEVICE_TYPE_NONE },
{ AV_CODEC_ID_H264, "h264", "h264_omx", AV_PIX_FMT_YUV420P, AV_PIX_FMT_YUV420P, AV_HWDEVICE_TYPE_NONE },
{ AV_CODEC_ID_H264, "h264", "h264", AV_PIX_FMT_YUV420P, AV_PIX_FMT_YUV420P, AV_HWDEVICE_TYPE_NONE },
{ AV_CODEC_ID_H264, "h264", "libx264", AV_PIX_FMT_YUV420P, AV_PIX_FMT_YUV420P, AV_HWDEVICE_TYPE_NONE },
{ AV_CODEC_ID_H264, "h264", "libx264", AV_PIX_FMT_YUV420P, AV_PIX_FMT_YUV420P, AV_HWDEVICE_TYPE_NONE },
{ AV_CODEC_ID_MJPEG, "mjpeg", "mjpeg", AV_PIX_FMT_YUVJ422P, AV_PIX_FMT_YUVJ422P, AV_HWDEVICE_TYPE_NONE },
{ AV_CODEC_ID_VP9, "vp9", "libvpx-vp9", AV_PIX_FMT_YUV420P, AV_PIX_FMT_YUV420P, AV_HWDEVICE_TYPE_NONE },
{ AV_CODEC_ID_AV1, "av1", "libsvtav1", AV_PIX_FMT_YUV420P, AV_PIX_FMT_YUV420P, AV_HWDEVICE_TYPE_NONE },
{ AV_CODEC_ID_AV1, "av1", "libaom-av1", AV_PIX_FMT_YUV420P, AV_PIX_FMT_YUV420P, AV_HWDEVICE_TYPE_NONE },
{ AV_CODEC_ID_VP9, "vp9", "libvpx-vp9", AV_PIX_FMT_YUV420P, AV_PIX_FMT_YUV420P, AV_HWDEVICE_TYPE_NONE },
{ AV_CODEC_ID_AV1, "av1", "libsvtav1", AV_PIX_FMT_YUV420P, AV_PIX_FMT_YUV420P, AV_HWDEVICE_TYPE_NONE },
{ AV_CODEC_ID_AV1, "av1", "libaom-av1", AV_PIX_FMT_YUV420P, AV_PIX_FMT_YUV420P, AV_HWDEVICE_TYPE_NONE },
{ AV_CODEC_ID_AV1, "av1", "av1_qsv", AV_PIX_FMT_NV12, AV_PIX_FMT_QSV, AV_HWDEVICE_TYPE_QSV },
#else
{ AV_CODEC_ID_H265, "h265", "libx265", AV_PIX_FMT_YUV420P, AV_PIX_FMT_YUV420P },

Expand Down
6 changes: 5 additions & 1 deletion web/skins/classic/views/monitor.php
Original file line number Diff line number Diff line change
Expand Up @@ -1137,13 +1137,17 @@ class="nav-link<?php echo $tab == $name ? ' active' : '' ?>"
'h264' => 'h264',
'h264_nvenc' => 'h264_nvenc',
'h264_omx' => 'h264_omx',
'h264_qsv' => 'h264_qsv',
'h264_vaapi' => 'h264_vaapi',
'libx265' => 'libx265',
'hevc_nvenc' => 'hevc_nvenc',
'hevc_qsv' => 'hevc_qsv',
'hevc_vaapi' => 'hevc_vaapi',
'libvpx-vp9' => 'libvpx-vp9',
'vp9-qsv' => 'vp9-qsv',
'libsvtav1' => 'libsvtav1',
'libaom-av1' => 'libaom-av1'
'libaom-av1' => 'libaom-av1',
'av1_qsv' => 'av1_qsv'
);
echo htmlSelect('newMonitor[Encoder]', $videowriter_encoders, $monitor->Encoder());
?>
Expand Down

0 comments on commit 6505bba

Please sign in to comment.