efschu
8th March 2025, 11:16
Hi,
I'm using the following script:
core.num_threads = 32
clip = video_in
stream0 = core.std.SelectEvery(core.trt.Model(core.resize.Bicubic(clip, width=1280, height=720, format=vs.RGBS, matrix_in_s='709'), engine_path="/root/Downloads/realesr-general-wdn-x4v3_opset16_V100_574_720.engine", num_streams=3, device_id=0), cycle=2, offsets=0)
stream1 = core.std.SelectEvery(core.trt.Model(core.resize.Bicubic(clip, width=1280, height=720, format=vs.RGBS, matrix_in_s='709'), engine_path="/root/Downloads/realesr-general-wdn-x4v3_opset16_V100_574_720.engine", num_streams=3, device_id=1), cycle=2, offsets=1)
clip = core.std.Interleave([stream0, stream1])
clip.set_output()
which gives me 27 fps using vspipe.
now i want to use this in realtime with MPV, so I must convert the clip to YUV at the end. but this takes to much CPU power, and the fps are dropping to 23fps, which makes it not usable in realtime.
clip = core.resize.Bicubic(clip, format=vs.YUV420P8, matrix_s='709')
is it possible to convert format on the GPU rather the CPU - or is it possible to use RGB output with MPV?
thnx in advance
I'm using the following script:
core.num_threads = 32
clip = video_in
stream0 = core.std.SelectEvery(core.trt.Model(core.resize.Bicubic(clip, width=1280, height=720, format=vs.RGBS, matrix_in_s='709'), engine_path="/root/Downloads/realesr-general-wdn-x4v3_opset16_V100_574_720.engine", num_streams=3, device_id=0), cycle=2, offsets=0)
stream1 = core.std.SelectEvery(core.trt.Model(core.resize.Bicubic(clip, width=1280, height=720, format=vs.RGBS, matrix_in_s='709'), engine_path="/root/Downloads/realesr-general-wdn-x4v3_opset16_V100_574_720.engine", num_streams=3, device_id=1), cycle=2, offsets=1)
clip = core.std.Interleave([stream0, stream1])
clip.set_output()
which gives me 27 fps using vspipe.
now i want to use this in realtime with MPV, so I must convert the clip to YUV at the end. but this takes to much CPU power, and the fps are dropping to 23fps, which makes it not usable in realtime.
clip = core.resize.Bicubic(clip, format=vs.YUV420P8, matrix_s='709')
is it possible to convert format on the GPU rather the CPU - or is it possible to use RGB output with MPV?
thnx in advance