Open ItsDonnyDev opened 11 months ago
Cannot confirm. I have tried running your code (after fixing it) with CallHook
set to true
and it worked properly for 3 different resolutions in windowed mode.
The code I ran is:
local CallHook = true//netReadBool()
local CaptureFunction = function()
local writer = video.Record({
container = "webm",
video = "vp8",
quality = 100,
audio = "vorbis",
bitrate = 2000,
fps = 1,
lockfps = 1,
name = "test5",
width = ScrW(),
height = ScrH(),
})
if writer == false then return end
writer:SetRecordSound( false )
writer:AddFrame(1, true)
writer:Finish()
end
if CallHook then
hook.Add("DrawOverlay", "CaptureFrame", function()
CaptureFunction()
hook.Remove("DrawOverlay", "CaptureFrame")
end)
else
CaptureFunction()
end
Requesting a re-open after revisiting this project a million years later..
Did several tests and none gave a different result until i opted out of the beta chromium gmod version. The issue apparently lies with
edit:
I added a temp fix as that specific width seems to be causing this
local scrW = ScrW() == 1366 and 1360 or math.Clamp(ScrW(), 0, 1920)
Tested this with several render and drawing hooks, and to my understanding the issue of my httpPost returning a distorted videoframe is a result of the codec not supporting this (or other, higher than 1920x1080 which i cannot test) resolution '1366x768'
765611984129011351701554912[1].webm