Sunday, July 17, 2016

Annoying when Something Sneaks Through

Maybe this is a better fit for the Body on Games blog, but I don't feel like putting it there right now. Started recording in a new game the other day, and I noticed something in the recordings which seemed odd, but I didn't think much of it. I wish I had, but it could be worse.
My monitor has the unusual resolution of 2048x1152, but because it is the monitor's native resolution, that is what I record at. It is still 16x9, so what I do with most videos I intend to upload to YouTube is have FFmpeg scale them down to 1920x1080. Well, it turns out because OBS allows you to place a video source anywhere on the canvas, and to have it scaled down (or up) OBS was actually recording the game at 1920x1080, with black along the bottom and right side.
Fixing this required I rewrite the already complex FFmpeg commands to crop the videos down, but this was a pain because I had to do it in an already complex file that deals with two inputs, two outputs, and some six streams (two video and four audio). It was not easy, but I finally got it working.
At least the video was being recorded at 1920x1080, so I just have to crop and not scale, but because cropping requires the video be re-encoded, for best quality I have to do it at the same time as every other filter is applied. If I didn't, there would be some loss of quality. Took me quite a while to finally get the command logic right, but I did and the videos are being processed now. It's fixed for the future, so I don't have to worry about doing this again, unless I forget with a different game, and I hope I don't. This is a pain.

No comments:

Post a Comment