<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
<br>
<br>
<div class="moz-cite-prefix">Den 27.09.2024 19:45, skrev Andrew
Randrianasulu:<br>
</div>
<blockquote type="cite"
cite="mid:CA+rFky64KkPB-fhsDfQqnoRp5U0g2mh9ink7euwUx+YzhDNh3g@mail.gmail.com">
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<div dir="auto">
<div><br>
<br>
<div class="gmail_quote">
<div dir="ltr" class="gmail_attr">пт, 27 сент. 2024 г.,
18:55 Terje J. Hanssen <<a
href="mailto:terjejhanssen@gmail.com"
moz-do-not-send="true" class="moz-txt-link-freetext">terjejhanssen@gmail.com</a>>:<br>
</div>
<blockquote class="gmail_quote"
style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div> <br>
<br>
<div>Den 27.09.2024 12:44, skrev Andrew Randrianasulu:<br>
</div>
<blockquote type="cite">
<div dir="auto">
<div><br>
<br>
<div class="gmail_quote">
<div dir="ltr" class="gmail_attr">пт, 27 сент.
2024 г., 12:40 Terje J. Hanssen <<a
href="mailto:terjejhanssen@gmail.com"
rel="noreferrer noreferrer" target="_blank"
moz-do-not-send="true"
class="moz-txt-link-freetext">terjejhanssen@gmail.com</a>>:<br>
</div>
<blockquote class="gmail_quote"
style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div> <br>
<br>
<div>Den 26.09.2024 01:18, skrev Andrew
Randrianasulu:<br>
</div>
<blockquote type="cite">
<div dir="ltr">
<div dir="ltr"><br>
</div>
<br>
<div class="gmail_quote">
<div dir="ltr" class="gmail_attr">On
Thu, Sep 26, 2024 at 2:06 AM Terje
J. Hanssen <<a
href="mailto:terjejhanssen@gmail.com"
rel="noreferrer noreferrer noreferrer" target="_blank"
moz-do-not-send="true"
class="moz-txt-link-freetext">terjejhanssen@gmail.com</a>>
wrote:<br>
</div>
<blockquote class="gmail_quote"
style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<div> <br>
<br>
<div>Den 25.09.2024 23:22, skrev
Andrew Randrianasulu:<br>
</div>
<blockquote type="cite">
<div dir="auto">
<div><br>
<br>
<div class="gmail_quote">
<div dir="ltr"
class="gmail_attr">чт,
26 сент. 2024 г., 00:16
Terje J. Hanssen <<a
href="mailto:terjejhanssen@gmail.com"
rel="noreferrer noreferrer noreferrer" target="_blank"
moz-do-not-send="true"
class="moz-txt-link-freetext">terjejhanssen@gmail.com</a>>:<br>
</div>
<blockquote
class="gmail_quote"
style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<div> <br>
<br>
<div>Den 25.09.2024
21:33, skrev Andrew
Randrianasulu:<br>
</div>
<blockquote
type="cite">
<div dir="auto">
<div><br>
<br>
<div
class="gmail_quote">
<div dir="ltr"
class="gmail_attr">ср, 25 сент. 2024 г., 18:25 Terje J. Hanssen <<a
href="mailto:terjejhanssen@gmail.com"
rel="noreferrer noreferrer noreferrer noreferrer" target="_blank"
moz-do-not-send="true" class="moz-txt-link-freetext">terjejhanssen@gmail.com</a>>:<br>
</div>
<blockquote
class="gmail_quote"
style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<div> <br>
<br>
<div>Den
25.09.2024
00:27, skrev
Andrew
Randrianasulu:<br>
</div>
<blockquote
type="cite">
<div
dir="auto">try
this git
patch, do not
forgot to make
install again,
or put
profiles in
bin/ffmpeg/video
folder
manually.</div>
</blockquote>
<br>
# cd
/home/cinelerra/cinelerra-5.1<br>
# mv
/home/terje/0001-Qsv-encoders-for-testing.patch
.<br>
<br>
# git am
0001-Qsv-encoders-for-testing.patch<br>
Applying: Qsv
encoders for
testing<br>
<br>
<br>
make install
>
make_install.log
2&1<br>
</div>
</blockquote>
</div>
</div>
<div dir="auto"><br>
</div>
<div dir="auto"><br>
</div>
<div dir="auto">make
install >
make_install.log
2>&1 ?</div>
<br>
</div>
</blockquote>
Sorry. I should
cleanup all ">"
with Find &
Replace in my note,
and oversaw here
should be two of them
in this command ;(<br>
<br>
Now make install went
through without faults
as I could see, but
attach it by email
again.<br>
<br>
But unhappily, no
success with testing
Cingg Qsv Rendering.<br>
All attempts so far
breaks with the output
below:<br>
<blockquote>FFMPEG::open_encoder
err: Internal bug,
should not have
happened<br>
int
FFMPEG::open_encoder(const
char*, const char*):<br>
</blockquote>
----------<br>
localhost:/home/cinelerra/cinelerra-5.1 # bin/cin<br>
Cinelerra Infinity -
built: Sep 23 2024
10:31:07<br>
----------<br>
1)<br>
Loaded hdv09_04.m2t<br>
Render: <br>
Output to file:
/Videoklipp/QSV/hdv09_04_h264_qsv.mp4<br>
File format:
FFMPEG-mp4<br>
Compression:
h264_qsv.mp4<br>
Pixels: qsv<br>
<br>
libva info: VA-API
version 1.22.0<br>
libva info: Trying to
open
/usr/lib64/dri/iHD_drv_video.so<br>
libva info: Found init
function
__vaDriverInit_1_21<br>
libva info:
va_openDriver()
returns 0<br>
libva info: VA-API
version 1.22.0<br>
libva info: Trying to
open
/usr/lib64/dri/iHD_drv_video.so<br>
libva info: Found init
function
__vaDriverInit_1_21<br>
libva info:
va_openDriver()
returns 0<br>
<br>
FFMPEG::open_encoder
err: Internal bug,
should not have
happened<br>
int
FFMPEG::open_encoder(const
char*, const char*):<br>
open failed
h264_qsv:/Videoklipp/QSV/hdv09_04_h264_qsv.mp4<br>
Render::render_single:
Session finished.<br>
--------------<br>
2a)<br>
Loaded hdv09_04.m2t<br>
Render: <br>
Output to file:
/Videoklipp/QSV/hdv09_04_h265_qsv.mp4<br>
File format:
FFMPEG-mp4<br>
<br>
Compression:
h265_qsv.mp4<br>
Pixels: qsv<br>
<br>
[hevc_qsv encoder @
0x7f44e0d0bd80] [Eval
@ 0x7f44e57eb6f0]
Undefined constant or
missing '(' in 'high'<br>
[hevc_qsv encoder @
0x7f44e0d0bd80] Unable
to parse option value
"high"<br>
[hevc_qsv encoder @
0x7f44e0d0bd80] Error
setting option profile
to value high.<br>
FFMPEG::open_encoder
err: Invalid argument<br>
int
FFMPEG::open_encoder(const
char*, const char*):<br>
open failed
hevc_qsv:/Videoklipp/QSV/hdv09_04_h265_qsv.mp4<br>
Render::render_single:
Session finished.<br>
</div>
</blockquote>
</div>
</div>
</div>
</blockquote>
<br>
# profile=high<br>
Pixels: qsv (yuv420 isn't
available)<br>
<br>
Didn't render:<br>
FFMPEG::open_encoder err:
Internal bug, should not have
happened<br>
int FFMPEG::open_encoder(const
char*, const char*):<br>
open failed
hevc_qsv:/Videoklipp/QSV/hdv09_04_h265_qsv.mp4<br>
Render::render_single: Session
finished.<br>
<br>
<br>
<br>
<blockquote type="cite">
<div dir="auto">
<div>
<div class="gmail_quote">
<blockquote
class="gmail_quote"
style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<div> ----------------<br>
2b)<br>
Compression:
h265_qsv.mp4<br>
Pixels: p010le<br>
<br>
[hevc_qsv encoder @
0x7f93dcdb3c00] [Eval
@ 0x7f93cbff06f0]
Undefined constant or
missing '(' in 'high'<br>
[hevc_qsv encoder @
0x7f93dcdb3c00] Unable
to parse option value
"high"<br>
[hevc_qsv encoder @
0x7f93dcdb3c00] Error
setting option profile
to value high.<br>
FFMPEG::open_encoder
err: Invalid argument<br>
int
FFMPEG::open_encoder(const
char*, const char*):<br>
open failed
hevc_qsv:/Videoklipp/QSV/hdv09_04_h265_qsv.mp4<br>
Render::render_single:
Session finished.<br>
</div>
</blockquote>
</div>
</div>
</div>
</blockquote>
<br>
Some progress:<br>
<br>
# profile=high<br>
Pixels: yuvy422 (yuv420 isn't
available)<br>
Settings>Appearance:
BT.709/MPEG2<br>
<br>
Rendered:<br>
Render::render_single: Session
finished.<br>
** rendered 5972 frames in 33.999
secs, 175.652 fps<br>
audio0 pad 64 0 (64)<br>
<br>
VLC playback OK<br>
<br>
ffprobe -hide_banner
hdv09_04_h265_qsv.mp4<br>
Input #0, mov,mp4,m4a,3gp,3g2,mj2,
from 'hdv09_04_h265_qsv.mp4':<br>
Metadata:<br>
major_brand : isom<br>
minor_version : 512<br>
compatible_brands:
isomiso2mp41<br>
encoder : Lavf61.1.100<br>
Duration: 00:03:58.88, start:
0.000000, bitrate: 3359 kb/s<br>
Stream #0:0[0x1](und): Video:
hevc (Rext) (hev1 / 0x31766568),
yuv422p(tv, bt709/unknown/unknown,
top coded first (swapped)),
1440x1080 [SAR 4:3 DAR 16:9], 3223
kb/s, 25 fps, 25 tbr, 12800 tbn
(default)<br>
Metadata:<br>
handler_name :
VideoHandler<br>
vendor_id :
[0][0][0][0]<br>
Stream #0:1[0x2](und): Audio:
aac (LC) (mp4a / 0x6134706D),
48000 Hz, stereo, fltp, 129 kb/s
(default)<br>
Metadata:<br>
handler_name :
SoundHandler<br>
vendor_id :
[0][0][0][0]<br>
<br>
</div>
</blockquote>
<div><br>
</div>
<div><br>
</div>
<div>ah, so it need tv range .. try
also with Pixels nv12 (worked for me
on mediacodec)<br>
</div>
</div>
</div>
</blockquote>
<br>
Not really.,<br>
Also the default at first startup,
appearance BT.601-PAL/MJPEG, worked, and
then ffprobe output<br>
Stream #0:0[0x1](und): Video: hevc (Rext)
(hev1 / 0x31766568), yuv422p(pc,
bt470bg/unknown/unknown, top coded first
(swapped)), 1440x1080 [SAR 4:3 DAR 16:9],
3248 kb/s, 25 fps, 25 tbr, 12800 tbn
(default)<br>
<br>
I just changed it to BT.701/MPEG which is
for HD video, and I also remembed you also
suggested this in a previous thread.<br>
<br>
Both yuv422 and nv12 work.<br>
<br>
But why isn't also the usual yuv420p
available for h264 and h265?<br>
</div>
</blockquote>
</div>
</div>
<div dir="auto"><br>
</div>
<div dir="auto">not sure, may be qsv library does
not support this?</div>
<div dir="auto"><br>
</div>
<div dir="auto">at least I can't see it in source</div>
<div dir="auto"><br>
</div>
<div dir="auto"><a
href="https://git.ffmpeg.org/gitweb/ffmpeg.git/blob/HEAD:/libavcodec/qsvenc_hevc.c#l399"
target="_blank" rel="noreferrer"
moz-do-not-send="true"
class="moz-txt-link-freetext">https://git.ffmpeg.org/gitweb/ffmpeg.git/blob/HEAD:/libavcodec/qsvenc_hevc.c#l399</a><br>
</div>
<div dir="auto"><br>
</div>
<div dir="auto"><br>
</div>
<div dir="auto">
<div class="gmail_quote">
<blockquote class="gmail_quote"
style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div> <br>
Possibly also rename h265 to hevc as ffmpeg
use?<br>
</div>
</blockquote>
</div>
</div>
<div dir="auto"><br>
</div>
<div dir="auto">ok, I'll rename it and add nv12 as
default pix format.</div>
<div dir="auto"><br>
</div>
<div dir="auto">can you also see if h264 works with
nv12?</div>
</div>
</blockquote>
<br>
No, h264 doesn't work with nv12, neither with #
profile=high<br>
<br>
I've extracted three ffmpeg QSV code lines below with
qsv and yuv420p used from<br>
<a
href="https://trac.ffmpeg.org/wiki/Hardware/QuickSync#FullExamples"
target="_blank" rel="noreferrer"
moz-do-not-send="true" class="moz-txt-link-freetext">https://trac.ffmpeg.org/wiki/Hardware/QuickSync#FullExamples</a><br>
<br>
<font face="Courier New, Courier, monospace">ffmpeg
-hwaccel qsv -c:v h264_qsv -i input.mp4 -vf
hwdownload,format=nv12 -pix_fmt yuv420p output.yuv<br>
ffmpeg -hwaccel qsv -c:v h264_qsv -i input.mp4 -vf
hwdownload,format=nv12 -pix_fmt yuv420p -f sdl -<br>
ffmpeg -init_hw_device qsv=hw -filter_hw_device hw -f
rawvideo -pix_fmt yuv420p -s:v 1920x1080 -i input.yuv
-vf hwupload=extra_hw_frames=64,format=qsv -c:v
h264_qsv -b:v 5M output.mp4<br>
</font><br>
<br>
On the other hand the following VAAPI section and code
lines from<br>
'The encoders only accept input as VAAPI surfaces. If
the input is in normal memory, it will need to be
uploaded before giving the frames to the encoder - in
the ffmpeg utility, the <code>hwupload</code> filter
can be used for this. It will upload to a surface with
the same layout as the software frame, so it may be
necessary to add a <code>format</code> filter
immediately before to get the input into the right
format (hardware generally wants the <code>nv12</code>
layout, but most software functions use the <code>yuv420p</code>
layout). The <code>hwupload</code> filter also requires
a device to upload to, which needs to be defined before
the filter graph is created.' <br>
<br>
<font face="Courier New, Courier, monospace">ffmpeg
-vaapi_device /dev/dri/renderD128 -i input.mp4 -vf
'format=nv12,hwupload' -c:v h264_vaapi output.mp4<br>
<br>
</font><br>
and from my own ffmpeg test<br>
<br>
<font face="Courier New, Courier, monospace">ffmpeg
-hide_banner -hwaccel_output_format qsv -i
hdv09_04.m2t hdv09_04_h264_qsv.mp4<br>
</font></div>
</blockquote>
</div>
</div>
<div dir="auto"><br>
</div>
<div dir="auto"><br>
</div>
<div dir="auto">note that this line uses *software* x264
encoder, not qsv.</div>
</div>
</blockquote>
<br>
Yeah, I was confused by <font
face="Courier New, Courier, monospace">the "-hwaccel_output_format
qsv"<br>
See below for another attempt<br>
<br>
</font>
<blockquote type="cite"
cite="mid:CA+rFky64KkPB-fhsDfQqnoRp5U0g2mh9ink7euwUx+YzhDNh3g@mail.gmail.com">
<div dir="auto">
<div dir="auto"><br>
</div>
<div dir="auto">Does av1_qsv/vp9_qsv works? Can you also try
with progressive (not interlaced) video?</div>
<br>
</div>
</blockquote>
Sorry, none of av1_qsv nor vp9_qsv pixel formats work (interlaced
hdv input)<br>
I was looking for a progressive video to download?<br>
<br>
But I tested "h284_qsv/nv12/profile high" rendering wiht SD-DV file
(interlaced) and it worked<br>
<br>
<font face="Courier New, Courier, monospace">FFStream::encode_frame:
encode failed.<br>
file: /Videoklipp/QSV/dv01_07_h264_qsv.mp4<br>
err: Resource temporarily unavailable<br>
FFStream::flush failed<br>
:<a class="moz-txt-link-freetext" href="file:/Videoklipp/QSV/dv01_07_h264_qsv.mp4">file:/Videoklipp/QSV/dv01_07_h264_qsv.mp4</a><br>
err: Operation not permitted<br>
Render::render_single: Session finished.<br>
** rendered 2832 frames in 5.592 secs, 506.438 fps<br>
audio0 pad 32 0 (32)</font><br>
<br>
---------------------<br>
<br>
What about this modified ffmpeg code line?<br>
<br>
ffmpeg -hide_banner -hwaccel_output_format qsv -i hdv09_04.m2t
-pix_fmt p010le -c:v hevc_qsv -profile:v main10
hdv09_04_hevc_qsv.mp4<br>
<font face="monospace">[mpeg2video @ 0x559aa0f2b740] Invalid frame
dimensions 0x0.<br>
Last message repeated 3 times<br>
[mpegts @ 0x559aa0f26080] PES packet size mismatch<br>
[mpegts @ 0x559aa0f26080] Packet corrupt (stream = 1, dts =
258142320).<br>
[mpegts @ 0x559aa0f26080] Could not find codec parameters for
stream 2 (Unknown: none ([160][0][0][0] / 0x00A0)): unknown codec<br>
Consider increasing the value for the 'analyzeduration' (0) and
'probesize' (5000000) options<br>
[mpegts @ 0x559aa0f26080] Could not find codec parameters for
stream 3 (Unknown: none ([161][0][0][0] / 0x00A1)): unknown codec<br>
Consider increasing the value for the 'analyzeduration' (0) and
'probesize' (5000000) options<br>
Input #0, mpegts, from 'hdv09_04.m2t':<br>
Duration: 00:03:59.06, start: 2629.496000, bitrate: 26110 kb/s<br>
Program 100 <br>
Stream #0:0[0x810]: Video: mpeg2video (Main) ([2][0][0][0] /
0x0002), yuv420p(tv, bt709, top first), 1440x1080 [SAR 4:3 DAR
16:9], 25000 kb/s, 25 fps, 25 tbr, 90k tbn<br>
Side data:<br>
cpb: bitrate max/min/avg: 25000000/0/0 buffer size:
7340032 vbv_delay: N/A<br>
Stream #0:1[0x814]: Audio: mp2 (mp3float) ([3][0][0][0] /
0x0003), 48000 Hz, stereo, fltp, 384 kb/s<br>
Stream #0:2[0x815]: Unknown: none ([160][0][0][0] / 0x00A0)<br>
Stream #0:3[0x811]: Unknown: none ([161][0][0][0] / 0x00A1)<br>
Stream mapping:<br>
Stream #0:0 -> #0:0 (mpeg2video (native) -> hevc
(hevc_qsv))<br>
Stream #0:1 -> #0:1 (mp2 (native) -> aac (native))<br>
Press [q] to stop, [?] for help<br>
libva info: VA-API version 1.22.0<br>
libva info: Trying to open /usr/lib64/dri/iHD_drv_video.so<br>
libva info: Found init function __vaDriverInit_1_21<br>
libva info: va_openDriver() returns 0<br>
libva info: VA-API version 1.22.0<br>
libva info: Trying to open /usr/lib64/dri/iHD_drv_video.so<br>
libva info: Found init function __vaDriverInit_1_21<br>
libva info: va_openDriver() returns 0<br>
[hevc_qsv @ 0x559aa0f2d840] Using the constant quantization
parameter (CQP) by default. Please use the global_quality option
and other options for a quality-based mode or the b option and
other options for a bitrate-based mode if the default is not the
desired choice.<br>
Output #0, mp4, to 'hdv09_04_hevc_qsv.mp4':<br>
Metadata:<br>
encoder : Lavf61.1.100<br>
Stream #0:0: Video: hevc (hev1 / 0x31766568), p010le(tv, bt709,
top coded first (swapped)), 1440x1080 [SAR 4:3 DAR 16:9], q=2-31,
25 fps, 12800 tbn<br>
Metadata:<br>
encoder : Lavc61.3.100 hevc_qsv<br>
Side data:<br>
cpb: bitrate max/min/avg: 0/0/0 buffer size: 0 vbv_delay:
N/A<br>
Stream #0:1: Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz,
stereo, fltp, 128 kb/s<br>
Metadata:<br>
encoder : Lavc61.3.100 aac<br>
[mpegts @ 0x559aa0f26080] PES packet size mismatch0:03:49.92
bitrate=26241.8kbits/s dup=12 drop=0 speed= 23x <br>
[mpegts @ 0x559aa0f26080] Packet corrupt (stream = 1, dts =
258142320).<br>
[mpeg2video @ 0x559aa0f56fc0] ac-tex damaged at 10 61<br>
[mpeg2video @ 0x559aa0f56fc0] Warning MVs not available<br>
[mpeg2video @ 0x559aa0f56fc0] concealing 630 DC, 630 AC, 630 MV
errors in P frame<br>
[vist#0:0/mpeg2video @ 0x559aa0f2e100] [dec:mpeg2video @
0x559aa103c340] corrupt decoded frame<br>
[out#0/mp4 @ 0x559aa0f5d600] video:756129KiB audio:3774KiB
subtitle:0KiB other streams:0KiB global headers:0KiB muxing
overhead: 0.024395%<br>
frame= 5977 fps=575 q=-0.0 Lsize= 760088KiB time=00:03:58.77
bitrate=26077.3kbits/s dup=14 drop=0 speed= 23x <br>
[aac @ 0x559aa0f5c000] Qavg: 488.617</font><br>
<br>
<br>
ffprobe -hide_banner hdv09_04_hevc_qsv.mp4<br>
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'hdv09_04_hevc_qsv.mp4':<br>
Metadata:<br>
major_brand : isom<br>
minor_version : 512<br>
compatible_brands: isomiso2mp41<br>
encoder : Lavf61.1.100<br>
Duration: 00:03:59.08, start: 0.000000, bitrate: 26044 kb/s<br>
Stream #0:0[0x1](und): Video: hevc (Main 10) (hev1 / 0x31766568),
yuv420p10le(tv, bt709, top coded first (swapped)), 1440x1080 [SAR
4:3 DAR 16:9], 25908 kb/s, 25 fps, 25 tbr, 12800 tbn (default)<br>
Metadata:<br>
handler_name : VideoHandler<br>
vendor_id : [0][0][0][0]<br>
encoder : Lavc61.3.100 hevc_qsv<br>
Stream #0:1[0x2](und): Audio: aac (LC) (mp4a / 0x6134706D), 48000
Hz, stereo, fltp, 129 kb/s (default)<br>
Metadata:<br>
handler_name : SoundHandler<br>
vendor_id : [0][0][0][0]<br>
<br>
----------------------------------------------------------------------<br>
<br>
Else I've used ffmpeg to query the supported Qsv formats as follows:<br>
<br>
<font face="Courier New, Courier, monospace">ffmpeg -hide_banner -h
encoder=hevc_qsv | egrep 'Supported|profile|main'<br>
Supported hardware devices: qsv qsv qsv<br>
Supported pixel formats: nv12 p010le p012le yuyv422 y210le qsv
bgra x2rgb10le vuyx xv30le<br>
-profile <int> E..V....... (from 0 to
INT_MAX) (default unknown)<br>
main 1 E..V.......<br>
main10 2 E..V.......<br>
mainsp 3 E..V.......<br>
main 0 E..V.......<br>
<br>
ffmpeg -hide_banner -h encoder=h264_qsv | egrep
'Supported|profile|main'<br>
Supported hardware devices: qsv qsv qsv<br>
Supported pixel formats: nv12 qsv<br>
-profile <int> E..V....... (from 0 to
INT_MAX) (default unknown)<br>
main 77 E..V.......<br>
<br>
<br>
ffmpeg -hide_banner -h encoder=av1_qsv | egrep
'Supported|profile|main'<br>
Supported hardware devices: qsv qsv qsv<br>
Supported pixel formats: nv12 p010le qsv<br>
-profile <int> E..V....... (from 0 to
INT_MAX) (default unknown)<br>
main 1 E..V.......<br>
<br>
ffmpeg -hide_banner -h encoder=vp9_qsv | egrep
'Supported|profile|main'<br>
Supported hardware devices: qsv qsv qsv<br>
Supported pixel formats: nv12 p010le vuyx qsv xv30le<br>
-profile <int> E..V....... (from 0 to
INT_MAX) (default unknown)<br>
profile0 1 E..V.......<br>
profile1 2 E..V.......<br>
profile2 3 E..V.......<br>
profile3 4 E..V.......<br>
<br>
ffmpeg -hide_banner -h encoder=vp9_qsv | egrep 'Supported|main'<br>
Supported hardware devices: qsv qsv qsv<br>
Supported pixel formats: nv12 p010le vuyx qsv xv30le</font><br>
<br>
--------------<br>
<br>
And also to compare actual pixel formats<br>
<br>
<font face="Courier New, Courier, monospace">ffmpeg -hide_banner
-pix_fmts | egrep 'yuv420p|p010le|yuv422p'</font><br>
<font face="Courier New, Courier, monospace">-------<br>
Pixel formats:<br>
I.... = Supported Input format for conversion<br>
.O... = Supported Output format for conversion<br>
..H.. = Hardware accelerated format<br>
...P. = Paletted format<br>
....B = Bitstream format<br>
FLAGS NAME NB_COMPONENTS BITS_PER_PIXEL BIT_DEPTHS<br>
-----</font><br>
<font face="Courier New, Courier, monospace">IO...
yuv420p 3 12 8-8-8<br>
IO... yuv422p 3 16 8-8-8<br>
IO... yuv420p16le 3 24 16-16-16<br>
IO... yuv420p16be 3 24 16-16-16<br>
IO... yuv422p16le 3 32 16-16-16<br>
IO... yuv422p16be 3 32 16-16-16<br>
IO... yuv420p9be 3 13 9-9-9<br>
IO... yuv420p9le 3 13 9-9-9<br>
IO... yuv420p10be 3 15 10-10-10<br>
IO... yuv420p10le 3 15 10-10-10<br>
IO... yuv422p10be 3 20 10-10-10<br>
IO... yuv422p10le 3 20 10-10-10<br>
IO... yuv422p9be 3 18 9-9-9<br>
IO... yuv422p9le 3 18 9-9-9<br>
IO... yuv420p12be 3 18 12-12-12<br>
IO... yuv420p12le 3 18 12-12-12<br>
IO... yuv420p14be 3 21 14-14-14<br>
IO... yuv420p14le 3 21 14-14-14<br>
IO... yuv422p12be 3 24 12-12-12<br>
IO... yuv422p12le 3 24 12-12-12<br>
IO... yuv422p14be 3 28 14-14-14<br>
IO... yuv422p14le 3 28 14-14-14<br>
IO... p010le 3 15 10-10-10<br>
</font><br>
-----------------------------<br>
<br>
And as extracted from <br>
cuda - Understanding pixel format and profile when encoding 10-bit
video in ffmpeg with nvenc - Super User<br>
<a class="moz-txt-link-freetext" href="https://superuser.com/questions/1614571/understanding-pixel-format-and-profile-when-encoding-10-bit-video-in-ffmpeg-with">https://superuser.com/questions/1614571/understanding-pixel-format-and-profile-when-encoding-10-bit-video-in-ffmpeg-with</a><br>
<br>
<font face="Courier New, Courier, monospace">Hardware HEVC encoder
uses pixel formats p010le and p016le for 10-bit output <br>
where first one produces yuv 4:2:0 and the second one yuv 4:4:4.</font><strong>Params
explanation:</strong>
<ul>
<li><code>-pix_fmt p010le</code> converts 8bit input into 10bit;
note that conversion is done by CPU so it makes the encoding
slower but produces better quality video and in CRF also lower
bitrate (smaller file). For CUDA decoder must be used with <code>-vf
"hwdownload,format=nv12"</code> (or <code>-vf
"hwdownload,format=p010le"</code> for 10 bit input video) to
copy decoded frames from CUDA into CPU for conversion (NVDEC
decoder sends frames into CPU automatically.) Specifying <code>-profile
main10</code> is required to allow 10bit encoding but does not
accually affect how the encoder encodes the video - encoder
itself does not change the bit depth of the input!</li>
</ul>
<div class="s-prose js-post-body" itemprop="text">
<p>According to <a
href="https://www.reddit.com/r/ffmpeg/comments/c1im2i/encode_4k_hdr_pixel_format/"
rel="nofollow noreferrer">this reddit post</a> by @Anton1699:</p>
<blockquote>
<p><strong>p010le is equivalent to yuv420p10le</strong> (it's
10-bit video with 4:2:0 subsampling = 15-bit per pixel).</p>
</blockquote>
<p>I have yet to find a more authoritative source in
documentation.</p>
<p><code>p010le</code> is supported by nvenc. The output log also
indicates that this works. As a result, I put this up as a
tentative answer. Sample command:</p>
<p><code>ffmpeg -i input.mkv -pix_fmt p010le -c:v hevc_nvenc
-profile:v main10 -cq 21 out.mkv</code></p>
</div>
<br>
</body>
</html>