[FFmpeg-user] Trouble selecting a pixel format/colorspace while trying to encode a video using ffmpeg and HW accelerated vaapi or qsv interfaces
Carl Eugen Hoyos
ceffmpeg at gmail.com
Sat Dec 10 21:59:12 EET 2022
Am Do., 8. Dez. 2022 um 20:32 Uhr schrieb <caetano at vision.ime.usp.br>:
> Stream #0:0: Video: hevc (Rext), gbrp
Do all your video players play above file?
> ffmpeg -init_hw_device qsv=hw -filter_hw_device hw -v verbose
> -f x11grab -draw_mouse 0 -framerate 20 -probesize 42M
> -video_size 1920x1200 -thread_queue_size 1000 -vcodec rawvideo
> -i ":0.0" -an -vf 'hwupload=extra_hw_frames=64,scale_qsv=format=bgra'
> -c:v hevc_qsv -preset veryslow -global_quality 17 -look_ahead 1
> -y /tmp/output.mkv
(-vcodec rawvideo looks wrong)
When asking for support on this mailing list, always provide the command
line you tested together with the complete, uncut console output.
> As you can see, in the first example, libx265 SW encoder based, the output
> is generated with the "gbrp" colorspace while in the second example,
> hevc_qsv HW encoder based, the output is generated with the "yuvj420p"
> pixel format.
I wanted to write "no hardware encoders support full chroma" and
"no hardware encoders support RGB" - Wenbin's answer seems
to indicate that I was wrong but in any case the qsv code in FFmpeg
currently neither allows full-chroma encoding nor RGB encoding.
I don't know if mxf (the library used for qsv encoding) support
full-chroma and RGB.
No idea how your question could be related to post-processing
or colour-space transformation.
More information about the ffmpeg-user