Microsoft MVP성태의 닷넷 이야기
.NET Framework: 1160. C# - ffmpeg(FFmpeg.AutoGen)를 이용한 qsv 디코딩 [링크 복사], [링크+제목 복사]
조회: 2742
글쓴 사람
정성태 (techsharer at outlook.com)
홈페이지
첨부 파일
 

C# - ffmpeg(FFmpeg.AutoGen)를 이용한 qsv 디코딩

지난 예제에서 qsvdec.c 코드를 포팅했는데요,

C# - ffmpeg(FFmpeg.AutoGen)를 이용한 qsvdec.c 예제 포팅
; https://www.sysnet.pe.kr/2/0/12975

qsv 디코딩을 실습해 보려고, (vcpkg로 빌드한) ffmpeg 라이브러리의 av_hwdevice_ctx_create, avcodec_find_decoder_by_name 함수를 호출하면,

AVBufferRef* device_ref = null;

ret = ffmpeg.av_hwdevice_ctx_create(&device_ref, AVHWDeviceType.AV_HWDEVICE_TYPE_QSV, "auto", null, 0);
if (ret < 0)
{
    Console.WriteLine("Cannot open the hardware device");
    throw new ApplicationException();
}

decoder = ffmpeg.avcodec_find_decoder_by_name("h264_qsv");

ret == -12(Cannot allocate memory)를 반환하고, decoder는 null입니다. 지난 글에서도 설명했듯이,

ffmpeg.exe - Intel Quick Sync Video(qsv)를 이용한 인코딩
; https://www.sysnet.pe.kr/2/0/12973

qsv 지원을 포함하지 않은 경우 -12를 반환하는 듯합니다. 참고로, av_hwdevice_iterate_types를 호출해 봐도,

// https://www.sysnet.pe.kr/2/0/12896#list_hw_decoder
{
    AVHWDeviceType type = AVHWDeviceType.AV_HWDEVICE_TYPE_NONE;

    while ((type = ffmpeg.av_hwdevice_iterate_types(type)) != AVHWDeviceType.AV_HWDEVICE_TYPE_NONE)
    {
        Console.WriteLine($"{ffmpeg.av_hwdevice_get_type_name(type)}");
    }
}

/* 출력 결과
cuda
dxva2
d3d11va
opencl
*/

"qsv" 항목이 없습니다. 또한 av_codec_iterate를 통해 나열해도,

{
    const int AV_CODEC_HW_CONFIG_METHOD_HW_DEVICE_CTX = 0x01;

    void* iter = null;

    for (; ;)
    {
        AVCodec* cur = ffmpeg.av_codec_iterate(&iter);
        if (cur == null)
        {
            break;
        }

        Console.WriteLine($"{FFmpegHelper.AnsiToString(cur->name)}({FFmpegHelper.AnsiToString(cur->long_name)})");

        AVCodecHWConfig* config = null;
        for (int n = 0; (config = ffmpeg.avcodec_get_hw_config(cur, n)) != null; n++)
        {

            if ((config->methods & AV_CODEC_HW_CONFIG_METHOD_HW_DEVICE_CTX) == AV_CODEC_HW_CONFIG_METHOD_HW_DEVICE_CTX)
            {
                Console.WriteLine($"\thw-accel: {config->pix_fmt}, type: {config->device_type}, decoder: {ffmpeg.av_codec_is_decoder(cur)}, encoder: {ffmpeg.av_codec_is_encoder(cur)}");
            }
        }
    }
}

