Black bars occur if you don't fit the source to the full size of your stream or choose the wrong aspect ratio/resolution. You can check out the solutions in this post: How to fix OBS capture not working.