VR-reversal
VR-reversal copied to clipboard
VR-Reversal - Player for conversion of 3D video to 2D with optional saving of head tracking data and rendering out of 2D copies.
VR-reversal
Uses MPV and a plugin to play a 3D side-by-side video as a 2D video, allows you to look around and zoom within the video, optionally logs the head motions to a file for later rendering out to a 2D video with ffmpeg.

Installation and Usage:
- Download the lastest MPV https://mpv.io/
- Download the 360plugin.lua plugin from this repo.
- Play a video using the plugin with the command:
mpv --script=360plugin.lua --script-opts=360plugin-enabled=yes videoFile.mp4
If you want to enable this script automatically on startup in your regular MPV, you can place the config file from the script-opts directory in the corresponding MPV config directory, along with the script itself in MPV's scripts directory. To activate auto-starting of the script every MPV session, change enabled=yes in the config file.
If you want to save the 2D versions videos rather than just watch them you'll need a recent version of ffmpeg from https://ffmpeg.org/ but it's not needed just for viewing.
Alternatively rather than using the command line, Microsoft Windows users may choose to:
- Place mpv.exe, vr-reversal.bat and 360plugin.lua (the latter two are available as a Zip file in releases) in the same directory.
- Run
vr-reversal.bat - Drag and drop videos onto the MPV window.
Controls
You can press ? to show all of the keyboard controls on screen at any time.
When the player is started, if the script is automatically enabled, you'll be looking straight forwards. If not type:
vto toggle the main feature on or off.
The video will start at a low resolution, if you'd like more detail press y increase the initial preview quality h to reduce it again.
yIncrease resolutionhdecrease resolution
Control where you're looking with the mouse:
- MouseLook: click anywhere in the video and your mouse position will control the camera, click again to stop mouse control
- MouseScroll: zoom in and out
or alternately look around with these keys:
i,j,k,llook aroundu,oroll head=,-zoomTABcenter view
Additional controls:
tswitch the eye you're looking through between left and righteswitch the video scaler between nearest neighbour and bicubicgtoggle mouse smoothingnstart / stop logging head motions to file (for later rendering)?display reminder of keyboard and mouse controls
Advanced projection controls:
90% of modern vr releases work perfectly with the defauls of 180 degree 'hequirect' projection so you shound't need these unless playing older or unusually formatted content:
rtoggle stereo mode between top/bottom and side by-sidebcycle input fov bounds between 180,360 and 901cycle through input projections2cycle through output projectionspcycle through 2D output modes including flat 2D, reprojected side by side and anaglyph modes.
Most of the standard default MPV controls are maintained:
Arrow keysseek through videoSPACEpauseffullscreen toggle9,0or/,*volume up and downmmute
And finally when you are done:
qquit
You can configure the default keybindings in the script-opts/360plugin.conf file, or override them in your input.conf file as usual.
'Head' Motion Logging and saving your clips
If you have pressed n during your session your 'head' movements in the video will be logged to a file named {originalFilename}_3dViewHistory_{sectionNumber}.txt this is in the format of motion commands to be processed by ffmpeg https://ffmpeg.org/
The script will create a batch file convert_3dViewHistory.bat after you exit the player, if you have ffmpeg installed you may simply run this file to perform the conversion to 2D .mp4 clips automatically.