/* 출력 결과
a64multi(Multicolor charset for Commodore 64)
a64multi5(Multicolor charset for Commodore 64, extended with 5th color (colram))
alias_pix(Alias/Wavefront PIX image)
amv(AMV Video)
asv1(ASUS V1)
asv2(ASUS V2)
avrp(Avid 1:1 10-bit RGB Packer)
avui(Avid Meridien Uncompressed)
ayuv(Uncompressed packed MS 4:4:4:4)
bmp(BMP (Windows and OS/2 bitmap))
cfhd(GoPro CineForm HD)
cinepak(Cinepak)
cljr(Cirrus Logic AccuPak)
comfortnoise(RFC 3389 comfort noise generator)
dnxhd(VC3/DNxHD)
dpx(DPX (Digital Picture Exchange) image)
dvvideo(DV (Digital Video))
ffv1(FFmpeg video codec #1)
ffvhuff(Huffyuv FFmpeg variant)
fits(Flexible Image Transport System)
flv(FLV / Sorenson Spark / Sorenson H.263 (Flash Video))
gif(GIF (Graphics Interchange Format))
h261(H.261)
h263(H.263 / H.263-1996)
h263p(H.263+ / H.263-1998 / H.263 version 2)
huffyuv(Huffyuv / HuffYUV)
jpeg2000(JPEG 2000)
jpegls(JPEG-LS)
ljpeg(Lossless JPEG)
magicyuv(MagicYUV video)
mjpeg(MJPEG (Motion JPEG))
mpeg1video(MPEG-1 video)
mpeg2video(MPEG-2 video)
mpeg4(MPEG-4 part 2)
msmpeg4v2(MPEG-4 part 2 Microsoft variant version 2)
msmpeg4(MPEG-4 part 2 Microsoft variant version 3)
msvideo1(Microsoft Video-1)
pam(PAM (Portable AnyMap) image)
pbm(PBM (Portable BitMap) image)
pcx(PC Paintbrush PCX image)
pfm(PFM (Portable FloatMap) image)
pgm(PGM (Portable GrayMap) image)
pgmyuv(PGMYUV (Portable GrayMap YUV) image)
ppm(PPM (Portable PixelMap) image)
prores(Apple ProRes)
prores_aw(Apple ProRes)
prores_ks(Apple ProRes (iCodec Pro))
qtrle(QuickTime Animation (RLE) video)
r10k(AJA Kona 10-bit RGB Codec)
r210(Uncompressed RGB 10-bit)
rawvideo(raw video)
roqvideo(id RoQ video)
rpza(QuickTime video (RPZA))
rv10(RealVideo 1.0)
rv20(RealVideo 2.0)
s302m(SMPTE 302M)
sgi(SGI image)
snow(Snow)
speedhq(NewTek SpeedHQ)
sunrast(Sun Rasterfile image)
svq1(Sorenson Vector Quantizer 1 / Sorenson Video 1 / SVQ1)
targa(Truevision Targa image)
tiff(TIFF image)
utvideo(Ut Video)
v210(Uncompressed 4:2:2 10-bit)
v308(Uncompressed packed 4:4:4)
v408(Uncompressed packed QT 4:4:4:4)
v410(Uncompressed 4:4:4 10-bit)
vc2(SMPTE VC-2)
wrapped_avframe(AVFrame to AVPacket passthrough)
wmv1(Windows Media Video 7)
wmv2(Windows Media Video 8)
xbm(XBM (X BitMap) image)
xface(X-face image)
xwd(XWD (X Window Dump) image)
y41p(Uncompressed YUV 4:1:1 12-bit)
yuv4(Uncompressed packed 4:2:0)
aac(AAC (Advanced Audio Coding))
ac3(ATSC A/52A (AC-3))
ac3_fixed(ATSC A/52A (AC-3))
alac(ALAC (Apple Lossless Audio Codec))
aptx(aptX (Audio Processing Technology for Bluetooth))
aptx_hd(aptX HD (Audio Processing Technology for Bluetooth))
dca(DCA (DTS Coherent Acoustics))
eac3(ATSC A/52 E-AC-3)
flac(FLAC (Free Lossless Audio Codec))
g723_1(G.723.1)
mlp(MLP (Meridian Lossless Packing))
mp2(MP2 (MPEG audio layer 2))
mp2fixed(MP2 fixed point (MPEG audio layer 2))
nellymoser(Nellymoser Asao)
opus(Opus)
real_144(RealAudio 1.0 (14.4K))
sbc(SBC (low-complexity subband codec))
sonic(Sonic)
sonicls(Sonic lossless)
truehd(TrueHD)
tta(TTA (True Audio))
vorbis(Vorbis)
wavpack(WavPack)
wmav1(Windows Media Audio 1)
wmav2(Windows Media Audio 2)
pcm_alaw(PCM A-law / G.711 A-law)
pcm_dvd(PCM signed 16|20|24-bit big-endian for DVD media)
pcm_f32be(PCM 32-bit floating point big-endian)
pcm_f32le(PCM 32-bit floating point little-endian)
pcm_f64be(PCM 64-bit floating point big-endian)
pcm_f64le(PCM 64-bit floating point little-endian)
pcm_mulaw(PCM mu-law / G.711 mu-law)
pcm_s8(PCM signed 8-bit)
pcm_s8_planar(PCM signed 8-bit planar)
pcm_s16be(PCM signed 16-bit big-endian)
pcm_s16be_planar(PCM signed 16-bit big-endian planar)
pcm_s16le(PCM signed 16-bit little-endian)
pcm_s16le_planar(PCM signed 16-bit little-endian planar)
pcm_s24be(PCM signed 24-bit big-endian)
pcm_s24daud(PCM D-Cinema audio signed 24-bit)
pcm_s24le(PCM signed 24-bit little-endian)
pcm_s24le_planar(PCM signed 24-bit little-endian planar)
pcm_s32be(PCM signed 32-bit big-endian)
pcm_s32le(PCM signed 32-bit little-endian)
pcm_s32le_planar(PCM signed 32-bit little-endian planar)
pcm_s64be(PCM signed 64-bit big-endian)
pcm_s64le(PCM signed 64-bit little-endian)
pcm_u8(PCM unsigned 8-bit)
pcm_u16be(PCM unsigned 16-bit big-endian)
pcm_u16le(PCM unsigned 16-bit little-endian)
pcm_u24be(PCM unsigned 24-bit big-endian)
pcm_u24le(PCM unsigned 24-bit little-endian)
pcm_u32be(PCM unsigned 32-bit big-endian)
pcm_u32le(PCM unsigned 32-bit little-endian)
pcm_vidc(PCM Archimedes VIDC)
roq_dpcm(id RoQ DPCM)
adpcm_adx(SEGA CRI ADX ADPCM)
adpcm_argo(ADPCM Argonaut Games)
g722(G.722 ADPCM)
g726(G.726 ADPCM)
g726le(G.726 little endian ADPCM ("right-justified"))
adpcm_ima_amv(ADPCM IMA AMV)
adpcm_ima_alp(ADPCM IMA High Voltage Software ALP)
adpcm_ima_apm(ADPCM IMA Ubisoft APM)
adpcm_ima_qt(ADPCM IMA QuickTime)
adpcm_ima_ssi(ADPCM IMA Simon & Schuster Interactive)
adpcm_ima_wav(ADPCM IMA WAV)
adpcm_ms(ADPCM Microsoft)
adpcm_swf(ADPCM Shockwave Flash)
adpcm_yamaha(ADPCM Yamaha)
ssa(ASS (Advanced SubStation Alpha) subtitle)
ass(ASS (Advanced SubStation Alpha) subtitle)
dvbsub(DVB subtitles)
dvdsub(DVD subtitles)
mov_text(3GPP Timed Text subtitle)
srt(SubRip subtitle)
subrip(SubRip subtitle)
text(Raw text subtitle)
ttml(TTML subtitle)
webvtt(WebVTT subtitle)
xsub(DivX subtitles (XSUB))
aac_mf(AAC via MediaFoundation)
ac3_mf(AC3 via MediaFoundation)
h264_mf(H264 via MediaFoundation)
h264_nvenc(NVIDIA NVENC H.264 encoder)
        hw-accel: AV_PIX_FMT_NONE, type: AV_HWDEVICE_TYPE_CUDA, decoder: 0, encoder: 1
        hw-accel: AV_PIX_FMT_NONE, type: AV_HWDEVICE_TYPE_D3D11VA, decoder: 0, encoder: 1
nvenc(NVIDIA NVENC H.264 encoder)
        hw-accel: AV_PIX_FMT_NONE, type: AV_HWDEVICE_TYPE_CUDA, decoder: 0, encoder: 1
        hw-accel: AV_PIX_FMT_NONE, type: AV_HWDEVICE_TYPE_D3D11VA, decoder: 0, encoder: 1
nvenc_h264(NVIDIA NVENC H.264 encoder)
        hw-accel: AV_PIX_FMT_NONE, type: AV_HWDEVICE_TYPE_CUDA, decoder: 0, encoder: 1
        hw-accel: AV_PIX_FMT_NONE, type: AV_HWDEVICE_TYPE_D3D11VA, decoder: 0, encoder: 1
nvenc_hevc(NVIDIA NVENC hevc encoder)
        hw-accel: AV_PIX_FMT_NONE, type: AV_HWDEVICE_TYPE_CUDA, decoder: 0, encoder: 1
        hw-accel: AV_PIX_FMT_NONE, type: AV_HWDEVICE_TYPE_D3D11VA, decoder: 0, encoder: 1
hevc_mf(HEVC via MediaFoundation)
hevc_nvenc(NVIDIA NVENC hevc encoder)
        hw-accel: AV_PIX_FMT_NONE, type: AV_HWDEVICE_TYPE_CUDA, decoder: 0, encoder: 1
        hw-accel: AV_PIX_FMT_NONE, type: AV_HWDEVICE_TYPE_D3D11VA, decoder: 0, encoder: 1
mp3_mf(MP3 via MediaFoundation)
aasc(Autodesk RLE)
aic(Apple Intermediate Codec)
alias_pix(Alias/Wavefront PIX image)
agm(Amuse Graphics Movie)
amv(AMV Video)
anm(Deluxe Paint Animation)
ansi(ASCII/ANSI art)
arbc(Gryphon's Anim Compressor)
argo(Argonaut Games Video)
asv1(ASUS V1)
asv2(ASUS V2)
aura(Auravision AURA)
aura2(Auravision Aura 2)
avrp(Avid 1:1 10-bit RGB Packer)
avrn(Avid AVI Codec)
avs(AVS (Audio Video Standard) video)
avui(Avid Meridien Uncompressed)
ayuv(Uncompressed packed MS 4:4:4:4)
bethsoftvid(Bethesda VID video)
bfi(Brute Force & Ignorance)
binkvideo(Bink video)
bitpacked(Bitpacked)
bmp(BMP (Windows and OS/2 bitmap))
bmv_video(Discworld II BMV video)
brender_pix(BRender PIX image)
c93(Interplay C93)
cavs(Chinese AVS (Audio Video Standard) (AVS1-P2, JiZhun profile))
cdgraphics(CD Graphics video)
cdtoons(CDToons video)
cdxl(Commodore CDXL video)
cfhd(GoPro CineForm HD)
cinepak(Cinepak)
clearvideo(Iterated Systems ClearVideo)
cljr(Cirrus Logic AccuPak)
cllc(Canopus Lossless Codec)
comfortnoise(RFC 3389 comfort noise generator)
cpia(CPiA video format)
cri(Cintel RAW)
camstudio(CamStudio)
cyuv(Creative YUV (CYUV))
dds(DirectDraw Surface image decoder)
dfa(Chronomaster DFA)
dirac(BBC Dirac VC-2)
dnxhd(VC3/DNxHD)
dpx(DPX (Digital Picture Exchange) image)
dsicinvideo(Delphine Software International CIN video)
dvaudio(Ulead DV Audio)
dvvideo(DV (Digital Video))
dxtory(Dxtory)
dxv(Resolume DXV)
eacmv(Electronic Arts CMV video)
eamad(Electronic Arts Madcow Video)
eatgq(Electronic Arts TGQ video)
eatgv(Electronic Arts TGV video)
eatqi(Electronic Arts TQI Video)
8bps(QuickTime 8BPS video)
8svx_exp(8SVX exponential)
8svx_fib(8SVX fibonacci)
escape124(Escape 124)
escape130(Escape 130)
ffv1(FFmpeg video codec #1)
ffvhuff(Huffyuv FFmpeg variant)
fic(Mirillis FIC)
fits(Flexible Image Transport System)
flic(Autodesk Animator Flic video)
flv(FLV / Sorenson Spark / Sorenson H.263 (Flash Video))
fmvc(FM Screen Capture Codec)
4xm(4X Movie)
fraps(Fraps)
frwu(Forward Uncompressed)
gdv(Gremlin Digital Video)
gif(GIF (Graphics Interchange Format))
h261(H.261)
h263(H.263 / H.263-1996, H.263+ / H.263-1998 / H.263 version 2)
        hw-accel: AV_PIX_FMT_CUDA, type: AV_HWDEVICE_TYPE_CUDA, decoder: 1, encoder: 0
h263i(Intel H.263)
h263p(H.263 / H.263-1996, H.263+ / H.263-1998 / H.263 version 2)
        hw-accel: AV_PIX_FMT_CUDA, type: AV_HWDEVICE_TYPE_CUDA, decoder: 1, encoder: 0
h264(H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10)
        hw-accel: AV_PIX_FMT_DXVA2_VLD, type: AV_HWDEVICE_TYPE_DXVA2, decoder: 1, encoder: 0
        hw-accel: AV_PIX_FMT_D3D11, type: AV_HWDEVICE_TYPE_D3D11VA, decoder: 1, encoder: 0
        hw-accel: AV_PIX_FMT_CUDA, type: AV_HWDEVICE_TYPE_CUDA, decoder: 1, encoder: 0
hap(Vidvox Hap)
hevc(HEVC (High Efficiency Video Coding))
        hw-accel: AV_PIX_FMT_DXVA2_VLD, type: AV_HWDEVICE_TYPE_DXVA2, decoder: 1, encoder: 0
        hw-accel: AV_PIX_FMT_D3D11, type: AV_HWDEVICE_TYPE_D3D11VA, decoder: 1, encoder: 0
        hw-accel: AV_PIX_FMT_CUDA, type: AV_HWDEVICE_TYPE_CUDA, decoder: 1, encoder: 0
hnm4video(HNM 4 video)
hq_hqa(Canopus HQ/HQA)
hqx(Canopus HQX)
huffyuv(Huffyuv / HuffYUV)
hymt(HuffYUV MT)
idcinvideo(id Quake II CIN video)
iff(IFF ACBM/ANIM/DEEP/ILBM/PBM/RGB8/RGBN)
imm4(Infinity IMM4)
imm5(Infinity IMM5)
indeo2(Intel Indeo 2)
indeo3(Intel Indeo 3)
indeo4(Intel Indeo Video Interactive 4)
indeo5(Intel Indeo Video Interactive 5)
interplayvideo(Interplay MVE video)
ipu(IPU Video)
jpeg2000(JPEG 2000)
jpegls(JPEG-LS)
jv(Bitmap Brothers JV video)
kgv1(Kega Game Video)
kmvc(Karl Morton's video codec)
lagarith(Lagarith lossless)
loco(LOCO)
m101(Matrox Uncompressed SD)
magicyuv(MagicYUV video)
mdec(Sony PlayStation MDEC (Motion DECoder))
mimic(Mimic)
mjpeg(MJPEG (Motion JPEG))
        hw-accel: AV_PIX_FMT_CUDA, type: AV_HWDEVICE_TYPE_CUDA, decoder: 1, encoder: 0
mjpegb(Apple MJPEG-B)
mmvideo(American Laser Games MM Video)
mobiclip(MobiClip Video)
motionpixels(Motion Pixels video)
mpeg1video(MPEG-1 video)
        hw-accel: AV_PIX_FMT_CUDA, type: AV_HWDEVICE_TYPE_CUDA, decoder: 1, encoder: 0
mpeg2video(MPEG-2 video)
        hw-accel: AV_PIX_FMT_DXVA2_VLD, type: AV_HWDEVICE_TYPE_DXVA2, decoder: 1, encoder: 0
        hw-accel: AV_PIX_FMT_D3D11, type: AV_HWDEVICE_TYPE_D3D11VA, decoder: 1, encoder: 0
        hw-accel: AV_PIX_FMT_CUDA, type: AV_HWDEVICE_TYPE_CUDA, decoder: 1, encoder: 0
mpeg4(MPEG-4 part 2)
        hw-accel: AV_PIX_FMT_CUDA, type: AV_HWDEVICE_TYPE_CUDA, decoder: 1, encoder: 0
mpegvideo(MPEG-1 video)
msa1(MS ATC Screen)
msmpeg4v1(MPEG-4 part 2 Microsoft variant version 1)
msmpeg4v2(MPEG-4 part 2 Microsoft variant version 2)
msmpeg4(MPEG-4 part 2 Microsoft variant version 3)
msp2(Microsoft Paint (MSP) version 2)
msrle(Microsoft RLE)
mss1(MS Screen 1)
mss2(MS Windows Media Video V9 Screen)
msvideo1(Microsoft Video 1)
mszh(LCL (LossLess Codec Library) MSZH)
mts2(MS Expression Encoder Screen)
mv30(MidiVid 3.0)
mvc1(Silicon Graphics Motion Video Compressor 1)
mvc2(Silicon Graphics Motion Video Compressor 2)
mvdv(MidiVid VQ)
mxpeg(Mobotix MxPEG video)
notchlc(NotchLC)
nuv(NuppelVideo/RTJPEG)
paf_video(Amazing Studio Packed Animation File Video)
pam(PAM (Portable AnyMap) image)
pbm(PBM (Portable BitMap) image)
pcx(PC Paintbrush PCX image)
pfm(PFM (Portable FloatMap) image)
pgm(PGM (Portable GrayMap) image)
pgmyuv(PGMYUV (Portable GrayMap YUV) image)
pgx(PGX (JPEG2000 Test Format))
photocd(Kodak Photo CD)
pictor(Pictor/PC Paint)
pixlet(Apple Pixlet)
ppm(PPM (Portable PixelMap) image)
prores(Apple ProRes (iCodec Pro))
prosumer(Brooktree ProSumer Video)
psd(Photoshop PSD file)
ptx(V.Flash PTX image)
qdraw(Apple QuickDraw)
qpeg(Q-team QPEG)
qtrle(QuickTime Animation (RLE) video)
r10k(AJA Kona 10-bit RGB Codec)
r210(Uncompressed RGB 10-bit)
rawvideo(raw video)
rl2(RL2 video)
roqvideo(id RoQ video)
rpza(QuickTime video (RPZA))
rv10(RealVideo 1.0)
rv20(RealVideo 2.0)
rv30(RealVideo 3.0)
rv40(RealVideo 4.0)
s302m(SMPTE 302M)
sanm(LucasArts SANM/Smush video)
scpr(ScreenPressor)
sga(Digital Pictures SGA Video)
sgi(SGI image)
sgirle(Silicon Graphics RLE 8-bit video)
sheervideo(BitJazz SheerVideo)
simbiosis_imx(Simbiosis Interactive IMX Video)
smackvid(Smacker video)
smc(QuickTime Graphics (SMC))
smvjpeg(SMV JPEG)
snow(Snow)
sp5x(Sunplus JPEG (SP5X))
speedhq(NewTek SpeedHQ)
sunrast(Sun Rasterfile image)
svq1(Sorenson Vector Quantizer 1 / Sorenson Video 1 / SVQ1)
svq3(Sorenson Vector Quantizer 3 / Sorenson Video 3 / SVQ3)
targa(Truevision Targa image)
targa_y216(Pinnacle TARGA CineWave YUV16)
theora(Theora)
thp(Nintendo Gamecube THP video)
tiertexseqvideo(Tiertex Limited SEQ video)
tiff(TIFF image)
tmv(8088flex TMV)
truemotion1(Duck TrueMotion 1.0)
truemotion2(Duck TrueMotion 2.0)
truemotion2rt(Duck TrueMotion 2.0 Real Time)
tscc2(TechSmith Screen Codec 2)
txd(Renderware TXD (TeXture Dictionary) image)
ultimotion(IBM UltiMotion)
utvideo(Ut Video)
v210(Uncompressed 4:2:2 10-bit)
v210x(Uncompressed 4:2:2 10-bit)
v308(Uncompressed packed 4:4:4)
v408(Uncompressed packed QT 4:4:4:4)
v410(Uncompressed 4:4:4 10-bit)
vb(Beam Software VB)
vble(VBLE Lossless Codec)
vc1(SMPTE VC-1)
        hw-accel: AV_PIX_FMT_DXVA2_VLD, type: AV_HWDEVICE_TYPE_DXVA2, decoder: 1, encoder: 0
        hw-accel: AV_PIX_FMT_D3D11, type: AV_HWDEVICE_TYPE_D3D11VA, decoder: 1, encoder: 0
        hw-accel: AV_PIX_FMT_CUDA, type: AV_HWDEVICE_TYPE_CUDA, decoder: 1, encoder: 0
vc1image(Windows Media Video 9 Image v2)
vcr1(ATI VCR1)
vmdvideo(Sierra VMD video)
vmnc(VMware Screen Codec / VMware Video)
vp3(On2 VP3)
vp4(On2 VP4)
vp5(On2 VP5)
vp6(On2 VP6)
vp6a(On2 VP6 (Flash version, with alpha channel))
vp6f(On2 VP6 (Flash version))
vp7(On2 VP7)
vp8(On2 VP8)
        hw-accel: AV_PIX_FMT_CUDA, type: AV_HWDEVICE_TYPE_CUDA, decoder: 1, encoder: 0
vp9(Google VP9)
        hw-accel: AV_PIX_FMT_DXVA2_VLD, type: AV_HWDEVICE_TYPE_DXVA2, decoder: 1, encoder: 0
        hw-accel: AV_PIX_FMT_D3D11, type: AV_HWDEVICE_TYPE_D3D11VA, decoder: 1, encoder: 0
        hw-accel: AV_PIX_FMT_CUDA, type: AV_HWDEVICE_TYPE_CUDA, decoder: 1, encoder: 0
vqavideo(Westwood Studios VQA (Vector Quantized Animation) video)
webp(WebP image)
wrapped_avframe(AVPacket to AVFrame passthrough)
wmv1(Windows Media Video 7)
wmv2(Windows Media Video 8)
wmv3(Windows Media Video 9)
        hw-accel: AV_PIX_FMT_DXVA2_VLD, type: AV_HWDEVICE_TYPE_DXVA2, decoder: 1, encoder: 0
        hw-accel: AV_PIX_FMT_D3D11, type: AV_HWDEVICE_TYPE_D3D11VA, decoder: 1, encoder: 0
        hw-accel: AV_PIX_FMT_CUDA, type: AV_HWDEVICE_TYPE_CUDA, decoder: 1, encoder: 0
wmv3image(Windows Media Video 9 Image)
wnv1(Winnov WNV1)
xan_wc3(Wing Commander III / Xan)
xan_wc4(Wing Commander IV / Xxan)
xbm(XBM (X BitMap) image)
xface(X-face image)
xl(Miro VideoXL)
xpm(XPM (X PixMap) image)
xwd(XWD (X Window Dump) image)
y41p(Uncompressed YUV 4:1:1 12-bit)
ylc(YUY2 Lossless Codec)
yop(Psygnosis YOP Video)
yuv4(Uncompressed packed 4:2:0)
012v(Uncompressed 4:2:2 10-bit)
aac(AAC (Advanced Audio Coding))
aac_fixed(AAC (Advanced Audio Coding))
aac_latm(AAC LATM (Advanced Audio Coding LATM syntax))
ac3(ATSC A/52A (AC-3))
ac3_fixed(ATSC A/52A (AC-3))
acelp.kelvin(Sipro ACELP.KELVIN)
alac(ALAC (Apple Lossless Audio Codec))
als(MPEG-4 Audio Lossless Coding (ALS))
amrnb(AMR-NB (Adaptive Multi-Rate NarrowBand))
amrwb(AMR-WB (Adaptive Multi-Rate WideBand))
ape(Monkey's Audio)
aptx(aptX (Audio Processing Technology for Bluetooth))
aptx_hd(aptX HD (Audio Processing Technology for Bluetooth))
atrac1(ATRAC1 (Adaptive TRansform Acoustic Coding))
atrac3(ATRAC3 (Adaptive TRansform Acoustic Coding 3))
atrac3al(ATRAC3 AL (Adaptive TRansform Acoustic Coding 3 Advanced Lossless))
atrac3plus(ATRAC3+ (Adaptive TRansform Acoustic Coding 3+))
atrac3plusal(ATRAC3+ AL (Adaptive TRansform Acoustic Coding 3+ Advanced Lossless))
atrac9(ATRAC9 (Adaptive TRansform Acoustic Coding 9))
binkaudio_dct(Bink Audio (DCT))
binkaudio_rdft(Bink Audio (RDFT))
bmv_audio(Discworld II BMV audio)
cook(Cook / Cooker / Gecko (RealAudio G2))
dca(DCA (DTS Coherent Acoustics))
dolby_e(Dolby E)
dsd_lsbf(DSD (Direct Stream Digital), least significant bit first)
dsd_msbf(DSD (Direct Stream Digital), most significant bit first)
dsd_lsbf_planar(DSD (Direct Stream Digital), least significant bit first, planar)
dsd_msbf_planar(DSD (Direct Stream Digital), most significant bit first, planar)
dsicinaudio(Delphine Software International CIN audio)
dss_sp(Digital Speech Standard - Standard Play mode (DSS SP))
dst(DST (Digital Stream Transfer))
eac3(ATSC A/52B (AC-3, E-AC-3))
evrc(EVRC (Enhanced Variable Rate Codec))
fastaudio(MobiClip FastAudio)
wavesynth(Wave synthesis pseudo-codec)
flac(FLAC (Free Lossless Audio Codec))
g723_1(G.723.1)
g729(G.729)
gsm(GSM)
gsm_ms(GSM Microsoft variant)
hca(CRI HCA)
hcom(HCOM Audio)
iac(IAC (Indeo Audio Coder))
ilbc(iLBC (Internet Low Bitrate Codec))
imc(IMC (Intel Music Coder))
interplayacm(Interplay ACM)
mace3(MACE (Macintosh Audio Compression/Expansion) 3:1)
mace6(MACE (Macintosh Audio Compression/Expansion) 6:1)
metasound(Voxware MetaSound)
mlp(MLP (Meridian Lossless Packing))
mp1(MP1 (MPEG audio layer 1))
mp1float(MP1 (MPEG audio layer 1))
mp2(MP2 (MPEG audio layer 2))
mp2float(MP2 (MPEG audio layer 2))
mp3float(MP3 (MPEG audio layer 3))
mp3(MP3 (MPEG audio layer 3))
mp3adufloat(ADU (Application Data Unit) MP3 (MPEG audio layer 3))
mp3adu(ADU (Application Data Unit) MP3 (MPEG audio layer 3))
mp3on4float(MP3onMP4)
mp3on4(MP3onMP4)
mpc7(Musepack SV7)
mpc8(Musepack SV8)
nellymoser(Nellymoser Asao)
on2avc(On2 Audio for Video Codec)
opus(Opus)
paf_audio(Amazing Studio Packed Animation File Audio)
qcelp(QCELP / PureVoice)
qdm2(QDesign Music Codec 2)
qdmc(QDesign Music Codec 1)
real_144(RealAudio 1.0 (14.4K))
real_288(RealAudio 2.0 (28.8K))
ralf(RealAudio Lossless)
sbc(SBC (low-complexity subband codec))
shorten(Shorten)
sipr(RealAudio SIPR / ACELP.NET)
siren(Siren)
smackaud(Smacker audio)
sonic(Sonic)
tak(TAK (Tom's lossless Audio Kompressor))
truehd(TrueHD)
truespeech(DSP Group TrueSpeech)
tta(TTA (True Audio))
twinvq(VQF TwinVQ)
vmdaudio(Sierra VMD audio)
vorbis(Vorbis)
wavpack(WavPack)
wmalossless(Windows Media Audio Lossless)
wmapro(Windows Media Audio 9 Professional)
wmav1(Windows Media Audio 1)
wmav2(Windows Media Audio 2)
wmavoice(Windows Media Audio Voice)
ws_snd1(Westwood Audio (SND1))
xma1(Xbox Media Audio 1)
xma2(Xbox Media Audio 2)
pcm_alaw(PCM A-law / G.711 A-law)
pcm_bluray(PCM signed 16|20|24-bit big-endian for Blu-ray media)
pcm_dvd(PCM signed 16|20|24-bit big-endian for DVD media)
pcm_f16le(PCM 16.8 floating point little-endian)
pcm_f24le(PCM 24.0 floating point little-endian)
pcm_f32be(PCM 32-bit floating point big-endian)
pcm_f32le(PCM 32-bit floating point little-endian)
pcm_f64be(PCM 64-bit floating point big-endian)
pcm_f64le(PCM 64-bit floating point little-endian)
pcm_lxf(PCM signed 20-bit little-endian planar)
pcm_mulaw(PCM mu-law / G.711 mu-law)
pcm_s8(PCM signed 8-bit)
pcm_s8_planar(PCM signed 8-bit planar)
pcm_s16be(PCM signed 16-bit big-endian)
pcm_s16be_planar(PCM signed 16-bit big-endian planar)
pcm_s16le(PCM signed 16-bit little-endian)
pcm_s16le_planar(PCM signed 16-bit little-endian planar)
pcm_s24be(PCM signed 24-bit big-endian)
pcm_s24daud(PCM D-Cinema audio signed 24-bit)
pcm_s24le(PCM signed 24-bit little-endian)
pcm_s24le_planar(PCM signed 24-bit little-endian planar)
pcm_s32be(PCM signed 32-bit big-endian)
pcm_s32le(PCM signed 32-bit little-endian)
pcm_s32le_planar(PCM signed 32-bit little-endian planar)
pcm_s64be(PCM signed 64-bit big-endian)
pcm_s64le(PCM signed 64-bit little-endian)
pcm_sga(PCM SGA)
pcm_u8(PCM unsigned 8-bit)
pcm_u16be(PCM unsigned 16-bit big-endian)
pcm_u16le(PCM unsigned 16-bit little-endian)
pcm_u24be(PCM unsigned 24-bit big-endian)
pcm_u24le(PCM unsigned 24-bit little-endian)
pcm_u32be(PCM unsigned 32-bit big-endian)
pcm_u32le(PCM unsigned 32-bit little-endian)
pcm_vidc(PCM Archimedes VIDC)
derf_dpcm(DPCM Xilam DERF)
gremlin_dpcm(DPCM Gremlin)
interplay_dpcm(DPCM Interplay)
roq_dpcm(DPCM id RoQ)
sdx2_dpcm(DPCM Squareroot-Delta-Exact)
sol_dpcm(DPCM Sol)
xan_dpcm(DPCM Xan)
adpcm_4xm(ADPCM 4X Movie)
adpcm_adx(SEGA CRI ADX ADPCM)
adpcm_afc(ADPCM Nintendo Gamecube AFC)
adpcm_agm(ADPCM AmuseGraphics Movie)
adpcm_aica(ADPCM Yamaha AICA)
adpcm_argo(ADPCM Argonaut Games)
adpcm_ct(ADPCM Creative Technology)
adpcm_dtk(ADPCM Nintendo Gamecube DTK)
adpcm_ea(ADPCM Electronic Arts)
adpcm_ea_maxis_xa(ADPCM Electronic Arts Maxis CDROM XA)
adpcm_ea_r1(ADPCM Electronic Arts R1)
adpcm_ea_r2(ADPCM Electronic Arts R2)
adpcm_ea_r3(ADPCM Electronic Arts R3)
adpcm_ea_xas(ADPCM Electronic Arts XAS)
g722(G.722 ADPCM)
g726(G.726 ADPCM)
g726le(G.726 ADPCM little-endian)
adpcm_ima_amv(ADPCM IMA AMV)
adpcm_ima_alp(ADPCM IMA High Voltage Software ALP)
adpcm_ima_apc(ADPCM IMA CRYO APC)
adpcm_ima_apm(ADPCM IMA Ubisoft APM)
adpcm_ima_cunning(ADPCM IMA Cunning Developments)
adpcm_ima_dat4(ADPCM IMA Eurocom DAT4)
adpcm_ima_dk3(ADPCM IMA Duck DK3)
adpcm_ima_dk4(ADPCM IMA Duck DK4)
adpcm_ima_ea_eacs(ADPCM IMA Electronic Arts EACS)
adpcm_ima_ea_sead(ADPCM IMA Electronic Arts SEAD)
adpcm_ima_iss(ADPCM IMA Funcom ISS)
adpcm_ima_moflex(ADPCM IMA MobiClip MOFLEX)
adpcm_ima_mtf(ADPCM IMA Capcom's MT Framework)
adpcm_ima_oki(ADPCM IMA Dialogic OKI)
adpcm_ima_qt(ADPCM IMA QuickTime)
adpcm_ima_rad(ADPCM IMA Radical)
adpcm_ima_ssi(ADPCM IMA Simon & Schuster Interactive)
adpcm_ima_smjpeg(ADPCM IMA Loki SDL MJPEG)
adpcm_ima_wav(ADPCM IMA WAV)
adpcm_ima_ws(ADPCM IMA Westwood)
adpcm_ms(ADPCM Microsoft)
adpcm_mtaf(ADPCM MTAF)
adpcm_psx(ADPCM Playstation)
adpcm_sbpro_2(ADPCM Sound Blaster Pro 2-bit)
adpcm_sbpro_3(ADPCM Sound Blaster Pro 2.6-bit)
adpcm_sbpro_4(ADPCM Sound Blaster Pro 4-bit)
adpcm_swf(ADPCM Shockwave Flash)
adpcm_thp(ADPCM Nintendo THP)
adpcm_thp_le(ADPCM Nintendo THP (little-endian))
adpcm_vima(LucasArts VIMA audio)
adpcm_xa(ADPCM CDROM XA)
adpcm_yamaha(ADPCM Yamaha)
adpcm_zork(ADPCM Zork)
ssa(ASS (Advanced SubStation Alpha) subtitle)
ass(ASS (Advanced SubStation Alpha) subtitle)
cc_dec(Closed Caption (EIA-608 / CEA-708))
dvbsub(DVB subtitles)
dvdsub(DVD subtitles)
jacosub(JACOsub subtitle)
microdvd(MicroDVD subtitle)
mov_text(3GPP Timed Text subtitle)
mpl2(MPL2 subtitle)
pgssub(HDMV Presentation Graphic Stream subtitles)
pjs(PJS subtitle)
realtext(RealText subtitle)
sami(SAMI subtitle)
srt(SubRip subtitle)
stl(Spruce subtitle format)
subrip(SubRip subtitle)
subviewer(SubViewer subtitle)
subviewer1(SubViewer1 subtitle)
text(Raw text subtitle)
vplayer(VPlayer subtitle)
webvtt(WebVTT subtitle)
xsub(XSUB)
bintext(Binary text)
xbin(eXtended BINary text)
idf(iCEDraw text)
av1(Alliance for Open Media AV1)
        hw-accel: AV_PIX_FMT_DXVA2_VLD, type: AV_HWDEVICE_TYPE_DXVA2, decoder: 1, encoder: 0
        hw-accel: AV_PIX_FMT_D3D11, type: AV_HWDEVICE_TYPE_D3D11VA, decoder: 1, encoder: 0
        hw-accel: AV_PIX_FMT_CUDA, type: AV_HWDEVICE_TYPE_CUDA, decoder: 1, encoder: 0
av1_cuvid(Nvidia CUVID AV1 decoder)
        hw-accel: AV_PIX_FMT_CUDA, type: AV_HWDEVICE_TYPE_CUDA, decoder: 1, encoder: 0
h264_cuvid(Nvidia CUVID H264 decoder)
        hw-accel: AV_PIX_FMT_CUDA, type: AV_HWDEVICE_TYPE_CUDA, decoder: 1, encoder: 0
hevc_cuvid(Nvidia CUVID HEVC decoder)
        hw-accel: AV_PIX_FMT_CUDA, type: AV_HWDEVICE_TYPE_CUDA, decoder: 1, encoder: 0
mjpeg_cuvid(Nvidia CUVID MJPEG decoder)
        hw-accel: AV_PIX_FMT_CUDA, type: AV_HWDEVICE_TYPE_CUDA, decoder: 1, encoder: 0
mpeg1_cuvid(Nvidia CUVID MPEG1VIDEO decoder)
        hw-accel: AV_PIX_FMT_CUDA, type: AV_HWDEVICE_TYPE_CUDA, decoder: 1, encoder: 0
mpeg2_cuvid(Nvidia CUVID MPEG2VIDEO decoder)
        hw-accel: AV_PIX_FMT_CUDA, type: AV_HWDEVICE_TYPE_CUDA, decoder: 1, encoder: 0
mpeg4_cuvid(Nvidia CUVID MPEG4 decoder)
        hw-accel: AV_PIX_FMT_CUDA, type: AV_HWDEVICE_TYPE_CUDA, decoder: 1, encoder: 0
vc1_cuvid(Nvidia CUVID VC1 decoder)
        hw-accel: AV_PIX_FMT_CUDA, type: AV_HWDEVICE_TYPE_CUDA, decoder: 1, encoder: 0
vp8_cuvid(Nvidia CUVID VP8 decoder)
        hw-accel: AV_PIX_FMT_CUDA, type: AV_HWDEVICE_TYPE_CUDA, decoder: 1, encoder: 0
vp9_cuvid(Nvidia CUVID VP9 decoder)
        hw-accel: AV_PIX_FMT_CUDA, type: AV_HWDEVICE_TYPE_CUDA, decoder: 1, encoder: 0
*/

