Hi, I’m Agata.
Our company has been uploading videos shot with VR180 on Youtube as an experiment for some time now. The following video was taken at random, but it seems to have been viewed unexpectedly.
I’ll start from the conclusion, but I was able to achieve this with the following command. (tested with ffmpeg 5.0.1).
The input files are taken with Insta360 EVO and exported with Insta360 Studio.
ffmpeg -i input.mp4 -vf v360=input=equirect:output=flat:ih_fov=180:iv_fov=180:h_fov=93:v_fov=121:in_stereo=sbs:w=1440:h=2560 -codec:v hevc -t 15 output.mp4
Option | Processing details |
---|---|
v360 | Filters for VR video. |
input=equirect | Input file settings. equirect indicates that the input file’s projection method is equirectangular. Since the Insta360EVO output is equirectangular, it is specified as such. |
output=flat | Output file settings, specifying that the output should be in 2D with FLAT. |
ih_fov=180 | Horizontal field of view of the input file; fixed at 180 because of VR180. |
iv_fov=180 | Vertical field of view of the input file; fixed at 180 because of VR180. |
h_fov=93 | Horizontal field of view of the output file. |
v_fov=121 | Vertical field of view of the output file. |
in_stereo=sbs | Specifies the stereo mode of the input file. Side by Side is specified here. |
w=1440 | Horizontal resolution of the output file. |
h=2560 | Vertical resolution of the output file. |
-codec:v hevc | hevc (H.265)で再エンコードする。 |
-t 15 | Cut out 15 seconds from the head. |
Regarding the FOV of the output file, this was set using the GoPro FOV values as a reference. However, this can be set arbitrarily, so you can set it to your own preference. Here, the vertical v_fov is the larger value because the output is for a short video. For normal horizontal screen output, swap the h_fov and v_fov values.
The output resolution was set as a WQHD (2560×1440) portrait screen with a value close to the original video resolution of 2880×2880 square. Here, too, the w and h values are swapped for horizontal screen output.
Finally, it is re-encoded in hevc, which is essentially unnecessary. However, this is done on purpose to remove metadata from the Insta360EVO.
It seems that the metadata of the Insta360EVO output video contains proprietary data and ffmpeg is unable to remove these parameters. For this reason, when uploaded to Youtube, the video is not recognised as a 2D video properly and is displayed strangely. To avoid this, we dare to re-encode with hevc. This is because ffmpeg does not take over metadata when re-encoding. Note that this is likely to be a problem unique to the Insta360EVO, so re-encoding may not be necessary when shooting with other VR180 cameras.
FFMPG has so many options that you can do just about anything, but finding a way to achieve what you want to do can be a challenge. This time, I had to search around quite a bit to find a way to do it. I hope it will be of help to those who have similar difficulties.