Difference between revisions of "CosmoViewerNG for Windows and Insta360 cams"
(26 intermediate revisions by the same user not shown) | |||
Line 3: | Line 3: | ||
Insta360 EVO can be connected only with Wi-Fi. Insta360 X2 can be connected with Wi-Fi or with USB cable. | Insta360 EVO can be connected only with Wi-Fi. Insta360 X2 can be connected with Wi-Fi or with USB cable. | ||
<br> | |||
I don't use Insta360 official SDK, i disagree with license restrictions. | |||
<br> | |||
[[File:Insta360-cams.jpg|700px|none]] | |||
==== Video instruction ==== | |||
<youtube>https://youtu.be/wxOBlYtEHEg</youtube> | |||
<br><br> | <br><br> | ||
Line 17: | Line 26: | ||
# In some cases also need to instal WinUSB driver, follow next steps<br> | # In some cases also need to instal WinUSB driver, follow next steps<br> | ||
# [https://zadig.akeo.ie Download Zadig application]<br> | # [https://zadig.akeo.ie Download Zadig application]<br> | ||
# Run Zadig and open menu Settings -> List All Devices [[File:Zadig-insta360-1.png| | # Run Zadig and open menu Settings -> List All Devices [[File:Zadig-insta360-1.png|700px|none]]<br> | ||
# Choose "Insta360 ONE" in list and click "Install driver" or "Reinstall driver" button [[File:Zadig-insta360-2.png| | # Choose "Insta360 ONE" in list and click "Install driver" or "Reinstall driver" button [[File:Zadig-insta360-2.png|700px|none]]<br> | ||
<br> | <br> | ||
==== Configuring CosmoViewerNG ==== | ==== Configuring CosmoViewerNG ==== | ||
# [https://cosmostreamer.com/wiki/index.php?title=CosmoViewerNG_for_Windows#Downloads Download CosmoViewerNG for Windows] | |||
# Run CosmoViewerNG application on PC<br> | # Run CosmoViewerNG application on PC<br> | ||
# Click "Application settings" icon (3rd icon from bottom in left panel)<br> | # Click "Application settings" icon (3rd icon from bottom in left panel)<br> | ||
# Go to chapter "Cameras". Choose "Insta360" in list and click "Save" [[File:Cosmoviewerng-insta360-1.png| | # Go to chapter "Cameras". Choose "Insta360" in list and click "Save" [[File:Cosmoviewerng-insta360-1.png|700px|none]] <br> | ||
# One or more devices should be found in list (the same camera but on diffent network interfaces) [[File:Cosmoviewerng-insta360-2.png| | # One or more devices should be found in list (the same camera but on diffent network interfaces) [[File:Cosmoviewerng-insta360-2.png|700px|none]]<br> | ||
# Click any device (better to use device with address "127.0.0.1") and you should see video if camera already connected. Settings available as "gears" icon in left panel [[File:Cosmoviewerng-insta360-4.png| | # Click any device (better to use device with address "127.0.0.1") and you should see video if camera already connected. Settings available as "gears" icon in left panel [[File:Cosmoviewerng-insta360-4.png|700px|none]]<br> | ||
# In settings change connection type (Wi-Fi or USB) [[File:Cosmoviewerng-insta360-5.png| | # In settings change connection type (Wi-Fi or USB) [[File:Cosmoviewerng-insta360-5.png|700px|none]]<br> | ||
<br> | <br> | ||
==== Changing preview resolution ==== | ==== Changing preview resolution ==== | ||
Click "Camera settings" icon, tab "Video output". Change resolution in list. Click on "Save" button is not needed | Click "Camera settings" icon, tab "Video output". Change resolution in list. Click on "Save" button is not needed | ||
[[File:Cosmoviewerng-insta360-7.png| | [[File:Cosmoviewerng-insta360-7.png|700px|none]] | ||
<br> | <br> | ||
Line 40: | Line 50: | ||
Most important feature - real-time stitching from two fisheyes into equirectangular format. It's strongly needed if you want to stream on Youtube. Unfortunately, Insta360 EVO and X2 does not support onboard stitching. Native Insta360 application can do stitching, but resolution is limited on 1280s. CosmoViewerNG can do stitching in 4K resolution (3840x1920) up to 60 FPS, but powerfull graphics card is needed for encoding stitched video in H264 codec. For example, my GTX 1650 SUPER is well fast for do 4K stitching on 30 FPS with a small latency, but in 60 FPS latency is big. | Most important feature - real-time stitching from two fisheyes into equirectangular format. It's strongly needed if you want to stream on Youtube. Unfortunately, Insta360 EVO and X2 does not support onboard stitching. Native Insta360 application can do stitching, but resolution is limited on 1280s. CosmoViewerNG can do stitching in 4K resolution (3840x1920) up to 60 FPS, but powerfull graphics card is needed for encoding stitched video in H264 codec. For example, my GTX 1650 SUPER is well fast for do 4K stitching on 30 FPS with a small latency, but in 60 FPS latency is big. | ||
<br> | <br> | ||
# Click "Camera settings" icon, tab "Stitching" [[File:Cosmoviewerng-insta360-6.png| | # Click "Camera settings" icon, tab "Stitching" [[File:Cosmoviewerng-insta360-6.png|700px|none]]<br> | ||
# Check option "Enable two-fisheyes to equirectangular stitching"<br> | # Check option "Enable two-fisheyes to equirectangular stitching"<br> | ||
# Other params is by default for Insta360 X2 camera, don't change it if you are not sure what you do<br> | # Other params is by default for Insta360 X2 camera, don't change it if you are not sure what you do<br> | ||
# "Resize output video" is usefull for Youtube streaming, to correct video resolution<br> | # "Resize output video" is usefull for Youtube streaming, to correct video resolution<br> | ||
# "HW acceleration" strongly recommended. At current moment only NVidia graphics cards are supported. | # "HW acceleration" strongly recommended. At current moment only NVidia graphics cards are supported. | ||
# Click "Save" and you should see video in equirectangular format [[File:Cosmoviewerng-insta360-8.jpg| | # Click "Save" and you should see video in equirectangular format [[File:Cosmoviewerng-insta360-8.jpg|700px|none]]<br> | ||
==== Stitching details ==== | ==== Stitching details ==== | ||
I use Gstreamer glshader element to make stitching. GLSL shader from this repo [https://github.com/izmhr/EquirectangularMapOnWebGL/tree/master/src https://github.com/izmhr/EquirectangularMapOnWebGL]<br> | I use Gstreamer glshader element to make stitching. GLSL shader from this repo [https://github.com/izmhr/EquirectangularMapOnWebGL/tree/master/src https://github.com/izmhr/EquirectangularMapOnWebGL]<br> | ||
Fragment shader file is placed in CosmoViewerNG installation directory, so you could change it if you want to do it better.<br> | Fragment shader file fisheye2eqrect.frag is placed in CosmoViewerNG installation directory, so you could change it if you want to do it better.<br> | ||
Stitching is not ideal yet, need to find better values. But it is already could be used. | Stitching is not ideal yet, need to find better values. But it is already could be used. | ||
<br><br> | <br><br> | ||
==== RTMP live stream ==== | |||
For example, live stream on Youtube in 4K resolution (3840x2160). | |||
<br> | |||
<youtube>https://youtu.be/ksKmp-wRZDM</youtube> | |||
<br> | |||
# Configure Youtube live stream in Youtube Studio, create (or modify current) stream key with 4K resolution and bitrate 13-30 Mbit/s | |||
# Connect Insta360 X2 or EVO to PC | |||
# Run CosmoViewerNG and configure Insta360 camera connection params, as i described before | |||
# Go to camera settings, tab "Stitching" and enable stitching. Use default params. | |||
# Youtube don't like native video resolution with 2:1 aspect ratio, so turn on "Resize output video" option and choose resizing resolution option 3840x2160. | |||
# Set output bitrate to 15000 (15 Mbit/s). You could use lower or greater value, 15000 is just for example. | |||
# Enable "HW acceleration" option (only if you have Nvidia based graphics card) [[File:Cosmoviewerng-insta360-9.jpg|700px|none]]<br> | |||
# In tab "Video output" set "Camera video stream format" to "3840x1920@30", disable "CosmoViewerNG app" option and enable "UDP stream", set Host 127.0.0.1 and Port 5000. Click "Save" [[File:Cosmoviewerng-insta360-10.jpg|700px|none]]<br> | |||
# Now open Application settings (3rd icon from bottom in left panel), chapter "Restreaming", tab "RTMP". Fill "RTMP URL" field with RTMP url and key (rtmp://a.rtmp.youtube.com/live2/YOUR_KEY) | |||
# Turn on option "Microphone enabled". Default audio capture device will be used as audio source | |||
# Don't enable option "Video transcoding enabled" ! | |||
# Also you could enable option "Show debug" to see what's happens [[File:Cosmoviewerng-insta360-11.jpg|700px|none]]<br> | |||
# Click "Save" | |||
# Now you can turn on/off streaming by clicking checkbox "Enabled". Yes, not usefull, i'll add streaming panel on main screen, but later. | |||
<br><br> | |||
==== Hardware ==== | |||
Insta360 cams already supported in Cosmostreamer on Raspberry Pi and Nvidia Jetson. On Raspberry Pi stitching does not works, on Jetson - should work but not tested yet. | |||
<br><br> | |||
Back to [[CosmoViewerNG for Windows]] | |||
[[Category:CosmoViewerNG]] | [[Category:CosmoViewerNG]] |
Latest revision as of 13:52, 3 June 2022
Insta360 EVO and Insta360 X2 tested. Other models should also work, but they need to be tested and confirmed.
Insta360 EVO can be connected only with Wi-Fi. Insta360 X2 can be connected with Wi-Fi or with USB cable.
I don't use Insta360 official SDK, i disagree with license restrictions.
Video instruction
Connection to camera
Wi-Fi connection
Just connect your PC Wi-Fi to Insta360 camera Wi-Fi network. Default password for EVO is 12345678, default password for X2 is 88888888.
Note: be carefull! The password on these Insta360 cameras cannot be changed even in the official app, so any of your neighbors can access your camera and, possible, to your PC if it connected to camera Wi-Fi. Discussion on Reddit
USB connection
- Switch USB mode on Insta360 X2 to "Android" (Swipe from up to down on Insta360 X2 display, swipe from right to left, click gears icon, menu "General" -> "USB mode", choose "Android")
- Connect your Insta360 X2 to PC with a standard USB-C cable.
- In some cases also need to instal WinUSB driver, follow next steps
- Download Zadig application
- Run Zadig and open menu Settings -> List All Devices
- Choose "Insta360 ONE" in list and click "Install driver" or "Reinstall driver" button
Configuring CosmoViewerNG
- Download CosmoViewerNG for Windows
- Run CosmoViewerNG application on PC
- Click "Application settings" icon (3rd icon from bottom in left panel)
- Go to chapter "Cameras". Choose "Insta360" in list and click "Save"
- One or more devices should be found in list (the same camera but on diffent network interfaces)
- Click any device (better to use device with address "127.0.0.1") and you should see video if camera already connected. Settings available as "gears" icon in left panel
- In settings change connection type (Wi-Fi or USB)
Changing preview resolution
Click "Camera settings" icon, tab "Video output". Change resolution in list. Click on "Save" button is not needed
Real-time panorama stitching
NVidia graphics card ONLY (at current moment)
Most important feature - real-time stitching from two fisheyes into equirectangular format. It's strongly needed if you want to stream on Youtube. Unfortunately, Insta360 EVO and X2 does not support onboard stitching. Native Insta360 application can do stitching, but resolution is limited on 1280s. CosmoViewerNG can do stitching in 4K resolution (3840x1920) up to 60 FPS, but powerfull graphics card is needed for encoding stitched video in H264 codec. For example, my GTX 1650 SUPER is well fast for do 4K stitching on 30 FPS with a small latency, but in 60 FPS latency is big.
- Click "Camera settings" icon, tab "Stitching"
- Check option "Enable two-fisheyes to equirectangular stitching"
- Other params is by default for Insta360 X2 camera, don't change it if you are not sure what you do
- "Resize output video" is usefull for Youtube streaming, to correct video resolution
- "HW acceleration" strongly recommended. At current moment only NVidia graphics cards are supported.
- Click "Save" and you should see video in equirectangular format
Stitching details
I use Gstreamer glshader element to make stitching. GLSL shader from this repo https://github.com/izmhr/EquirectangularMapOnWebGL
Fragment shader file fisheye2eqrect.frag is placed in CosmoViewerNG installation directory, so you could change it if you want to do it better.
Stitching is not ideal yet, need to find better values. But it is already could be used.
RTMP live stream
For example, live stream on Youtube in 4K resolution (3840x2160).
- Configure Youtube live stream in Youtube Studio, create (or modify current) stream key with 4K resolution and bitrate 13-30 Mbit/s
- Connect Insta360 X2 or EVO to PC
- Run CosmoViewerNG and configure Insta360 camera connection params, as i described before
- Go to camera settings, tab "Stitching" and enable stitching. Use default params.
- Youtube don't like native video resolution with 2:1 aspect ratio, so turn on "Resize output video" option and choose resizing resolution option 3840x2160.
- Set output bitrate to 15000 (15 Mbit/s). You could use lower or greater value, 15000 is just for example.
- Enable "HW acceleration" option (only if you have Nvidia based graphics card)
- In tab "Video output" set "Camera video stream format" to "3840x1920@30", disable "CosmoViewerNG app" option and enable "UDP stream", set Host 127.0.0.1 and Port 5000. Click "Save"
- Now open Application settings (3rd icon from bottom in left panel), chapter "Restreaming", tab "RTMP". Fill "RTMP URL" field with RTMP url and key (rtmp://a.rtmp.youtube.com/live2/YOUR_KEY)
- Turn on option "Microphone enabled". Default audio capture device will be used as audio source
- Don't enable option "Video transcoding enabled" !
- Also you could enable option "Show debug" to see what's happens
- Click "Save"
- Now you can turn on/off streaming by clicking checkbox "Enabled". Yes, not usefull, i'll add streaming panel on main screen, but later.
Hardware
Insta360 cams already supported in Cosmostreamer on Raspberry Pi and Nvidia Jetson. On Raspberry Pi stitching does not works, on Jetson - should work but not tested yet.
Back to CosmoViewerNG for Windows