Full hardware transcode with NVDEC and NVENC:

ffmpeg -hwaccel cuda -hwaccel_output_format cuda -i input -c:v h264_nvenc -preset slow output
If ffmpeg was compiled with support for libnpp, it can be used to insert a GPU based scaler into the chain:

ffmpeg -hwaccel_device 0 -hwaccel cuda -i input -vf scale_npp=-1:720 -c:v h264_nvenc -preset slow output.mkv
Sample decode using CUVID:

ffmpeg -c:v h264_cuvid -i input output
Sample decode using CUDA:

ffmpeg -hwaccel cuda -i input output
FFplay only supports older option -vcodec (not -c:v) and only CUVID.

ffplay -vcodec hevc_cuvid file.mp4
How to reproduce:

% ffmpeg -layouts
ffmpeg version 2022-03-24-git-28d011516b-essentials_build-www.gyan.dev Copyright (c) 2000-2022 the FFmpeg developers
  built with gcc 11.2.0 (Rev7, Built by MSYS2 project)
  configuration: --enable-gpl --enable-version3 --enable-static --disable-w32threads --disable-autodetect --enable-fontconfig --enable-iconv --enable-gnutls --enable-libxml2 --enable-gmp --enable-bzlib --enable-lzma --enable-zlib --enable-libsrt --enable-libssh --enable-libzmq --enable-avisynth --enable-sdl2 --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxvid --enable-libaom --enable-libopenjpeg --enable-libvpx --enable-mediafoundation --enable-libass --enable-libfreetype --enable-libfribidi --enable-libvidstab --enable-libvmaf --enable-libzimg --enable-amf --enable-cuda-llvm --enable-cuvid --enable-ffnvcodec --enable-nvdec --enable-nvenc --enable-d3d11va --enable-dxva2 --enable-libmfx --enable-libgme --enable-libopenmpt --enable-libopencore-amrwb --enable-libmp3lame --enable-libtheora --enable-libvo-amrwbenc --enable-libgsm --enable-libopencore-amrnb --enable-libopus --enable-libspeex --enable-libvorbis --enable-librubberband
  libavutil      57. 24.101 / 57. 24.101
  libavcodec     59. 25.100 / 59. 25.100
  libavformat    59. 20.101 / 59. 20.101
  libavdevice    59.  6.100 / 59.  6.100
  libavfilter     8. 29.100 /  8. 29.100
  libswscale      6.  6.100 /  6.  6.100
  libswresample   4.  6.100 /  4.  6.100
  libpostproc    56.  5.100 / 56.  5.100
Individual channels:
NAME           DESCRIPTION
FL             front left
FR             front right
FC             front center
LFE            low frequency
BL             back left
BR             back right
FLC            front left-of-center
FRC            front right-of-center
BC             back center
SL             side left
SR             side right
TC             top center
TFL            top front left
TFC            top front center
TFR            top front right
TBL            top back left
TBC            top back center
TBR            top back right
(null)         (null)
(null)         (null)
(null)         (null)
(null)         (null)
(null)         (null)
(null)         (null)
(null)         (null)
(null)         (null)
(null)         (null)
(null)         (null)
(null)         (null)
DL             downmix left
DR             downmix right
WL             wide left
WR             wide right
SDL            surround direct left
SDR            surround direct right
LFE2           low frequency 2
TSL            top side left
TSR            top side right
BFC            bottom front center
BFL            bottom front left
BFR            bottom front right
USR41          user 41
USR42          user 42
USR43          user 43
USR44          user 44
USR45          user 45
USR46          user 46
USR47          user 47
USR48          user 48
USR49          user 49
USR50          user 50
USR51          user 51
USR52          user 52
USR53          user 53
USR54          user 54
USR55          user 55
USR56          user 56
USR57          user 57
USR58          user 58
USR59          user 59
USR60          user 60
USR61          user 61
USR62          user 62

