https://github.com/evgenii-d/panorama-viewer
360 Photo Video Panorama Viewer
https://github.com/evgenii-d/panorama-viewer
360-photo 360-video 360-view 360-viewer minimap unity vr vr-viewer
Last synced: 12 months ago
JSON representation
360 Photo Video Panorama Viewer
- Host: GitHub
- URL: https://github.com/evgenii-d/panorama-viewer
- Owner: evgenii-d
- License: mit
- Created: 2024-01-18T19:14:30.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2024-09-12T08:59:28.000Z (almost 2 years ago)
- Last Synced: 2025-06-09T10:04:15.121Z (about 1 year ago)
- Topics: 360-photo, 360-video, 360-view, 360-viewer, minimap, unity, vr, vr-viewer
- Language: C#
- Homepage:
- Size: 2.89 MB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# PanoramaViewer
360 Photo Video Panorama Viewer
Features:
* Automatic playback
* Transition between panoramas with a Fade In/Fade Out effect
* Zoom In with Right Mouse Button (Windows/Linux) or two-finger tap (Android)
* Switch between panoramas using the Arrow Left/Page Down and Arrow Right/Page Up keys (**autoPlay** must be set to `false`)
Made with Unity 2022.3.16.f
Tested on Windows 11 (23H2), Ubuntu 22.04, Android 13
## Compatible files
### 360 content
|Type|Images|Videos|
|----------|----------|----------|
|spherical (2:1)|+|+|
|stereo spherical equirectangular (1:1)|+|+|
|cubemap (6:1)|+||
### File formats
|Images|Videos|
|------|------|
|.jpg|.mp4 (H.264, H.265; AAC)|
|.png|.webm (VP8; Vorbis)|
#### Recommended encoding settings for ffmpeg
`ffmpeg -i input.mov -c:v libx264 -pix_fmt yuv420p -color_primaries bt709 -color_trc bt709 -colorspace bt709 -color_range pc -vf scale=XXXX:XXXX -preset medium -crf 23 -c:a aac output.mp4`
`ffmpeg -i input.mov -c:v libx265 -pix_fmt yuv420p -color_primaries bt709 -color_trc bt709 -colorspace bt709 -color_range pc -vf scale=XXXX:XXXX -profile:v main -level:v 3.0 -c:a aac output.mp4`
References:
* [Unity Manual. Video file compatibility][1]
* [Android for Developers. Supported media formats][2]
* [FFmpeg. H.264 Video Encoding Guide][3]
* [FFmpeg. H.265/HEVC Video Encoding Guide][4]
## Application Settings
There are two `.json` files that will be generated upon the first launch: **PanoramaViewerSettings** and **FreeCameraSettings**.
Path to the setting files:
* Android: `/storage/emulated//Android/data//files`
* Windows/Linux: Application folder
### PanoramaViewerSettings.json
```json
{
"autoPlay": true,
"imageDelay": 15.0,
"fadeDuration": 2.0,
"imageFormats": [
".jpg",
".png"
],
"videoFormats": [
".mp4",
".webm"
]
}
```
### FreeCameraSettings.json
```json
{
"fieldOfView": 60.0,
"mouseSensitivity": 1.0,
"zoom": true,
"zoomMagnification": 1.5
}
```
## Nota bene
### Android Settings
#### Build settings
Edit > Project Settings > Player > Android Settings > Other Settings
Under Configuration
* Set **Scripting Backend** to **IL2CPP**
* Disable ARMv7
* Enable ARM64
#### Custom Main Manifest
Edit > Project Settings > Player > Android Settings > Publishing Settings > Enable **Custom Main Manifest**
Example of custom manifest with additional permissions
```xml
```
### Include shaders
Edit > Project Settings > Graphics
Under **Built-in Shader Settings** change **Size** and select required shader
[1]:https://docs.unity3d.com/Manual/VideoSources-FileCompatibility.html
[2]:https://developer.android.com/media/platform/supported-formats#recommendations
[3]:https://trac.ffmpeg.org/wiki/Encode/H.264
[4]:https://trac.ffmpeg.org/wiki/Encode/H.265