On 2025-02-28 23:26, BloodMan wrote:
Hi Vladimir,

W dniu 2025-02-28 o 20:21, Vladimir Mishonov via ffmpeg-user pisze:
ffmpeg \
 -hwaccel vaapi -hwaccel_output_format vaapi -i rtmp://localhost/stream1 \  -hwaccel vaapi -hwaccel_output_format vaapi -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 -f null -

And no, putting "scale_vaapi" before overlay here does not help.

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.

1) The FPS is likely not the problem, as the overlay filter uses the FPS of the first input and either drops or duplicates frames of the second one to match.

2) As for the colorspace, I'm not certain. I suppose it may be a hardware limitation that when the hardware decoder is initialized, it can only work with one colorspace at a time. But in this case, the produced error message must be quite misleading.

I have only two kinds of live-streaming sources available at the moment (the same that were demonstrated in the logs earlier). When any number of them is used as inputs, hardware decoding works only when all sources are of the same kind. But software decoding works with any combination of them.

However, I think I have a couple of unused cameras lying around; they are of the same model so anything like the FPS, colorspace etc. must match, but I could try setting a different resolution on the second one and see if it works. It probably won't, but I will of course report back if it does.

--
Kind regards,
Vladimir


--
BloodMan
_______________________________________________
ffmpeg-user mailing list
ffmpeg-user@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe".
_______________________________________________
ffmpeg-user mailing list
ffmpeg-user@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe".

Reply via email to