[FFmpeg-user] overlay_qsv with hardware decode and encode
BloodMan
bloodman at gmail.com
Sat Mar 1 10:28:19 EET 2025
Hi Vlad,
W dniu 2025-03-01 o 08:35, Vladimir Mishonov via ffmpeg-user pisze:
> On 2025-03-01 00:36, Vladimir Mishonov via ffmpeg-user wrote:
>> On 2025-02-28 23:26, BloodMan wrote:
>>> Hi Vladimir,
>>>
>>> I see on previous posts that resolutions are different, but also
>>> frame rates are different and colour spaces (bt709 vs "") are different.
>>>
>>> Are you really sure the problem is the resolution?
>>> (I have no way to check, I'm just thinking out)
>>
>> It is possible, but needs furher testing to say for sure.
>
> BloodMan, it turns out you were right!
>
> I've just tested with a spare RTSP IP camera that provides both a
> primary and a backup stream. Both streams have the same characteristics
> EXCEPT the resolution, of course.
>
> And this command works:
>
> ffmpeg -loglevel verbose \
> -hwaccel vaapi -hwaccel_output_format vaapi -rtsp_transport tcp -i
> rtsp://login:password@test.ip.camera/primary/stream \
> -hwaccel vaapi -hwaccel_output_format vaapi -rtsp_transport tcp -i
> rtsp://login:password@test.ip.camera/backup/stream \
> -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 produced video file contains the expected output.
>
> Of course I still need to figure out how to work around the case when
> the streams are from different sources and their properties might not
> match. If that is at all possible, of course.
> [...]
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
Have fun :)
--
BloodMan
More information about the ffmpeg-user
mailing list