How to generate a 360 degre video
YouTube Help: Upload 360-degree videos


  We recommend uploading  360 videos (equirectangular format with a 2:1 aspect ratio) at a resolution of 7168x3584 or higher, up to 8192x4096.


That means the format uses Equirectangular projection for capturing the view from all directions to a normal video format with a 2:1 aspect ratio. The projection should translate nicely to a raytracing engine with a simple mapping from pixel coordinates to the ray direction using the formula in the wiki article.