"h264_qsv" 항목은 존재하지 않습니다.




그래서, "ffmpeg.exe - Intel Quick Sync Video(qsv)를 이용한 인코딩" 글에서 설명한 CODEX FFMPEG에서 배포하는 DLL을 사용할 텐데요,

avcodec-59.dll (68,380KB)
avdevice-59.dll (3,467KB)
avfilter-8.dll (35,881KB)
avformat-59.dll (15,174KB)
avutil-57.dll (941KB)
postproc-56.dll (131KB)
swresample-4.dll (424KB)
swscale-6.dll (589KB)

와~~~ 용량부터 차이가 큽니다. ^^; vcpkg 빌드의 avcodec-58.dll은 겨우 17MB에 불과한데 저건 68MB나 됩니다. 어쨌든, 이걸로 실행하면 av_hwdevice_iterate_types 열거에서 qsv 항목도 잘 출력이 되고,

cuda
dxva2
qsv
d3d11va
opencl
vulkan

av_codec_iterate를 호출한 결과에서도,

a64multi(Multicolor charset for Commodore 64)
a64multi5(Multicolor charset for Commodore 64, extended with 5th color (colram))
alias_pix(Alias/Wavefront PIX image)
amv(AMV Video)
apng(APNG (Animated Portable Network Graphics) image)
asv1(ASUS V1)
asv2(ASUS V2)
avrp(Avid 1:1 10-bit RGB Packer)
avui(Avid Meridien Uncompressed)
ayuv(Uncompressed packed MS 4:4:4:4)
bitpacked(Bitpacked)
bmp(BMP (Windows and OS/2 bitmap))
cfhd(GoPro CineForm HD)
cinepak(Cinepak)
cljr(Cirrus Logic AccuPak)
comfortnoise(RFC 3389 comfort noise generator)
dnxhd(VC3/DNxHD)
dpx(DPX (Digital Picture Exchange) image)
dvvideo(DV (Digital Video))
exr(OpenEXR image)
ffv1(FFmpeg video codec #1)
ffvhuff(Huffyuv FFmpeg variant)
fits(Flexible Image Transport System)
flashsv(Flash Screen Video)
flashsv2(Flash Screen Video Version 2)
flv(FLV / Sorenson Spark / Sorenson H.263 (Flash Video))
gif(GIF (Graphics Interchange Format))
h261(H.261)
h263(H.263 / H.263-1996)
h263p(H.263+ / H.263-1998 / H.263 version 2)
hap(Vidvox Hap)
huffyuv(Huffyuv / HuffYUV)
jpeg2000(JPEG 2000)
jpegls(JPEG-LS)
ljpeg(Lossless JPEG)
magicyuv(MagicYUV video)
mjpeg(MJPEG (Motion JPEG))
mpeg1video(MPEG-1 video)
mpeg2video(MPEG-2 video)
mpeg4(MPEG-4 part 2)
msmpeg4v2(MPEG-4 part 2 Microsoft variant version 2)
msmpeg4(MPEG-4 part 2 Microsoft variant version 3)
msvideo1(Microsoft Video-1)
pam(PAM (Portable AnyMap) image)
pbm(PBM (Portable BitMap) image)
pcx(PC Paintbrush PCX image)
pfm(PFM (Portable FloatMap) image)
pgm(PGM (Portable GrayMap) image)
pgmyuv(PGMYUV (Portable GrayMap YUV) image)
png(PNG (Portable Network Graphics) image)
ppm(PPM (Portable PixelMap) image)
prores(Apple ProRes)
prores_aw(Apple ProRes)
prores_ks(Apple ProRes (iCodec Pro))
qtrle(QuickTime Animation (RLE) video)
r10k(AJA Kona 10-bit RGB Codec)
r210(Uncompressed RGB 10-bit)
rawvideo(raw video)
roqvideo(id RoQ video)
rpza(QuickTime video (RPZA))
rv10(RealVideo 1.0)
rv20(RealVideo 2.0)
s302m(SMPTE 302M)
sgi(SGI image)
smc(QuickTime Graphics (SMC))
snow(Snow)
speedhq(NewTek SpeedHQ)
sunrast(Sun Rasterfile image)
svq1(Sorenson Vector Quantizer 1 / Sorenson Video 1 / SVQ1)
targa(Truevision Targa image)
tiff(TIFF image)
utvideo(Ut Video)
v210(Uncompressed 4:2:2 10-bit)
v308(Uncompressed packed 4:4:4)
v408(Uncompressed packed QT 4:4:4:4)
v410(Uncompressed 4:4:4 10-bit)
vc2(SMPTE VC-2)
wrapped_avframe(AVFrame to AVPacket passthrough)
wmv1(Windows Media Video 7)
wmv2(Windows Media Video 8)
xbm(XBM (X BitMap) image)
xface(X-face image)
xwd(XWD (X Window Dump) image)
y41p(Uncompressed YUV 4:1:1 12-bit)
yuv4(Uncompressed packed 4:2:0)
zlib(LCL (LossLess Codec Library) ZLIB)
zmbv(Zip Motion Blocks Video)
aac(AAC (Advanced Audio Coding))
ac3(ATSC A/52A (AC-3))
ac3_fixed(ATSC A/52A (AC-3))
alac(ALAC (Apple Lossless Audio Codec))
aptx(aptX (Audio Processing Technology for Bluetooth))
aptx_hd(aptX HD (Audio Processing Technology for Bluetooth))
dca(DCA (DTS Coherent Acoustics))
eac3(ATSC A/52 E-AC-3)
flac(FLAC (Free Lossless Audio Codec))
g723_1(G.723.1)
mlp(MLP (Meridian Lossless Packing))
mp2(MP2 (MPEG audio layer 2))
mp2fixed(MP2 fixed point (MPEG audio layer 2))
nellymoser(Nellymoser Asao)
opus(Opus)
real_144(RealAudio 1.0 (14.4K))
sbc(SBC (low-complexity subband codec))
sonic(Sonic)
sonicls(Sonic lossless)
truehd(TrueHD)
tta(TTA (True Audio))
vorbis(Vorbis)
wavpack(WavPack)
wmav1(Windows Media Audio 1)
wmav2(Windows Media Audio 2)
pcm_alaw(PCM A-law / G.711 A-law)
pcm_dvd(PCM signed 16|20|24-bit big-endian for DVD media)
pcm_f32be(PCM 32-bit floating point big-endian)
pcm_f32le(PCM 32-bit floating point little-endian)
pcm_f64be(PCM 64-bit floating point big-endian)
pcm_f64le(PCM 64-bit floating point little-endian)
pcm_mulaw(PCM mu-law / G.711 mu-law)
pcm_s8(PCM signed 8-bit)
pcm_s8_planar(PCM signed 8-bit planar)
pcm_s16be(PCM signed 16-bit big-endian)
pcm_s16be_planar(PCM signed 16-bit big-endian planar)
pcm_s16le(PCM signed 16-bit little-endian)
pcm_s16le_planar(PCM signed 16-bit little-endian planar)
pcm_s24be(PCM signed 24-bit big-endian)
pcm_s24daud(PCM D-Cinema audio signed 24-bit)
pcm_s24le(PCM signed 24-bit little-endian)
pcm_s24le_planar(PCM signed 24-bit little-endian planar)
pcm_s32be(PCM signed 32-bit big-endian)
pcm_s32le(PCM signed 32-bit little-endian)
pcm_s32le_planar(PCM signed 32-bit little-endian planar)
pcm_s64be(PCM signed 64-bit big-endian)
pcm_s64le(PCM signed 64-bit little-endian)
pcm_u8(PCM unsigned 8-bit)
pcm_u16be(PCM unsigned 16-bit big-endian)
pcm_u16le(PCM unsigned 16-bit little-endian)
pcm_u24be(PCM unsigned 24-bit big-endian)
pcm_u24le(PCM unsigned 24-bit little-endian)
pcm_u32be(PCM unsigned 32-bit big-endian)
pcm_u32le(PCM unsigned 32-bit little-endian)
pcm_vidc(PCM Archimedes VIDC)
roq_dpcm(id RoQ DPCM)
adpcm_adx(SEGA CRI ADX ADPCM)
adpcm_argo(ADPCM Argonaut Games)
g722(G.722 ADPCM)
g726(G.726 ADPCM)
g726le(G.726 little endian ADPCM ("right-justified"))
adpcm_ima_amv(ADPCM IMA AMV)
adpcm_ima_alp(ADPCM IMA High Voltage Software ALP)
adpcm_ima_apm(ADPCM IMA Ubisoft APM)
adpcm_ima_qt(ADPCM IMA QuickTime)
adpcm_ima_ssi(ADPCM IMA Simon & Schuster Interactive)
adpcm_ima_wav(ADPCM IMA WAV)
adpcm_ima_ws(ADPCM IMA Westwood)
adpcm_ms(ADPCM Microsoft)
adpcm_swf(ADPCM Shockwave Flash)
adpcm_yamaha(ADPCM Yamaha)
ssa(ASS (Advanced SubStation Alpha) subtitle)
ass(ASS (Advanced SubStation Alpha) subtitle)
dvbsub(DVB subtitles)
dvdsub(DVD subtitles)
mov_text(3GPP Timed Text subtitle)
srt(SubRip subtitle)
subrip(SubRip subtitle)
text(Raw text subtitle)
ttml(TTML subtitle)
webvtt(WebVTT subtitle)
xsub(DivX subtitles (XSUB))
libaom-av1(libaom AV1)
libgsm(libgsm GSM)
libgsm_ms(libgsm GSM Microsoft variant)
libilbc(iLBC (Internet Low Bitrate Codec))
libmp3lame(libmp3lame MP3 (MPEG audio layer 3))
libopencore_amrnb(OpenCORE AMR-NB (Adaptive Multi-Rate Narrow-Band))
libopenjpeg(OpenJPEG JPEG 2000)
libopus(libopus Opus)
librav1e(librav1e AV1)
libshine(libshine MP3 (MPEG audio layer 3))
libspeex(libspeex Speex)
libsvtav1(SVT-AV1(Scalable Video Technology for AV1) encoder)
libtheora(libtheora Theora)
libtwolame(libtwolame MP2 (MPEG audio layer 2))
libvo_amrwbenc(Android VisualOn AMR-WB (Adaptive Multi-Rate Wide-Band))
libvorbis(libvorbis)
libvpx(libvpx VP8)
libvpx-vp9(libvpx VP9)
libwebp_anim(libwebp WebP image)
libwebp(libwebp WebP image)
libx264(libx264 H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10)
libx264rgb(libx264 H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10 RGB)
libx265(libx265 H.265 / HEVC)
libxavs2(libxavs2 AVS2-P2/IEEE1857.4)
libxvid(libxvidcore MPEG-4 part 2)
aac_mf(AAC via MediaFoundation)
ac3_mf(AC3 via MediaFoundation)
h264_amf(AMD AMF H.264 Encoder)
        hw-accel: AV_PIX_FMT_NONE, type: AV_HWDEVICE_TYPE_D3D11VA, decoder: 0, encoder: 1
        hw-accel: AV_PIX_FMT_NONE, type: AV_HWDEVICE_TYPE_DXVA2, decoder: 0, encoder: 1
h264_mf(H264 via MediaFoundation)
h264_nvenc(NVIDIA NVENC H.264 encoder)
        hw-accel: AV_PIX_FMT_NONE, type: AV_HWDEVICE_TYPE_CUDA, decoder: 0, encoder: 1
        hw-accel: AV_PIX_FMT_NONE, type: AV_HWDEVICE_TYPE_D3D11VA, decoder: 0, encoder: 1
h264_qsv(H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10 (Intel Quick Sync Video acceleration))
        hw-accel: AV_PIX_FMT_NV12, type: AV_HWDEVICE_TYPE_QSV, decoder: 0, encoder: 1
        hw-accel: AV_PIX_FMT_P010LE, type: AV_HWDEVICE_TYPE_QSV, decoder: 0, encoder: 1
hevc_amf(AMD AMF HEVC encoder)
        hw-accel: AV_PIX_FMT_NONE, type: AV_HWDEVICE_TYPE_D3D11VA, decoder: 0, encoder: 1
        hw-accel: AV_PIX_FMT_NONE, type: AV_HWDEVICE_TYPE_DXVA2, decoder: 0, encoder: 1
hevc_mf(HEVC via MediaFoundation)
hevc_nvenc(NVIDIA NVENC hevc encoder)
        hw-accel: AV_PIX_FMT_NONE, type: AV_HWDEVICE_TYPE_CUDA, decoder: 0, encoder: 1
        hw-accel: AV_PIX_FMT_NONE, type: AV_HWDEVICE_TYPE_D3D11VA, decoder: 0, encoder: 1
hevc_qsv(HEVC (Intel Quick Sync Video acceleration))
        hw-accel: AV_PIX_FMT_NV12, type: AV_HWDEVICE_TYPE_QSV, decoder: 0, encoder: 1
        hw-accel: AV_PIX_FMT_P010LE, type: AV_HWDEVICE_TYPE_QSV, decoder: 0, encoder: 1
mjpeg_qsv(MJPEG (Intel Quick Sync Video acceleration))
        hw-accel: AV_PIX_FMT_NV12, type: AV_HWDEVICE_TYPE_QSV, decoder: 0, encoder: 1
        hw-accel: AV_PIX_FMT_P010LE, type: AV_HWDEVICE_TYPE_QSV, decoder: 0, encoder: 1
mp3_mf(MP3 via MediaFoundation)
mpeg2_qsv(MPEG-2 video (Intel Quick Sync Video acceleration))
        hw-accel: AV_PIX_FMT_NV12, type: AV_HWDEVICE_TYPE_QSV, decoder: 0, encoder: 1
        hw-accel: AV_PIX_FMT_P010LE, type: AV_HWDEVICE_TYPE_QSV, decoder: 0, encoder: 1
vp9_qsv(VP9 video (Intel Quick Sync Video acceleration))
        hw-accel: AV_PIX_FMT_NV12, type: AV_HWDEVICE_TYPE_QSV, decoder: 0, encoder: 1
        hw-accel: AV_PIX_FMT_P010LE, type: AV_HWDEVICE_TYPE_QSV, decoder: 0, encoder: 1
aasc(Autodesk RLE)
aic(Apple Intermediate Codec)
alias_pix(Alias/Wavefront PIX image)
agm(Amuse Graphics Movie)
amv(AMV Video)
anm(Deluxe Paint Animation)
ansi(ASCII/ANSI art)
apng(APNG (Animated Portable Network Graphics) image)
arbc(Gryphon's Anim Compressor)
argo(Argonaut Games Video)
asv1(ASUS V1)
asv2(ASUS V2)
aura(Auravision AURA)
aura2(Auravision Aura 2)
avrp(Avid 1:1 10-bit RGB Packer)
avrn(Avid AVI Codec)
avs(AVS (Audio Video Standard) video)
avui(Avid Meridien Uncompressed)
ayuv(Uncompressed packed MS 4:4:4:4)
bethsoftvid(Bethesda VID video)
bfi(Brute Force & Ignorance)
binkvideo(Bink video)
bitpacked(Bitpacked)
bmp(BMP (Windows and OS/2 bitmap))
bmv_video(Discworld II BMV video)
brender_pix(BRender PIX image)
c93(Interplay C93)
cavs(Chinese AVS (Audio Video Standard) (AVS1-P2, JiZhun profile))
cdgraphics(CD Graphics video)
cdtoons(CDToons video)
cdxl(Commodore CDXL video)
cfhd(GoPro CineForm HD)
cinepak(Cinepak)
clearvideo(Iterated Systems ClearVideo)
cljr(Cirrus Logic AccuPak)
cllc(Canopus Lossless Codec)
comfortnoise(RFC 3389 comfort noise generator)
cpia(CPiA video format)
cri(Cintel RAW)
camstudio(CamStudio)
cyuv(Creative YUV (CYUV))
dds(DirectDraw Surface image decoder)
dfa(Chronomaster DFA)
dirac(BBC Dirac VC-2)
dnxhd(VC3/DNxHD)
dpx(DPX (Digital Picture Exchange) image)
dsicinvideo(Delphine Software International CIN video)
dvaudio(Ulead DV Audio)
dvvideo(DV (Digital Video))
dxa(Feeble Files/ScummVM DXA)
dxtory(Dxtory)
dxv(Resolume DXV)
eacmv(Electronic Arts CMV video)
eamad(Electronic Arts Madcow Video)
eatgq(Electronic Arts TGQ video)
eatgv(Electronic Arts TGV video)
eatqi(Electronic Arts TQI Video)
8bps(QuickTime 8BPS video)
8svx_exp(8SVX exponential)
8svx_fib(8SVX fibonacci)
escape124(Escape 124)
escape130(Escape 130)
exr(OpenEXR image)
ffv1(FFmpeg video codec #1)
ffvhuff(Huffyuv FFmpeg variant)
fic(Mirillis FIC)
fits(Flexible Image Transport System)
flashsv(Flash Screen Video v1)
flashsv2(Flash Screen Video v2)
flic(Autodesk Animator Flic video)
flv(FLV / Sorenson Spark / Sorenson H.263 (Flash Video))
fmvc(FM Screen Capture Codec)
4xm(4X Movie)
fraps(Fraps)
frwu(Forward Uncompressed)
g2m(Go2Meeting)
gdv(Gremlin Digital Video)
gem(GEM Raster image)
gif(GIF (Graphics Interchange Format))
h261(H.261)
h263(H.263 / H.263-1996, H.263+ / H.263-1998 / H.263 version 2)
        hw-accel: AV_PIX_FMT_CUDA, type: AV_HWDEVICE_TYPE_CUDA, decoder: 1, encoder: 0
h263i(Intel H.263)
h263p(H.263 / H.263-1996, H.263+ / H.263-1998 / H.263 version 2)
        hw-accel: AV_PIX_FMT_CUDA, type: AV_HWDEVICE_TYPE_CUDA, decoder: 1, encoder: 0
h264(H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10)
        hw-accel: AV_PIX_FMT_DXVA2_VLD, type: AV_HWDEVICE_TYPE_DXVA2, decoder: 1, encoder: 0
        hw-accel: AV_PIX_FMT_D3D11, type: AV_HWDEVICE_TYPE_D3D11VA, decoder: 1, encoder: 0
        hw-accel: AV_PIX_FMT_CUDA, type: AV_HWDEVICE_TYPE_CUDA, decoder: 1, encoder: 0
h264_qsv(H264 video (Intel Quick Sync Video acceleration))
        hw-accel: AV_PIX_FMT_QSV, type: AV_HWDEVICE_TYPE_QSV, decoder: 1, encoder: 0
hap(Vidvox Hap)
hevc(HEVC (High Efficiency Video Coding))
        hw-accel: AV_PIX_FMT_DXVA2_VLD, type: AV_HWDEVICE_TYPE_DXVA2, decoder: 1, encoder: 0
        hw-accel: AV_PIX_FMT_D3D11, type: AV_HWDEVICE_TYPE_D3D11VA, decoder: 1, encoder: 0
        hw-accel: AV_PIX_FMT_CUDA, type: AV_HWDEVICE_TYPE_CUDA, decoder: 1, encoder: 0
hevc_qsv(HEVC video (Intel Quick Sync Video acceleration))
        hw-accel: AV_PIX_FMT_QSV, type: AV_HWDEVICE_TYPE_QSV, decoder: 1, encoder: 0
hnm4video(HNM 4 video)
hq_hqa(Canopus HQ/HQA)
hqx(Canopus HQX)
huffyuv(Huffyuv / HuffYUV)
hymt(HuffYUV MT)
idcinvideo(id Quake II CIN video)
iff(IFF ACBM/ANIM/DEEP/ILBM/PBM/RGB8/RGBN)
imm4(Infinity IMM4)
imm5(Infinity IMM5)
indeo2(Intel Indeo 2)
indeo3(Intel Indeo 3)
indeo4(Intel Indeo Video Interactive 4)
indeo5(Intel Indeo Video Interactive 5)
interplayvideo(Interplay MVE video)
ipu(IPU Video)
jpeg2000(JPEG 2000)
jpegls(JPEG-LS)
jv(Bitmap Brothers JV video)
kgv1(Kega Game Video)
kmvc(Karl Morton's video codec)
lagarith(Lagarith lossless)
loco(LOCO)
lscr(LEAD Screen Capture)
m101(Matrox Uncompressed SD)
magicyuv(MagicYUV video)
mdec(Sony PlayStation MDEC (Motion DECoder))
mimic(Mimic)
mjpeg(MJPEG (Motion JPEG))
        hw-accel: AV_PIX_FMT_CUDA, type: AV_HWDEVICE_TYPE_CUDA, decoder: 1, encoder: 0
mjpegb(Apple MJPEG-B)
mmvideo(American Laser Games MM Video)
mobiclip(MobiClip Video)
motionpixels(Motion Pixels video)
mpeg1video(MPEG-1 video)
        hw-accel: AV_PIX_FMT_CUDA, type: AV_HWDEVICE_TYPE_CUDA, decoder: 1, encoder: 0
mpeg2video(MPEG-2 video)
        hw-accel: AV_PIX_FMT_DXVA2_VLD, type: AV_HWDEVICE_TYPE_DXVA2, decoder: 1, encoder: 0
        hw-accel: AV_PIX_FMT_D3D11, type: AV_HWDEVICE_TYPE_D3D11VA, decoder: 1, encoder: 0
        hw-accel: AV_PIX_FMT_CUDA, type: AV_HWDEVICE_TYPE_CUDA, decoder: 1, encoder: 0
mpeg4(MPEG-4 part 2)
        hw-accel: AV_PIX_FMT_CUDA, type: AV_HWDEVICE_TYPE_CUDA, decoder: 1, encoder: 0
mpegvideo(MPEG-1 video)
mpeg2_qsv(MPEG2VIDEO video (Intel Quick Sync Video acceleration))
        hw-accel: AV_PIX_FMT_QSV, type: AV_HWDEVICE_TYPE_QSV, decoder: 1, encoder: 0
msa1(MS ATC Screen)
mscc(Mandsoft Screen Capture Codec)
msmpeg4v1(MPEG-4 part 2 Microsoft variant version 1)
msmpeg4v2(MPEG-4 part 2 Microsoft variant version 2)
msmpeg4(MPEG-4 part 2 Microsoft variant version 3)
msp2(Microsoft Paint (MSP) version 2)
msrle(Microsoft RLE)
mss1(MS Screen 1)
mss2(MS Windows Media Video V9 Screen)
msvideo1(Microsoft Video 1)
mszh(LCL (LossLess Codec Library) MSZH)
mts2(MS Expression Encoder Screen)
mv30(MidiVid 3.0)
mvc1(Silicon Graphics Motion Video Compressor 1)
mvc2(Silicon Graphics Motion Video Compressor 2)
mvdv(MidiVid VQ)
mvha(MidiVid Archive Codec)
mwsc(MatchWare Screen Capture Codec)
mxpeg(Mobotix MxPEG video)
notchlc(NotchLC)
nuv(NuppelVideo/RTJPEG)
paf_video(Amazing Studio Packed Animation File Video)
pam(PAM (Portable AnyMap) image)
pbm(PBM (Portable BitMap) image)
pcx(PC Paintbrush PCX image)
pfm(PFM (Portable FloatMap) image)
pgm(PGM (Portable GrayMap) image)
pgmyuv(PGMYUV (Portable GrayMap YUV) image)
pgx(PGX (JPEG2000 Test Format))
photocd(Kodak Photo CD)
pictor(Pictor/PC Paint)
pixlet(Apple Pixlet)
png(PNG (Portable Network Graphics) image)
ppm(PPM (Portable PixelMap) image)
prores(Apple ProRes (iCodec Pro))
prosumer(Brooktree ProSumer Video)
psd(Photoshop PSD file)
ptx(V.Flash PTX image)
qdraw(Apple QuickDraw)
qpeg(Q-team QPEG)
qtrle(QuickTime Animation (RLE) video)
r10k(AJA Kona 10-bit RGB Codec)
r210(Uncompressed RGB 10-bit)
rasc(RemotelyAnywhere Screen Capture)
rawvideo(raw video)
rl2(RL2 video)
roqvideo(id RoQ video)
rpza(QuickTime video (RPZA))
rscc(innoHeim/Rsupport Screen Capture Codec)
rv10(RealVideo 1.0)
rv20(RealVideo 2.0)
rv30(RealVideo 3.0)
rv40(RealVideo 4.0)
s302m(SMPTE 302M)
sanm(LucasArts SANM/Smush video)
scpr(ScreenPressor)
screenpresso(Screenpresso)
sga(Digital Pictures SGA Video)
sgi(SGI image)
sgirle(Silicon Graphics RLE 8-bit video)
sheervideo(BitJazz SheerVideo)
simbiosis_imx(Simbiosis Interactive IMX Video)
smackvid(Smacker video)
smc(QuickTime Graphics (SMC))
smvjpeg(SMV JPEG)
snow(Snow)
sp5x(Sunplus JPEG (SP5X))
speedhq(NewTek SpeedHQ)
speex(Speex)
srgc(Screen Recorder Gold Codec)
sunrast(Sun Rasterfile image)
svq1(Sorenson Vector Quantizer 1 / Sorenson Video 1 / SVQ1)
svq3(Sorenson Vector Quantizer 3 / Sorenson Video 3 / SVQ3)
targa(Truevision Targa image)
targa_y216(Pinnacle TARGA CineWave YUV16)
tdsc(TDSC)
theora(Theora)
thp(Nintendo Gamecube THP video)
tiertexseqvideo(Tiertex Limited SEQ video)
tiff(TIFF image)
tmv(8088flex TMV)
truemotion1(Duck TrueMotion 1.0)
truemotion2(Duck TrueMotion 2.0)
truemotion2rt(Duck TrueMotion 2.0 Real Time)
camtasia(TechSmith Screen Capture Codec)
tscc2(TechSmith Screen Codec 2)
txd(Renderware TXD (TeXture Dictionary) image)
ultimotion(IBM UltiMotion)
utvideo(Ut Video)
v210(Uncompressed 4:2:2 10-bit)
v210x(Uncompressed 4:2:2 10-bit)
v308(Uncompressed packed 4:4:4)
v408(Uncompressed packed QT 4:4:4:4)
v410(Uncompressed 4:4:4 10-bit)
vb(Beam Software VB)
vble(VBLE Lossless Codec)
vc1(SMPTE VC-1)
        hw-accel: AV_PIX_FMT_DXVA2_VLD, type: AV_HWDEVICE_TYPE_DXVA2, decoder: 1, encoder: 0
        hw-accel: AV_PIX_FMT_D3D11, type: AV_HWDEVICE_TYPE_D3D11VA, decoder: 1, encoder: 0
        hw-accel: AV_PIX_FMT_CUDA, type: AV_HWDEVICE_TYPE_CUDA, decoder: 1, encoder: 0
vc1image(Windows Media Video 9 Image v2)
vc1_qsv(VC1 video (Intel Quick Sync Video acceleration))
        hw-accel: AV_PIX_FMT_QSV, type: AV_HWDEVICE_TYPE_QSV, decoder: 1, encoder: 0
vcr1(ATI VCR1)
vmdvideo(Sierra VMD video)
vmnc(VMware Screen Codec / VMware Video)
vp3(On2 VP3)
vp4(On2 VP4)
vp5(On2 VP5)
vp6(On2 VP6)
vp6a(On2 VP6 (Flash version, with alpha channel))
vp6f(On2 VP6 (Flash version))
vp7(On2 VP7)
vp8(On2 VP8)
        hw-accel: AV_PIX_FMT_CUDA, type: AV_HWDEVICE_TYPE_CUDA, decoder: 1, encoder: 0
vp9(Google VP9)
        hw-accel: AV_PIX_FMT_DXVA2_VLD, type: AV_HWDEVICE_TYPE_DXVA2, decoder: 1, encoder: 0
        hw-accel: AV_PIX_FMT_D3D11, type: AV_HWDEVICE_TYPE_D3D11VA, decoder: 1, encoder: 0
        hw-accel: AV_PIX_FMT_CUDA, type: AV_HWDEVICE_TYPE_CUDA, decoder: 1, encoder: 0
vqavideo(Westwood Studios VQA (Vector Quantized Animation) video)
webp(WebP image)
wcmv(WinCAM Motion Video)
wrapped_avframe(AVPacket to AVFrame passthrough)
wmv1(Windows Media Video 7)
wmv2(Windows Media Video 8)
wmv3(Windows Media Video 9)
        hw-accel: AV_PIX_FMT_DXVA2_VLD, type: AV_HWDEVICE_TYPE_DXVA2, decoder: 1, encoder: 0
        hw-accel: AV_PIX_FMT_D3D11, type: AV_HWDEVICE_TYPE_D3D11VA, decoder: 1, encoder: 0
        hw-accel: AV_PIX_FMT_CUDA, type: AV_HWDEVICE_TYPE_CUDA, decoder: 1, encoder: 0
wmv3image(Windows Media Video 9 Image)
wnv1(Winnov WNV1)
xan_wc3(Wing Commander III / Xan)
xan_wc4(Wing Commander IV / Xxan)
xbm(XBM (X BitMap) image)
xface(X-face image)
xl(Miro VideoXL)
xpm(XPM (X PixMap) image)
xwd(XWD (X Window Dump) image)
y41p(Uncompressed YUV 4:1:1 12-bit)
ylc(YUY2 Lossless Codec)
yop(Psygnosis YOP Video)
yuv4(Uncompressed packed 4:2:0)
012v(Uncompressed 4:2:2 10-bit)
zerocodec(ZeroCodec Lossless Video)
zlib(LCL (LossLess Codec Library) ZLIB)
zmbv(Zip Motion Blocks Video)
aac(AAC (Advanced Audio Coding))
aac_fixed(AAC (Advanced Audio Coding))
aac_latm(AAC LATM (Advanced Audio Coding LATM syntax))
ac3(ATSC A/52A (AC-3))
ac3_fixed(ATSC A/52A (AC-3))
acelp.kelvin(Sipro ACELP.KELVIN)
alac(ALAC (Apple Lossless Audio Codec))
als(MPEG-4 Audio Lossless Coding (ALS))
amrnb(AMR-NB (Adaptive Multi-Rate NarrowBand))
amrwb(AMR-WB (Adaptive Multi-Rate WideBand))
ape(Monkey's Audio)
aptx(aptX (Audio Processing Technology for Bluetooth))
aptx_hd(aptX HD (Audio Processing Technology for Bluetooth))
atrac1(ATRAC1 (Adaptive TRansform Acoustic Coding))
atrac3(ATRAC3 (Adaptive TRansform Acoustic Coding 3))
atrac3al(ATRAC3 AL (Adaptive TRansform Acoustic Coding 3 Advanced Lossless))
atrac3plus(ATRAC3+ (Adaptive TRansform Acoustic Coding 3+))
atrac3plusal(ATRAC3+ AL (Adaptive TRansform Acoustic Coding 3+ Advanced Lossless))
atrac9(ATRAC9 (Adaptive TRansform Acoustic Coding 9))
binkaudio_dct(Bink Audio (DCT))
binkaudio_rdft(Bink Audio (RDFT))
bmv_audio(Discworld II BMV audio)
cook(Cook / Cooker / Gecko (RealAudio G2))
dca(DCA (DTS Coherent Acoustics))
dolby_e(Dolby E)
dsd_lsbf(DSD (Direct Stream Digital), least significant bit first)
dsd_msbf(DSD (Direct Stream Digital), most significant bit first)
dsd_lsbf_planar(DSD (Direct Stream Digital), least significant bit first, planar)
dsd_msbf_planar(DSD (Direct Stream Digital), most significant bit first, planar)
dsicinaudio(Delphine Software International CIN audio)
dss_sp(Digital Speech Standard - Standard Play mode (DSS SP))
dst(DST (Digital Stream Transfer))
eac3(ATSC A/52B (AC-3, E-AC-3))
evrc(EVRC (Enhanced Variable Rate Codec))
fastaudio(MobiClip FastAudio)
wavesynth(Wave synthesis pseudo-codec)
flac(FLAC (Free Lossless Audio Codec))
g723_1(G.723.1)
g729(G.729)
gsm(GSM)
gsm_ms(GSM Microsoft variant)
hca(CRI HCA)
hcom(HCOM Audio)
iac(IAC (Indeo Audio Coder))
ilbc(iLBC (Internet Low Bitrate Codec))
imc(IMC (Intel Music Coder))
interplayacm(Interplay ACM)
mace3(MACE (Macintosh Audio Compression/Expansion) 3:1)
mace6(MACE (Macintosh Audio Compression/Expansion) 6:1)
metasound(Voxware MetaSound)
mlp(MLP (Meridian Lossless Packing))
mp1(MP1 (MPEG audio layer 1))
mp1float(MP1 (MPEG audio layer 1))
mp2(MP2 (MPEG audio layer 2))
mp2float(MP2 (MPEG audio layer 2))
mp3float(MP3 (MPEG audio layer 3))
mp3(MP3 (MPEG audio layer 3))
mp3adufloat(ADU (Application Data Unit) MP3 (MPEG audio layer 3))
mp3adu(ADU (Application Data Unit) MP3 (MPEG audio layer 3))
mp3on4float(MP3onMP4)
mp3on4(MP3onMP4)
mpc7(Musepack SV7)
mpc8(Musepack SV8)
msnsiren(MSN Siren)
nellymoser(Nellymoser Asao)
on2avc(On2 Audio for Video Codec)
opus(Opus)
paf_audio(Amazing Studio Packed Animation File Audio)
qcelp(QCELP / PureVoice)
qdm2(QDesign Music Codec 2)
qdmc(QDesign Music Codec 1)
real_144(RealAudio 1.0 (14.4K))
real_288(RealAudio 2.0 (28.8K))
ralf(RealAudio Lossless)
sbc(SBC (low-complexity subband codec))
shorten(Shorten)
sipr(RealAudio SIPR / ACELP.NET)
siren(Siren)
smackaud(Smacker audio)
sonic(Sonic)
tak(TAK (Tom's lossless Audio Kompressor))
truehd(TrueHD)
truespeech(DSP Group TrueSpeech)
tta(TTA (True Audio))
twinvq(VQF TwinVQ)
vmdaudio(Sierra VMD audio)
vorbis(Vorbis)
wavpack(WavPack)
wmalossless(Windows Media Audio Lossless)
wmapro(Windows Media Audio 9 Professional)
wmav1(Windows Media Audio 1)
wmav2(Windows Media Audio 2)
wmavoice(Windows Media Audio Voice)
ws_snd1(Westwood Audio (SND1))
xma1(Xbox Media Audio 1)
xma2(Xbox Media Audio 2)
pcm_alaw(PCM A-law / G.711 A-law)
pcm_bluray(PCM signed 16|20|24-bit big-endian for Blu-ray media)
pcm_dvd(PCM signed 16|20|24-bit big-endian for DVD media)
pcm_f16le(PCM 16.8 floating point little-endian)
pcm_f24le(PCM 24.0 floating point little-endian)
pcm_f32be(PCM 32-bit floating point big-endian)
pcm_f32le(PCM 32-bit floating point little-endian)
pcm_f64be(PCM 64-bit floating point big-endian)
pcm_f64le(PCM 64-bit floating point little-endian)
pcm_lxf(PCM signed 20-bit little-endian planar)
pcm_mulaw(PCM mu-law / G.711 mu-law)
pcm_s8(PCM signed 8-bit)
pcm_s8_planar(PCM signed 8-bit planar)
pcm_s16be(PCM signed 16-bit big-endian)
pcm_s16be_planar(PCM signed 16-bit big-endian planar)
pcm_s16le(PCM signed 16-bit little-endian)
pcm_s16le_planar(PCM signed 16-bit little-endian planar)
pcm_s24be(PCM signed 24-bit big-endian)
pcm_s24daud(PCM D-Cinema audio signed 24-bit)
pcm_s24le(PCM signed 24-bit little-endian)
pcm_s24le_planar(PCM signed 24-bit little-endian planar)
pcm_s32be(PCM signed 32-bit big-endian)
pcm_s32le(PCM signed 32-bit little-endian)
pcm_s32le_planar(PCM signed 32-bit little-endian planar)
pcm_s64be(PCM signed 64-bit big-endian)
pcm_s64le(PCM signed 64-bit little-endian)
pcm_sga(PCM SGA)
pcm_u8(PCM unsigned 8-bit)
pcm_u16be(PCM unsigned 16-bit big-endian)
pcm_u16le(PCM unsigned 16-bit little-endian)
pcm_u24be(PCM unsigned 24-bit big-endian)
pcm_u24le(PCM unsigned 24-bit little-endian)
pcm_u32be(PCM unsigned 32-bit big-endian)
pcm_u32le(PCM unsigned 32-bit little-endian)
pcm_vidc(PCM Archimedes VIDC)
derf_dpcm(DPCM Xilam DERF)
gremlin_dpcm(DPCM Gremlin)
interplay_dpcm(DPCM Interplay)
roq_dpcm(DPCM id RoQ)
sdx2_dpcm(DPCM Squareroot-Delta-Exact)
sol_dpcm(DPCM Sol)
xan_dpcm(DPCM Xan)
adpcm_4xm(ADPCM 4X Movie)
adpcm_adx(SEGA CRI ADX ADPCM)
adpcm_afc(ADPCM Nintendo Gamecube AFC)
adpcm_agm(ADPCM AmuseGraphics Movie)
adpcm_aica(ADPCM Yamaha AICA)
adpcm_argo(ADPCM Argonaut Games)
adpcm_ct(ADPCM Creative Technology)
adpcm_dtk(ADPCM Nintendo Gamecube DTK)
adpcm_ea(ADPCM Electronic Arts)
adpcm_ea_maxis_xa(ADPCM Electronic Arts Maxis CDROM XA)
adpcm_ea_r1(ADPCM Electronic Arts R1)
adpcm_ea_r2(ADPCM Electronic Arts R2)
adpcm_ea_r3(ADPCM Electronic Arts R3)
adpcm_ea_xas(ADPCM Electronic Arts XAS)
g722(G.722 ADPCM)
g726(G.726 ADPCM)
g726le(G.726 ADPCM little-endian)
adpcm_ima_acorn(ADPCM IMA Acorn Replay)
adpcm_ima_amv(ADPCM IMA AMV)
adpcm_ima_alp(ADPCM IMA High Voltage Software ALP)
adpcm_ima_apc(ADPCM IMA CRYO APC)
adpcm_ima_apm(ADPCM IMA Ubisoft APM)
adpcm_ima_cunning(ADPCM IMA Cunning Developments)
adpcm_ima_dat4(ADPCM IMA Eurocom DAT4)
adpcm_ima_dk3(ADPCM IMA Duck DK3)
adpcm_ima_dk4(ADPCM IMA Duck DK4)
adpcm_ima_ea_eacs(ADPCM IMA Electronic Arts EACS)
adpcm_ima_ea_sead(ADPCM IMA Electronic Arts SEAD)
adpcm_ima_iss(ADPCM IMA Funcom ISS)
adpcm_ima_moflex(ADPCM IMA MobiClip MOFLEX)
adpcm_ima_mtf(ADPCM IMA Capcom's MT Framework)
adpcm_ima_oki(ADPCM IMA Dialogic OKI)
adpcm_ima_qt(ADPCM IMA QuickTime)
adpcm_ima_rad(ADPCM IMA Radical)
adpcm_ima_ssi(ADPCM IMA Simon & Schuster Interactive)
adpcm_ima_smjpeg(ADPCM IMA Loki SDL MJPEG)
adpcm_ima_wav(ADPCM IMA WAV)
adpcm_ima_ws(ADPCM IMA Westwood)
adpcm_ms(ADPCM Microsoft)
adpcm_mtaf(ADPCM MTAF)
adpcm_psx(ADPCM Playstation)
adpcm_sbpro_2(ADPCM Sound Blaster Pro 2-bit)
adpcm_sbpro_3(ADPCM Sound Blaster Pro 2.6-bit)
adpcm_sbpro_4(ADPCM Sound Blaster Pro 4-bit)
adpcm_swf(ADPCM Shockwave Flash)
adpcm_thp(ADPCM Nintendo THP)
adpcm_thp_le(ADPCM Nintendo THP (little-endian))
adpcm_vima(LucasArts VIMA audio)
adpcm_xa(ADPCM CDROM XA)
adpcm_yamaha(ADPCM Yamaha)
adpcm_zork(ADPCM Zork)
ssa(ASS (Advanced SubStation Alpha) subtitle)
ass(ASS (Advanced SubStation Alpha) subtitle)
cc_dec(Closed Caption (EIA-608 / CEA-708))
dvbsub(DVB subtitles)
dvdsub(DVD subtitles)
jacosub(JACOsub subtitle)
microdvd(MicroDVD subtitle)
mov_text(3GPP Timed Text subtitle)
mpl2(MPL2 subtitle)
pgssub(HDMV Presentation Graphic Stream subtitles)
pjs(PJS subtitle)
realtext(RealText subtitle)
sami(SAMI subtitle)
srt(SubRip subtitle)
stl(Spruce subtitle format)
subrip(SubRip subtitle)
subviewer(SubViewer subtitle)
subviewer1(SubViewer1 subtitle)
text(Raw text subtitle)
vplayer(VPlayer subtitle)
webvtt(WebVTT subtitle)
xsub(XSUB)
libdav1d(dav1d AV1 decoder by VideoLAN)
libdavs2(libdavs2 AVS2-P2/IEEE1857.4)
libgsm(libgsm GSM)
libgsm_ms(libgsm GSM Microsoft variant)
libilbc(iLBC (Internet Low Bitrate Codec))
libopencore_amrnb(OpenCORE AMR-NB (Adaptive Multi-Rate Narrow-Band))
libopencore_amrwb(OpenCORE AMR-WB (Adaptive Multi-Rate Wide-Band))
libopenjpeg(OpenJPEG JPEG 2000)
libopus(libopus Opus)
libspeex(libspeex Speex)
libuavs3d(libuavs3d AVS3-P2/IEEE1857.10)
libvorbis(libvorbis)
libvpx(libvpx VP8)
libvpx-vp9(libvpx VP9)
libzvbi_teletextdec(Libzvbi DVB teletext decoder)
bintext(Binary text)
xbin(eXtended BINary text)
idf(iCEDraw text)
libaom-av1(libaom AV1)
av1(Alliance for Open Media AV1)
        hw-accel: AV_PIX_FMT_DXVA2_VLD, type: AV_HWDEVICE_TYPE_DXVA2, decoder: 1, encoder: 0
        hw-accel: AV_PIX_FMT_D3D11, type: AV_HWDEVICE_TYPE_D3D11VA, decoder: 1, encoder: 0
        hw-accel: AV_PIX_FMT_CUDA, type: AV_HWDEVICE_TYPE_CUDA, decoder: 1, encoder: 0
av1_cuvid(Nvidia CUVID AV1 decoder)
        hw-accel: AV_PIX_FMT_CUDA, type: AV_HWDEVICE_TYPE_CUDA, decoder: 1, encoder: 0
av1_qsv(AV1 video (Intel Quick Sync Video acceleration))
        hw-accel: AV_PIX_FMT_QSV, type: AV_HWDEVICE_TYPE_QSV, decoder: 1, encoder: 0
h264_cuvid(Nvidia CUVID H264 decoder)
        hw-accel: AV_PIX_FMT_CUDA, type: AV_HWDEVICE_TYPE_CUDA, decoder: 1, encoder: 0
hevc_cuvid(Nvidia CUVID HEVC decoder)
        hw-accel: AV_PIX_FMT_CUDA, type: AV_HWDEVICE_TYPE_CUDA, decoder: 1, encoder: 0
mjpeg_cuvid(Nvidia CUVID MJPEG decoder)
        hw-accel: AV_PIX_FMT_CUDA, type: AV_HWDEVICE_TYPE_CUDA, decoder: 1, encoder: 0
mjpeg_qsv(MJPEG video (Intel Quick Sync Video acceleration))
        hw-accel: AV_PIX_FMT_QSV, type: AV_HWDEVICE_TYPE_QSV, decoder: 1, encoder: 0
mpeg1_cuvid(Nvidia CUVID MPEG1VIDEO decoder)
        hw-accel: AV_PIX_FMT_CUDA, type: AV_HWDEVICE_TYPE_CUDA, decoder: 1, encoder: 0
mpeg2_cuvid(Nvidia CUVID MPEG2VIDEO decoder)
        hw-accel: AV_PIX_FMT_CUDA, type: AV_HWDEVICE_TYPE_CUDA, decoder: 1, encoder: 0
mpeg4_cuvid(Nvidia CUVID MPEG4 decoder)
        hw-accel: AV_PIX_FMT_CUDA, type: AV_HWDEVICE_TYPE_CUDA, decoder: 1, encoder: 0
vc1_cuvid(Nvidia CUVID VC1 decoder)
        hw-accel: AV_PIX_FMT_CUDA, type: AV_HWDEVICE_TYPE_CUDA, decoder: 1, encoder: 0
vp8_cuvid(Nvidia CUVID VP8 decoder)
        hw-accel: AV_PIX_FMT_CUDA, type: AV_HWDEVICE_TYPE_CUDA, decoder: 1, encoder: 0
vp8_qsv(VP8 video (Intel Quick Sync Video acceleration))
        hw-accel: AV_PIX_FMT_QSV, type: AV_HWDEVICE_TYPE_QSV, decoder: 1, encoder: 0
vp9_cuvid(Nvidia CUVID VP9 decoder)
        hw-accel: AV_PIX_FMT_CUDA, type: AV_HWDEVICE_TYPE_CUDA, decoder: 1, encoder: 0
vp9_qsv(VP9 video (Intel Quick Sync Video acceleration))
        hw-accel: AV_PIX_FMT_QSV, type: AV_HWDEVICE_TYPE_QSV, decoder: 1, encoder: 0

중간에 "h264_qsv" 항목이 있습니다.

h264_qsv(H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10 (Intel Quick Sync Video acceleration))
        hw-accel: AV_PIX_FMT_NV12, type: AV_HWDEVICE_TYPE_QSV, decoder: 0, encoder: 1
        hw-accel: AV_PIX_FMT_P010LE, type: AV_HWDEVICE_TYPE_QSV, decoder: 0, encoder: 1

그리고 avcodec_find_decoder_by_name도 정상적으로 decoder 인스턴스를 반환하지만,

AVCodec* decoder = ffmpeg.avcodec_find_decoder_by_name("h264_qsv");

애석하게도 av_hwdevice_ctx_create 호출에서는,

AVHWDeviceType hwDeviceType = ffmpeg.av_hwdevice_find_type_by_name("qsv");
ret = ffmpeg.av_hwdevice_ctx_create(&device_ref, hwDeviceType, "auto", null, 0);
// ret == -1313558101

(아래에서 설명하겠지만) 상황에 따라 저렇게 오류가 발생합니다. 특이한 점이라면 "av_hwdevice_ctx_create" 호출 시 화면에 경고가 함께 출력이 되는데요,

WARNING: defaulting child_device_type to AV_HWDEVICE_TYPE_DXVA2 for compatibility with old commandlines. This behaviour will be removed in the future. Please explicitly set device type via "-init_hw_device" option.
[AVHWDeviceContext @ 0000027f69d3b080] Error initializing an MFX session: -3.

ffmpeg.exe로는 qsv 디코딩을 했으니, 아마도 분명히 코드로도 길이 있을 것입니다. ^^




"Error initializing an MFX session: -3"에 대해 좀 더 검색해 보면 아래의 글이 나옵니다.

Intel QSV Windows init
; https://trac.ffmpeg.org/ticket/7933

저 당시에는 오류 메시지가 "Error initializing an internal MFX session: unsupported (-3)"였던 것 같습니다. 그러면서, 저 오류가 발생한 원인에 대해 다음의 3가지 범위로 압축했다고 하는데요,

  1. windows 10 x64 1809
  2. internal intel graphics enabled in bios (windows driver intstalled) but monitor is not connected
  3. discrete graphics card enabled and multiple monitors (>=2) connected

1번은 잘 모르겠지만, 2번과 3번은 좀 특이합니다. 그리고 이에 대해 이승준 님의 덧글에서도 비슷한 이야기가 나옵니다. ^^;

https://www.sysnet.pe.kr/2/0/12972#15610

[이승준] 저렇게 설정이 되어도 성능이 안나오거나 GPU사용이 안되는 경우가 있습니다.
그럴 경우 해결방법은 아래와 같습니다.
1. 내장 비디오 출력포트(HDMI, Display Port, USB-C)에 모니터 연결
2. 인코딩등의 작업 윈도우를 내장 비디오 출력포트에 연결된 모니터로 이동
1번은 거의 필수라고 보시면 되고요. 2번은 성능이 떨어진다 싶을 경우 입니다.

아마도 qsv 테스트를 하려면 내장 GPU의 출력 포트로 모니터를 연결해 두어야 하는 걸로 보입니다. 제 경우에, 모니터 3대를 전부 외장 그래픽 카드에 연결했었는데요, 그래서 테스트를 위해 모니터 하나를 내장 GPU로 연결했더니, ^^ 잘 동작합니다. 하지만 "WARNING: defaulting child_device_type to AV_HWDEVICE_TYPE_DXVA2 for compatibility with old commandlines. This behaviour will be removed in the future. Please explicitly set device type via "-init_hw_device" option." 경고가 똑같이 발생하는 걸로 봐서 그것이 내장 GPU 출력 포트와는 전혀 상관없는 것 같습니다.




그건 그렇고... 여전히 설명이 안 되는 것이 있는데요, "ffmpeg.exe - Intel Quick Sync Video(qsv)를 이용한 인코딩" 글에서는 ffmpeg.exe가 모니터 연결이 안 된 상태에서도 정상적으로 qsv로의 트랜스코딩을 했습니다. 신기한 일이군요. 덧글에 보면 문서도 언급하고 있는데요,

Intel Media Developer's Guide
; https://www.intel.com/content/dam/develop/external/us/en/documents/intel-media-developers-guide.pdf

Until 2013, supporting hardware accleration in a multi-gpu environment was bound by a fundamental constraint - the Intel Ggraphics adapter needed to have a monitor associated with the device to be active. This constaint was due to capabilities of the Microsoft DirectX 9 infrastructure that the Intel Media SDK, and assocaited graphics driver were based upon. The introduction and corresponding support of the DirectX 11 in both the Intel Media SDK and graphics driver has now simplified the process of developing applications to utilize Intel's fixed function hardware acceleration, even when the Intel graphics device is not connected to an external display device.

13.4.1 Multi-GPU and "headless" configurations

Applications wishing to leverage the Intel Media SDK's hardware acceleration library when a discrete card is the primary device, or on devices without a monitor attached – such as "Session 0" modes, are required to initialize the Intel Media SDK to utilize the
DirectX11 infrastructure, as well as provide its own memory allocation routines that manage DirectX 11 surfaces.


그러니까, DX11 환경에서는 완벽하게 headless 모드를 제공한다는 것인데, 왜 여전히 모니터 연결이 필요한지 의문입니다.

여기서 잠깐 av_hwdevice_ctx_create의 3번째 인자를 알아볼까요? 예제에서는 "auto"를 넣었는데요, 이에 대해 다음의 글을 보면 가능한 값이 나옵니다.

[FFmpeg-devel] ffmpeg_qsv: use -hwaccel_device to specify a device for VAAPI backend
; https://patchwork.ffmpeg.org/project/ffmpeg/patch/20200902040103.85196-1-haihao.xiang@intel.com/

In case of QSV, the usage of hwaccel_device is already defined:

device selects a value in ‘MFX_IMPL_*’. Allowed values are:
auto sw  hw  auto_any hw_any hw2 hw3 hw4

그리고 "MFX_IMPL_*"라고 하는 것은 Intel-Media-SDK에 정의된 값들을 의미합니다.

MediaSDK/api/include/mfxcommon.h
; https://github.com/Intel-Media-SDK/MediaSDK/blob/master/api/include/mfxcommon.h

enum  {
    MFX_IMPL_AUTO         = 0x0000,  /* Auto Selection/In or Not Supported/Out */
    MFX_IMPL_SOFTWARE     = 0x0001,  /* Pure Software Implementation */
    MFX_IMPL_HARDWARE     = 0x0002,  /* Hardware Accelerated Implementation (default device) */
    MFX_IMPL_AUTO_ANY     = 0x0003,  /* Auto selection of any hardware/software implementation */
    MFX_IMPL_HARDWARE_ANY = 0x0004,  /* Auto selection of any hardware implementation */
    MFX_IMPL_HARDWARE2    = 0x0005,  /* Hardware accelerated implementation (2nd device) */
    MFX_IMPL_HARDWARE3    = 0x0006,  /* Hardware accelerated implementation (3rd device) */
    MFX_IMPL_HARDWARE4    = 0x0007,  /* Hardware accelerated implementation (4th device) */
    MFX_IMPL_RUNTIME      = 0x0008,
#if (MFX_VERSION >= MFX_VERSION_NEXT)
    MFX_IMPL_SINGLE_THREAD= 0x0009,
#endif
    MFX_IMPL_VIA_ANY      = 0x0100,
    MFX_IMPL_VIA_D3D9     = 0x0200,
    MFX_IMPL_VIA_D3D11    = 0x0300,
    MFX_IMPL_VIA_VAAPI    = 0x0400,

    MFX_IMPL_AUDIO                     = 0x8000,
#if (MFX_VERSION >= MFX_VERSION_NEXT)
    MFX_IMPL_EXTERNAL_THREADING        = 0x10000,
#endif

    MFX_IMPL_UNSUPPORTED  = 0x0000  /* One of the MFXQueryIMPL returns */
};

인텔의 Media SDK 문서에 저 상수와 "headless" 모드에 관한 내용이 나옵니다.

The following code illustrates the correct initialization parameters for initializing the library. MFX_IMPL_AUTO_ANY will scan the system for a supporting adapter, while MFX_IMPL_VIA_D3D11 indicates the need for DirectX 11 support. Similarly for VAAPI.


// Initialize Media SDK session
// - MFX_IMPL_AUTO_ANY selects HW accleration if available (on any adapter)

mfxIMPL impl = MFX_IMPL_AUTO_ANY | MFX_IMPL_VIA_D3D11;
mfxVersion ver = { 0, 1 };
MFXVideSession mfxSession;

sts = mfxSession.Init(impl, &ver);

이 정보를 ffmpeg.exe가 잘 동작했던 것과 관련시켜 "Intel QSV Windows init" 글을 보면 다음의 내용에 힌트가 있는 것 같습니다.

ffmpeg uses this piece of code:
ffmpeg/libavcodec/qsv.c
    mfxIMPL impl = MFX_IMPL_AUTO_ANY;
    mfxVersion ver = { { QSV_VERSION_MINOR, QSV_VERSION_MAJOR } };
    ....
    ret = MFXInit(impl, &ver, session);

obs: 
​https://github.com/obsproject/obs-studio/blob/a4f602b15afcd54e588e76437c639c38278841f6/plugins/obs-qsv11/obs-qsv11-plugin-main.c#L70
    mfxIMPL impl = MFX_IMPL_HARDWARE_ANY | MFX_IMPL_VIA_D3D11;
    mfxVersion ver = {{0 , 1}};
    ....
    sts = MFXInit(impl, &ver, &session);
    if (sts == MFX_ERR_NONE) {
    ....
    } else {
    impl = MFX_IMPL_HARDWARE_ANY | MFX_IMPL_VIA_D3D9;
    sts = MFXInit(impl, &ver, &session);
    if (sts == MFX_ERR_NONE) {
    ....

그러니까, 저 당시 ffmpeg는 MFX_IMPL_AUTO_ANY 값으로만 초기화를 시도해서 실패한 반면, obs-studio 응용 프로그램의 경우 MFX_IMPL_HARDWARE_ANY | MFX_IMPL_VIA_D3D11 또는 MFX_IMPL_HARDWARE_ANY | MFX_IMPL_VIA_D3D9 값으로 재차 시도하는 코드를 넣어 두었기 때문에 잘 되었다는 의견이 있습니다.

아마도 그럼 현재의 ffmpeg.exe가 저런 시도를 하는 걸까요? 그렇다면 저도 혹시 가능하지 않을까 싶어서 방법을 찾아봤지만 딱히 마땅하게 검색되는 내용이 없습니다. 즉 이런 경우에 "auto" 값과 함께 MFX_IMPL_VIA_D3D11이 선택되도록 어떻게 할 수 있는지 방법이 없습니다.

AVHWDeviceType hwDeviceType = ffmpeg.av_hwdevice_find_type_by_name("qsv");
ret = ffmpeg.av_hwdevice_ctx_create(&device_ref, hwDeviceType, "auto", null, 0);

그나마 ffmpeg의 소스 코드를 보면 이에 대한 힌트가 나옵니다.

// https://ffmpeg.org/doxygen/trunk/hwcontext__qsv_8c_source.html#l01391

 static mfxIMPL choose_implementation(const char *device, enum AVHWDeviceType child_device_type)
 {
     static const struct {
         const char *name;
         mfxIMPL     impl;
     } impl_map[] = {
         { "auto",     MFX_IMPL_AUTO         },
         { "sw",       MFX_IMPL_SOFTWARE     },
         { "hw",       MFX_IMPL_HARDWARE     },
         { "auto_any", MFX_IMPL_AUTO_ANY     },
         { "hw_any",   MFX_IMPL_HARDWARE_ANY },
         { "hw2",      MFX_IMPL_HARDWARE2    },
         { "hw3",      MFX_IMPL_HARDWARE3    },
         { "hw4",      MFX_IMPL_HARDWARE4    },
     };
  
     mfxIMPL impl = MFX_IMPL_AUTO_ANY;
     int i;
  
     if (device) {
         for (i = 0; i < FF_ARRAY_ELEMS(impl_map); i++)
             if (!strcmp(device, impl_map[i].name)) {
                 impl = impl_map[i].impl;
                 break;
             }
         if (i == FF_ARRAY_ELEMS(impl_map))
             impl = strtol(device, NULL, 0);
     }
  
     if (impl != MFX_IMPL_SOFTWARE) {
         if (child_device_type == AV_HWDEVICE_TYPE_D3D11VA)
             impl |= MFX_IMPL_VIA_D3D11;}
         else if (child_device_type == AV_HWDEVICE_TYPE_DXVA2)
             impl |= MFX_IMPL_VIA_D3D9;
     }
  
     return impl;
 }

그러니까, MFX_IMPL_SOFTWARE가 아닌 경우이고, AV_HWDEVICE_TYPE_D3D11VA 옵션이 child_device_type으로 지정된 경우 MFX_IMPL_VIA_D3D11 옵션이 함께 OR 연산되고 있습니다.

아하... 이제서야 "WARNING: defaulting child_device_type to AV_HWDEVICE_TYPE_DXVA2 for compatibility with old commandlines. This behaviour will be removed in the future. Please explicitly set device type via "-init_hw_device" option." 경고가 눈에 들어오는군요. 그러니까, "child_device_type"으로 기본값이 AV_HWDEVICE_TYPE_DXVA2였기 때문에 MFX_IMPL_VIA_D3D9 모드가 OR 연산되었고, DX9 모드에서는 아직 full headless 모드가 적용되지 않았기 때문에 모니터가 연결되지 않은 상태에서는 동작하지 않았던 것입니다. 그리고 init_hw_device 옵션을 설정하라는 것은, ffmpeg.exe의 도움말에 다음의 2가지 항목이 나옵니다.

-init_hw_device qsv:hw,child_device_type=d3d11va
Choose the GPU subdevice with type 'd3d11va' and create QSV device with 'MFX_IMPL_HARDWARE'.

-init_hw_device qsv:hw,child_device_type=dxva2
Choose the GPU subdevice with type 'dxva2' and create QSV device with 'MFX_IMPL_HARDWARE'.

즉, 명시적으로 "-init_hw_device qsv:hw,child_device_type=d3d11va"와 같이 지정해야 한다는 것일 듯합니다. 그렇다면, 이제 문제는 ffmpeg 라이브러리를 이용한 코드에서 어떻게 해야 child_device_type으로 AV_HWDEVICE_TYPE_D3D11VA를 지정할 수 있는 걸까요?

이에 대한 힌트를 패치 내역에서 볼 수 있습니다.

+    e = av_dict_get(opts, "child_device", NULL, 0);
     ret = av_hwdevice_ctx_create(&priv->child_device_ctx, child_device_type,
                                  e ? e->value : NULL, child_device_opts, 0);

그래서 이와 유사하게 AVDictionary를 이용해 "child_device_type" 옵션을 전달하면,

AVDictionary* opts = null;
ret = ffmpeg.av_dict_set(&opts, "child_device_type", "d3d11va", 0);
ret.ThrowExceptionIfError();

ret = ffmpeg.av_hwdevice_ctx_create(&device_ref, hwDeviceType, "auto", opts, 0);

이번에는 "WARNING: defaulting child_device_type..." 경고가 발생하지 않지만 여전히 "Error initializing an MFX session: -3" 오류가 발생하면서 av_hwdevice_ctx_create 호출에는 실패합니다. 재미있는 건, "auto" 대신 null이나 "auto_any", "hw_any", "hw2"를 주는 경우,

ret = ffmpeg.av_hwdevice_ctx_create(&device_ref, hwDeviceType, "hw_any", opts, 0);

호출까지는 성공하지만, 이후 패킷 디코딩을 위한 "ffmpeg.avcodec_send_packet(decoder_ctx, pkt);" 호출에서 -40(Function not implemented)을 반환하며,

[h264_qsv @ 0000026670d33dc0] Invalid pkt_timebase, passing timestamps as-is.
[h264_qsv @ 0000026670d33dc0] Error initializing the MFX video decoder: unsupported (-3)
[h264_qsv @ 0000026670d33dc0] video_get_buffer: image parameters invalid
[h264_qsv @ 0000026670d33dc0] get_buffer() failed

위와 같은 오류 메시지들이 쏟아집니다. (동일한 코드가 모니터 연결이 되었을 때는 발생하지 않았습니다.)

결국, ffmpeg.exe가 했던 것처럼 headless 모드로 동작시키는 것에는 실패했습니다. ^^;




참고로, 기타 hw device에 대해 av_hwdevice_ctx_create를 호출해 보면,

{
    string[] names = { "d3d11va", "cuda", "dxva2", "opencl", "vulkan" };

    foreach (string name in names)
    {
        AVHWDeviceType deviceType = ffmpeg.av_hwdevice_find_type_by_name(name);

        ret = ffmpeg.av_hwdevice_ctx_create(&device_ref, deviceType, null, null, 0);

        if (ret < 0)
        {
            Console.WriteLine($"failed: {deviceType}");
            continue;
        }
    }
}

/* 출력 결과
[AVHWDeviceContext @ 000001dd3b46a500] More than one matching device found.
failed: AV_HWDEVICE_TYPE_OPENCL
*/

OpenCL에 대해서만 오류가 발생합니다. 아마도 저건 또 다른 특별한 초기화가 요구되나 봅니다. ^^;




[이 글에 대해서 여러분들과 의견을 공유하고 싶습니다. 틀리거나 미흡한 부분 또는 의문 사항이 있으시면 언제든 댓글 남겨주십시오.]

[연관 글]






[최초 등록일: ]
[최종 수정일: 2/22/2022]

Creative Commons License
이 저작물은 크리에이티브 커먼즈 코리아 저작자표시-비영리-변경금지 2.0 대한민국 라이센스에 따라 이용하실 수 있습니다.
by SeongTae Jeong, mailto:techsharer at outlook.com

비밀번호

댓글 작성자
 




1  2  3  4  5  [6]  7  8  9  10  11  12  13  14  15  ...
NoWriterDateCnt.TitleFile(s)
13003정성태3/15/20221237.NET Framework: 1179. C# - (.NET Framework를 위한) Oracle.ManagedDataAccess 패키지의 성능 카운터 설정 방법
13002정성태3/14/20221197.NET Framework: 1178. C# - ffmpeg(FFmpeg.AutoGen)를 이용한 http_multiclient.c 예제 포팅
13001정성태3/13/20221519.NET Framework: 1177. C# - 닷넷에서 허용하는 메서드의 매개변수와 호출 인자의 최대 수
13000정성태3/12/20221320.NET Framework: 1176. C# - Oracle.ManagedDataAccess.Core의 성능 카운터 설정 방법
12999정성태3/10/20221134.NET Framework: 1175. Visual Studio - 프로젝트 또는 솔루션의 Clean 작업 시 응용 프로그램에서 생성한 파일을 함께 삭제파일 다운로드1
12998정성태3/10/20221142.NET Framework: 1174. C# - ELEMENT_TYPE_FNPTR 유형의 사용 예
12997정성태3/10/20221360오류 유형: 799. Oracle.ManagedDataAccess - "ORA-01882: timezone region not found" 오류가 발생하는 이유
12996정성태3/9/202210448VS.NET IDE: 175. Visual Studio - 인텔리센스에서 오버로드 메서드를 키보드로 선택하는 방법
12995정성태3/8/20221438.NET Framework: 1173. .NET에서 Producer/Consumer를 구현한 BlockingCollection<T>
12994정성태3/8/20221433오류 유형: 798. WinDbg - Failed to load data access module, 0x80004002
12993정성태3/4/20221289.NET Framework: 1172. .NET에서 Producer/Consumer를 구현하는 기초 인터페이스 - IProducerConsumerCollection<T>
12992정성태3/3/20221523.NET Framework: 1171. C# - BouncyCastle을 사용한 암호화/복호화 예제파일 다운로드1
12991정성태3/2/20221277.NET Framework: 1170. C# - ffmpeg(FFmpeg.AutoGen)를 이용한 transcode_aac.c 예제 포팅
12990정성태3/2/20221285오류 유형: 797. msbuild - The BaseOutputPath/OutputPath property is not set for project '[...].vcxproj'
12989정성태3/2/20221226오류 유형: 796. mstest.exe - System.IO.FileNotFoundException: Could not load file or assembly 'Microsoft.VisualStudio.QualityTools.Tips.WebLoadTest.Tip
12988정성태3/2/20221035오류 유형: 795. CI 환경에서 Docker build 시 csproj의 Link 파일에 대한 빌드 오류
12987정성태3/1/20221218.NET Framework: 1169. C# - ffmpeg(FFmpeg.AutoGen)를 이용한 demuxing_decoding.c 예제 포팅
12986정성태2/28/20221254.NET Framework: 1168. C# -IIncrementalGenerator를 적용한 Version 2 Source Generator 실습
12985정성태2/28/20221371.NET Framework: 1167. C# -Version 1 Source Generator 실습
12984정성태2/24/20221226.NET Framework: 1166. C# - ffmpeg(FFmpeg.AutoGen)를 이용한 filtering_video.c 예제 포팅
12983정성태2/24/20221243.NET Framework: 1165. .NET Core/5+ 빌드 시 runtimeconfig.json에 설정을 반영하는 방법
12982정성태2/24/20221162.NET Framework: 1164. HTTP Error 500.31 - ANCM Failed to Find Native Dependencies
12981정성태2/23/20221228VC++: 154. C/C++ 언어의 문자열 Literal에 인덱스 적용하는 구문 [1]
12980정성태2/23/20221409.NET Framework: 1163. C# - 윈도우 환경에서 usleep을 호출하는 방법 [2]
12979정성태2/22/20221748.NET Framework: 1162. C# - 인텔 CPU의 P-Core와 E-Core를 구분하는 방법파일 다운로드1
12978정성태2/21/20221312.NET Framework: 1161. C# - ffmpeg(FFmpeg.AutoGen)를 이용한 resampling_audio.c 예제 포팅
1  2  3  4  5  [6]  7  8  9  10  11  12  13  14  15  ...