Standard channel layouts:
NAME           DECOMPOSITION
mono           +USR63
stereo         USR63+USR63
2.1            USR63+USR63+USR63
3.0            USR63+USR63+USR63
3.0(back)      USR63+USR63+USR63
4.0            USR63+USR63+USR63+USR63
quad           USR63+USR63+USR63+USR63
quad(side)     USR63+USR63+USR63+USR63
3.1            USR63+USR63+USR63+USR63
5.0            USR63+USR63+USR63+USR63+USR63
5.0(side)      USR63+USR63+USR63+USR63+USR63
4.1            USR63+USR63+USR63+USR63+USR63
5.1            USR63+USR63+USR63+USR63+USR63+USR63
5.1(side)      USR63+USR63+USR63+USR63+USR63+USR63
6.0            USR63+USR63+USR63+USR63+USR63+USR63
6.0(front)     USR63+USR63+USR63+USR63+USR63+USR63
hexagonal      USR63+USR63+USR63+USR63+USR63+USR63
6.1            USR63+USR63+USR63+USR63+USR63+USR63+USR63
6.1(back)      USR63+USR63+USR63+USR63+USR63+USR63+USR63
6.1(front)     USR63+USR63+USR63+USR63+USR63+USR63+USR63
7.0            USR63+USR63+USR63+USR63+USR63+USR63+USR63
7.0(front)     USR63+USR63+USR63+USR63+USR63+USR63+USR63
7.1            USR63+USR63+USR63+USR63+USR63+USR63+USR63+USR63
7.1(wide)      USR63+USR63+USR63+USR63+USR63+USR63+USR63+USR63
7.1(wide-side) USR63+USR63+USR63+USR63+USR63+USR63+USR63+USR63
octagonal      USR63+USR63+USR63+USR63+USR63+USR63+USR63+USR63
hexadecagonal  USR63+USR63+USR63+USR63+USR63+USR63+USR63+USR63+USR63+USR63+USR63+USR63+USR63+USR63+USR63+USR63
downmix        +USR63+USR63
22.2           USR63+USR63+USR63+USR63+USR63+USR63+USR63+USR63+USR63+USR63+USR63+USR63+USR63+USR63+USR63+USR63+USR63+USR63+USR63+USR63+USR63+USR63+USR63+USR63

Recommend

FFMPEG CUDA (NVENC/NVDEC) NVDEC/CUVID

FFMPEG CUDA (NVENC/NVDEC) NVENC

FFMPEG DXVA2

FFMPEG Importing ticket data Bugzilla

FFMPEG Histogram RGB Histogram

FFMPEG Histogram YUV Histogram

YAML Chapter 10. Recommended Schemas 10.3. Core Schema 10.3.2. Tag Resolution

YAML Chapter 10. Recommended Schemas 10.2. JSON Schema 10.2.2. Tag Resolution

YAML Chapter 10. Recommended Schemas 10.2. JSON Schema 10.2.1. Tags 10.2.1.4. Floating Point

YAML Chapter 10. Recommended Schemas 10.2. JSON Schema 10.2.1. Tags 10.2.1.3. Integer

YAML Chapter 10. Recommended Schemas 10.2. JSON Schema 10.2.1. Tags 10.2.1.2. Boolean

YAML Chapter 10. Recommended Schemas 10.2. JSON Schema 10.2.1. Tags 10.2.1.1. Null

YAML Chapter 10. Recommended Schemas 10.1. Failsafe Schema 10.1.1. Tags 10.1.1.3. Generic String

YAML Chapter 10. Recommended Schemas 10.1. Failsafe Schema 10.1.1. Tags 10.1.1.2. Generic Sequence

YAML Chapter 10. Recommended Schemas 10.1. Failsafe Schema 10.1.1. Tags 10.1.1.1. Generic Mapping

YAML Chapter 9. Document Stream Productions 9.2. Streams

YAML Chapter 9. Document Stream Productions 9.1. Documents 9.1.5. Directives Documents

YAML Chapter 9. Document Stream Productions 9.1. Documents 9.1.4. Explicit Documents

YAML Chapter 9. Document Stream Productions 9.1. Documents 9.1.3. Bare Documents

YAML Chapter 9. Document Stream Productions 9.1. Documents 9.1.2. Document Markers

YAML Chapter 9. Document Stream Productions 9.1. Documents 9.1.1. Document Prefix

YAML Chapter 8. Block Style Productions 8.2. Block Collection Styles 8.2.3. Block Nodes

YAML Chapter 8. Block Style Productions 8.2. Block Collection Styles 8.2.2. Block Mappings

YAML Chapter 8. Block Style Productions 8.2. Block Collection Styles 8.2.1. Block Sequences

YAML Chapter 8. Block Style Productions 8.1. Block Scalar Styles 8.1.3. Folded Style

YAML Chapter 8. Block Style Productions 8.1. Block Scalar Styles 8.1.2. Literal Style

YAML Chapter 8. Block Style Productions 8.1. Block Scalar Styles 8.1.1. Block Scalar Headers 8.1.1.2. Block Chomping Indicator

YAML Chapter 8. Block Style Productions 8.1. Block Scalar Styles 8.1.1. Block Scalar Headers 8.1.1.1. Block Indentation Indicator

YAML Chapter 8. Block Style Productions 8.1. Block Scalar Styles 8.1.1. Block Scalar Headers

YAML Chapter 7. Flow Style Productions 7.5. Flow Nodes

YAML Chapter 7. Flow Style Productions 7.4. Flow Collection Styles 7.4.2. Flow Mappings

YAML Chapter 7. Flow Style Productions 7.4. Flow Collection Styles 7.4.1. Flow Sequences