[FFmpeg-user] overlay_qsv with hardware decode and encode

Vladimir Mishonov me at player701.net
Sat Mar 1 12:00:29 EET 2025


On 2025-03-01 11:28, BloodMan wrote:

> 
> I suspect colorspace, so try explicitly set on input (or convert) 
> colorspace maybe... There is a lot of options -vf, -pix_fmt, -sws_flags 
> etc. you can test - find them on ffmpeg wiki here
> https://trac.ffmpeg.org/wiki/colorspace
> 

Finally, managed to get it working!

ffmpeg \
  -hwaccel vaapi -hwaccel_output_format vaapi \
  -bsf:v 
h264_metadata=colour_primaries=1:transfer_characteristics=1:matrix_coefficients=1
  -i rtmp://localhost/stream1 \
  -hwaccel vaapi -hwaccel_output_format vaapi \
  -bsf:v 
h264_metadata=colour_primaries=1:transfer_characteristics=1:matrix_coefficients=1 
\
  -i rtmp://localhost/stream2 \
  -filter_complex "[0:v][1:v]overlay_vaapi=w=500" \
  -c:v h264_vaapi -global_quality 25 -g 50 -r 25 -an test.mkv

The output looks normal.

Thank you very much BloodMan, for pointing me in the right direction.

--
Kind regards,
Vladimir


More information about the ffmpeg-user mailing list