Sunteți pe pagina 1din 3

How to create 180 SBS VR videos from 2 action cameras

for playback on Playstation PSVR

What you need:


2 action cameras: what I have and use for the following description are two cheap action
cameras called GoXtreme WiFi Speed

a mounting to combine both cameras in a fixed position next to each other: I simply glued
together the plastic brackets which already came together with the cameras (just try to get
the pointing direction aligned as good as possible)

a free program called ffmpeg to combine the two videos (for left and right eye) into one
video of a format called 180 SBS (side-by-side) for playback on the PSVR
Playstation 4 with PSVR Headset: I have just the regular PS4 (not Pro) and it works fine
the free app Littlstar installed on your Playstation and an USB stick for playback of the
final video on the PSVR headset

1/3
Idea:
The video of the action camera will not cover a full 180 angle of view, therefore we create a black
rectangle which represents 180 horizontally and 180 vertically. Then we position the video of our
camera in the middle of this black rectangle according to the actual angle of view of its lens. In case
of the GoXtreme WiFi Speed the angle of view depends on the selected recording resolution. At
Full HD (1920x1080 pixels with 60 frames per second) the recorded horizontal angle of the video is
about 115. Note: this is less then the advertised 170, which in most cases will additionally refer
not to the horizontal, but to a diagonal angle of view of the video anyway to sound better for
advertising.
We do this for the left and for the right video and combine it into one single video looking like this:

Procedure:
In my case it is given b=1920 px=115 and c=1080 px, therefore to get a=180 I need a=3000 px.
Rounding is fine because my measurement of 115 was also not really exact.

I name the video from the left camera left.MOV and the one from the right camera right.MOV.

Then with the following command line for ffmpeg the combination video can be created (I use this
in the Linux Terminal, but I think it should work identically in a Windows command prompt):

ffmpegileft.MOViright.MOVfilter_complex"[0:v]setpts=PTSSTARTPTS,
pad=width=6000:height=3000:x=540:y=960:color=black[left];[1:v]setpts=PTS
STARTPTS[right];[left][right]overlay=x=3540:y=960:eof_action=endall;[0:a]
[1:a]amerge,pan=stereo|c0<c0+c1|c1<c2+c3"result.mp4

In case of the GoXtreme WiFi Speed there is only one single microphone on each camera,
although it gets then saved as stereo. Therefore the above command line puts the audio of the left
camera to the left channel of the combination video and the audio of the right camera to the right
channel of the combination video.

Now we have a video, but 6000x3000 pixels is to large for our little Playstation. Because of this we
reduce the resolution. The maximum resolution and bitrate which worked in my case is a 4K video
of 3840x2160 pixels at 12 Mbit/s. Stretching of the aspect ratio is no problem, because the
Littlstar app will always stretch each video back to 180 vertically and 180 horizontally.
The command line to convert the 6000x3000 pixels video to a PSVR compatible version is this:

2/3
ffmpegiresult.mp4vfscale=3840:2160vcodeclibx264presetmedium
profile:vbaselinelevel5.1tunefilmx264params"nalhrd=cbr"b:v12M
minrate12Mmaxrate12Mbufsize15Macodeccopyresult_3840_12M_180_sbs.mp4

There are some requirements to the filename to allow the Littlstar app to recognize it correctly
(more details somewhere in the internet when searching for Littlstar):
the video file needs to be in a folder called littlstar (without e) which itself must be
directly at the root of the USB stick
the filename of the video needs to contain the phrase _180_sbs to be recognized as 180
SBS video
the filename of the video must not contain the phrases ou (stands for over-under, another
type of 3D video) and 360 (meaning 360 video)

Synchronicity:
To not get sick when viewing the action in the left and right video must be synchronous. Luckily the
GoXtreme WiFi Speed cameras have a infrared sensor with included remote which allows to start
the recording of both cameras at the same time (as long as the sun is not interfering with the
remote's signal). Usually it is sufficient, but sometimes one camera starts a few frames later, which
is not acceptable if you do not want to get headaches. This offset will definitely occur when you
start cameras by pressing their according record buttons independently. In any case you have to
compare both videos in any type of video editor which allows you to cycle through single video
frames. Note which side is too early and by how many frames. Then cut this side's video before
combining left and right side with the following ffmpeg command line which will cut off the first
0,0x seconds of a video. Calculate the necessary time by dividing the difference in frames by the
framerate of the video, e.g. 60 fps will mean 1 frame = 0,0166 seconds:

ffmpegss0.0xileft_tooearly.MOVleft.MOV

In my experience there was no problem with drifting (faster or slower recording) of one camera
compared to the other as long as the starting points are absolutely identical, but I only make clips of
a few minutes at a time, maybe longer videos will be more problematic.

Final notes:
When filming I find it best to mount the cameras on a tripod about at normal height of your eyes
and in a level position having the horizon in the middle of the frame. Shaky videos or strange angles
might mess up the viewer.

Now go and create some 3D video content of your family for great home movies and future
memories.

As proof of concept and for testing I have uploaded a short video created in this manner here:
http://www.filehosting.org/file/details/677975/result_3840_12M_180_sbs.mp4
or here:
http://www67.zippyshare.com/v/psGJuNh9/file.html

3/3

S-ar putea să vă placă și