What Is A Cube Video On Youtube
YouTube 360 video format
Written by Paul BourkeJanuary 2020
See the similar, simply more complex conversion of frames from the GoPro MAX 360 Action Camera.
In the following the internal format YouTube uses to shop 360 video content will exist explained. Every bit with many documents in the technology space this may be out of engagement in the future as YouTube may cull to change the way they store 360 videos.
When 360 video, monoscopic or stereoscopic, is uploaded to YouTube it is by and large in the equirectangular format. This is the default format created by the vast majority of software provided by the camera manufacturers, and others. YouTube does not retain this format merely instead remaps the footage. If you later download the footage and so information technology appears in that new remapped format. For example, here is a single frame from a downloaded 4K YouTube video.
While i might be tempted to think this is two partial panoramas, information technology is in fact the six faces of the conventional cube map. The layout is slightly cunning in that information technology forms two strips, upper and lower half of the image. The upper strip contains faces left-front-right and the bottom strip contains faces lesser-back-tiptop, noting that the face names can vary depending on conventions. This is essentially splitting the cube into two halves and laying each apartment.
The discussion here is for the YouTube "4K" format, the other aspect ratios are only variations on this theme. Similarly knowing how this works should make it straightforward to piece of work out what is happening in the stereoscopic case.
In any pipeline to reconstruct the equirectangular one is likely to extract each confront, rotate according to local conventions (specially the orientation of the top and bottom faces), calibration to create foursquare images, and then run through a cube to equirectangular converter. The faces extracted, rotated and scaled are shown beneath. The reader should be able to make up one's mind which face came from where.
Converting downloaded YouTube movies dorsum to equirectangular tin exist readily scripted. The procedure might exist to utilise ffmpeg to extract the frames. ImageMagick "catechumen" to extract the 6 cube faces, utilize something similar cube2sphere to plow the cubemaps faces into equirectangular, and so finally edifice the moving picture again using ffmpeg, reassigning the audio rail. Of course the result will not be every bit skilful as the original due to these multiple image manipulation steps, multiple encodings and the farthermost pinch YouTube performs.
The final reconstructed equirectangular is shown beneath, noting that the equiangle version of the cube map projection is used.
For instance, the ImageMagick "convert" command lines for MacOS or Linux to extract the 6 cube maps from the YouTube frames might exist as follows
catechumen -crop 1280x1024+0+0 $1 -flip -resize 1280x1280\! frame_l.tga convert -crop 1280x1024+1280+0 $1 -flip -resize 1280x1280\! frame_f.tga convert -crop 1280x1024+2560+0 $1 -flip -resize 1280x1280\! frame_r.tga convert -ingather 1280x1024+0+1024 $1 -flip -rotate -90 -resize 1280x1280\! frame_d.tga catechumen -crop 1280x1024+1280+1024 $1 -flip -rotate 90 -resize 1280x1280\! frame_b.tga convert -crop 1280x1024+2560+1024 $1 -flip -rotate -xc -resize 1280x1280\! frame_t.tga
Notes
-
Why create a format based on cube maps where the horizontal and vertical resolution isn't the same? In the 4K case, the frame size is 3840x2048, and so each cube face is 1280x1024.
-
What is so special nearly an aspect ratio of 1.875 (3840x2048), the possible explanation of the uneven horizontal and vertical resolution? For square faces, each being 1280 pixels, the frame size would be 3840x2560. Or for a 1K foursquare cube map the overall frame size would be 3072x2048, an aspect of i.5. Why were these seemingly more sensible attribute ratios not chosen?
-
The resolution of "2K" footage is 2560x1440, aspect ratio of 16x9. In this case there is not even an integer number of pixels for each face, 2560/3 = 853.3333...?! A strange choice. Fortunately information technology is a rather mute point given who would want 2K 360 video anyway, even 4K with the extreme YouTube pinch is questionable, doubly and then for stereoscopic 360 video.
Processing video using ffmpeg
An ffmpeg command line contributed by Rodrigo Polo is given beneath. It uses the versatile "v360" command set convert the frames from a YouTube 360 video directly to an equirectangular movie.
ffmpeg \ -y \ -hide_banner \ -i input.mkv \ -vf "v360=c3x2:due east:cubic:in_forder='lfrdbu':in_frot='000313',scale=3840:1920,setsar=one:1" \ -pix_fmt yuv420p -c:v libx264 -preset faster -crf 21 \ -c:a copy -ss xvi -t x -movflags +faststart \ output.mp4
Source: http://paulbourke.net/panorama/youtubeformat/
Posted by: rosstooll1958.blogspot.com
0 Response to "What Is A Cube Video On Youtube"
Post a Comment