AFathi / ARVideoKit

Capture & record ARKit videos 📹, photos 🌄, Live Photos 🎇, and GIFs 🎆.
Apache License 2.0
1.62k stars 226 forks source link

Black Bars on video output #112

Closed THEMaxNorman closed 4 years ago

THEMaxNorman commented 4 years ago

My video output is downsized or something. It is is like the image surrounded by black space. The raw buffer is the right size but at some point the buffer ends with black bars around it.

Anyone else have any ideas about what the issue could be?

I am using an ARSceneKit

THEMaxNorman commented 4 years ago

I have finally found a workaround, using foundation and Accelerate I used a resize pixel buffer function to crop and resize it. I am not sure of the performance hit this will create

var new_buffer = resizePixelBuffer(buffer, cropX: 640, cropY: 360, cropWidth: 1280, cropHeight: 720, scaleWidth: 1280, scaleHeight: 720)

Nerway commented 4 years ago

Does anybody else still have this problem, and @THEMaxNorman what does your resizePixelBuffer function do? Could you post it?