Difference between revisions of "Cosmostreamer settings"

From Cosmostreamer Wiki
Jump to navigation Jump to search
 
(155 intermediate revisions by the same user not shown)
Line 44: Line 44:
This option is shown only for certain "Camera types," such as DJI Goggles or DJI Fly drones. When enabled, Cosmostreamer attempts to automatically detect the connected camera type and switch to the appropriate "Camera type" making manual switching unnecessary.<br>
This option is shown only for certain "Camera types," such as DJI Goggles or DJI Fly drones. When enabled, Cosmostreamer attempts to automatically detect the connected camera type and switch to the appropriate "Camera type" making manual switching unnecessary.<br>
<pre>Need to disable this option (if enabled) before changing or entering a new license key!</pre>
<pre>Need to disable this option (if enabled) before changing or entering a new license key!</pre>
Demo: [https://www.instagram.com/p/DGT5kAgtszA/ https://www.instagram.com/p/DGT5kAgtszA/]
<br>
<br>


Line 78: Line 80:
<pre>Not all combinations of main and secondary cameras have been tested!</pre>
<pre>Not all combinations of main and secondary cameras have been tested!</pre>
<pre style="color:red">Tested only on Raspberry Pi 4!</pre>
<pre style="color:red">Tested only on Raspberry Pi 4!</pre>
<br>
Demo: [https://www.instagram.com/p/DGUHGiQomxX/ https://www.instagram.com/p/DGUHGiQomxX/]
<br><br>
[[File:Device-settings-chapter-secondary-camera.jpg|800px]]<br>
[[File:Device-settings-chapter-secondary-camera.jpg|800px]]<br>
<br>
<br>
Line 123: Line 126:
For example, "50,60,640,400" - means 50 pixels offset from the left side of display border, 60 pixels offset from the top, 640 pixels is the width of the window and 400 pixels is height of the window.<br>
For example, "50,60,640,400" - means 50 pixels offset from the left side of display border, 60 pixels offset from the top, 640 pixels is the width of the window and 400 pixels is height of the window.<br>
<br>
<br>


==Splash/Intro==
==Splash/Intro==
Line 140: Line 142:
<br>
<br>
Instead of implementing logo positioning, I chose a simpler approach — the logo image is displayed fullscreen, so you can place your small logo wherever you want using any image editor.<br>
Instead of implementing logo positioning, I chose a simpler approach — the logo image is displayed fullscreen, so you can place your small logo wherever you want using any image editor.<br>
One additional use case - safe zones. You could use a pre-made PNG image with a black (or with a custom transparency) in needed zones.<br>
<br>
<br>
Available parameters - just what video output use for showing a logo image.<br>
Available parameters - just what video output use for showing a logo image.<br>
<pre style="color:red">Possible to use only two video ports for the logo!!!</pre>
<pre style="color:red">Possible to use only two video ports for the logo!!!</pre>
<br>
 
Demo here: [https://www.instagram.com/p/Cy0NVIqrCT6/ https://www.instagram.com/p/Cy0NVIqrCT6/]
<br><br>
[[File:Device-settings-chapter-splash-logo.jpg|800px]]
[[File:Device-settings-chapter-splash-logo.jpg|800px]]
<br><br>
<br><br>
Line 165: Line 170:
* Frame rate - better to use 50 or 60 fps
* Frame rate - better to use 50 or 60 fps
* File size: up to 100 Megabytes
* File size: up to 100 Megabytes
<br>
Default Cosmostreamer background video in H264 codec: [https://cosmostreamer.com/apps/cosmostreamer-ng/download/cosmostreamer-intro-h264.mp4 https://cosmostreamer.com/apps/cosmostreamer-ng/download/cosmostreamer-intro-h264.mp4]<br>
Default Cosmostreamer background video in H265 codec: [https://cosmostreamer.com/apps/cosmostreamer-ng/download/cosmostreamer-intro-h265.mp4 https://cosmostreamer.com/apps/cosmostreamer-ng/download/cosmostreamer-intro-h265.mp4]<br>
<br>
<br>
[[File:Device-settings-chapter-splash-bgvideo.jpg|800px]]<br>
[[File:Device-settings-chapter-splash-bgvideo.jpg|800px]]<br>
Line 196: Line 205:


==Wi-Fi==
==Wi-Fi==
Raspberry Pi microcomputer has internal Wi-Fi interface. This interface can be used as an access point (by default) and also may be used for connection to another Wi-Fi access points or routers.<br>
Also USB Wi-Fi adapters can be used, so it's possible to use internal Wi-Fi as an access point and USB Wi-Fi adapter for local network or camera connection.<br>
<pre>Not all USB Wi-Fi adapters are compatible!</pre>
For example, this dual-band USB Wi-Fi adapter works fine: [https://www.pishop.ca/product/raspberry-pi-dual-band-5ghz-2-4ghz-usb-wifi-adapter-with-antenna/?searchid=0&search_query=USB+wi-fi https://www.pishop.ca/]<br>
<br>
<br>
===Tab Access Point===
===Tab Access Point===
By default, internal Wi-Fi on the Raspberry Pi configured in Access Point mode. This means you can connect your PC or smartphone to the Cosmostreamer's Wi-Fi access point.<br>
By default, internal Wi-Fi on the Raspberry Pi configured in Access Point mode. This means you can connect your PC or smartphone to the Cosmostreamer's Wi-Fi access point.<br>
Find Wi-Fi network "cosmostreamer" and connect to it using a default password "1234512345" (without a quotes).<br>
Find Wi-Fi network "cosmostreamer" and connect to it using a default password "1234512345" (without a quotes).<br>
<pre style="color:red">Using a default Wi-Fi password is not secure, anyone (who knows the default password) can connect to your device in this case! Don't forget to change default password.</pre>
<pre style="color:red">Using a default Wi-Fi password is not secure, anyone (who knows the default password) can connect to your device in this case! Don't forget to change default password.</pre>
<br>
Also possible to use USB Wi-Fi adapter to use Access Point on it, need just connect compatible USB Wi-Fi adapter to the Raspberry Pi and choose "USB Wi-Fi" instead of "Internal Wi-Fi" in the first field.<br>
Also possible to use USB Wi-Fi adapter to use Access Point on it, need just connect compatible USB Wi-Fi adapter to the Raspberry Pi and choose "USB Wi-Fi" instead of "Internal Wi-Fi" in the first field.<br>
<pre>Not all USB Wi-Fi adapters are compatible!</pre>
For example, this dual-band USB Wi-Fi adapter works fine: [https://www.pishop.ca/product/raspberry-pi-dual-band-5ghz-2-4ghz-usb-wifi-adapter-with-antenna/?searchid=0&search_query=USB+wi-fi https://www.pishop.ca/]<br>
<br>
<br>
[[File:Device-settings-chapter-wifi-ap.jpg|800px]]
[[File:Device-settings-chapter-wifi-ap.jpg|800px]]
Line 210: Line 221:


====SSID====
====SSID====
Wi-Fi network name for access point.<br>
Wi-Fi network name for access point.
<br>
<br>


====Password====
====Password====
Password for access point access.<br>
Password for access point access.
<br>
<br>


Line 222: Line 233:


====Mode====
====Mode====
Wi-Fi band 2.4GHz or 5.8GHz.<br>
Wi-Fi band 2.4GHz or 5GHz.<br>
<pre>Raspberry Pi Zero/Zero2 support only 2.4GHz band!</pre>
<pre>Raspberry Pi Zero/Zero2 Wi-Fi can work only in 2.4GHz band!</pre>
 
====Channel====
Wi-Fi channel. Use any channel from this list in 2.4GHz mode. And use 36 or 149 channel in 5GHz mode (as a most compatible).<br>
<br>
 
===Tab WLAN===
This page is for configuring Wi-Fi interface for connection to any Wi-Fi access point or router.<br>
Need to choose Wi-Fi interface (internal Wi-Fi or USB Wi-Fi adapter).<br>
<pre>One interface can be used only for one purpose, either access point or Wlan connection! Not the both at the same time.</pre>
 
====Subtab Main====
You could fill SSID (Wi-Fi network name) manually, or click button "Scan networks" and you will get the list of available Wi-Fi networks. And enter the correct password for connection to this Wi-Fi network.<br>
<br>
[[File:Device-settings-chapter-wifi-wlan1.jpg|800px]]
 
<br>
 
====Subtab Fallback====
This is just a one more Wi-Fi local network. Cosmostreamer will try to connect to this network if main Wi-Fi network is not available.<br>
<br>
<br>
[[File:Device-settings-chapter-wifi-wlan2.jpg|800px]]
<br><br>


====Subtab Static IP====
Here are just a settings for a static IP on Wi-Fi interface.<br>
<br>


===Tab WLAN===
====Subtab Emergency AP====
If this option enabled - Cosmostreamer will enable own Access Point (configured in tab "Access Point") if no connection to configured Wi-Fi network more than 60 seconds.<br>
<br>
<br>


===Tab Camera===
===Tab Camera===
This tab is for configuration a wireless connection to cameras like DJI Pocket3, DJI Action, etc.<br>
<br>
<br>
[[File:Device-settings-chapter-wifi-camera.jpg|800px]]
<br><br>


===System===
===Tab System===
This tab content is too little for a separate screenshot. It's just a country code for Wi-Fi connection. Leave this by default ("US").
<br><br>
 
==Display==
 
===Tab Video output===
[[File:Device-settings-chapter-display1.jpg|800px]]
<br>
<br>


==Display==
====Decode and show video stream from connected camera====
<br>
 
====Use all video ports====
<br>
 
====Vertical flip====
<br>
 
====Horizontal flip====
<br>
 
====Display custom rotation====
<br>
 
====Keep aspect ratio====
<br>
 
====Letterbox format====
<br>
 
====Smooth video====
<br>
 
====Source video crop====
<br>
 
 
 
 
<br>
 
===Tab Main display===
Main display is the only one port on Raspberry Pi models 3B/3B+, Zero/Zerow,Zero2W. And HDMI-0 port on Raspberry Pi 4 (nearest to USB-C port).<br>
Also possible to use analog video out (CVBS, composite, etc) instead of HDMI.<br>
<br>
[[File:Device-settings-chapter-display2.jpg|800px]]
<br>
 
====Current video mode====
Current video mode of the main video output port.
<br>
 
====Video output====
HDMI (default) or CVBS (analog video out).
<br>
 
====HDMI mode====
By default, the main video port is configured as "default." This means the video output resolution will be set during Raspberry Pi startup based on connected HDMI display best resolution. If no display is connected, the resolution will default to 640x480, as it is the most universally supported. To always use a fixed video output resolution, set the mode manually.<br>
Here you could choose any of standard HDMI modes.
<br>
 
====Show all modes====
If this option is not enabled, only the resolutions supported by the connected display will be available. If no display is connected, or if you want to test other resolutions, enable this option to see all standard video modes in the list.
<br>
 
====NTSC====
This option is for enabling NTSC mode, i.e. 59.94 instead of 60Hz, etc.
<br>
 
====Show app type image on display====
If this option is enabled you will see a small icon in the left top corner of the main video port. This icon indicates a currently used "camera type".<br>
For example, when current type is "DJI Goggles2/3/Integra/N3" you will see this:<br>
 
[[File:Apptype-icon.jpg|800px]]
<br>
<br>
This option is useful when multiple licenses installed on the Cosmostreamer device and [[#Allow_auto_detection | allow auto detection]] option is enabled.<br>
<br>
 
====Test button====
Clicking this button will apply the selected resolution to the main display, but it will not be saved to the configuration file.
<br>
 
====Save button====
This button saves the selected video mode to the configuration file, but does not apply the resolution immediately. The new resolution will take effect after the Raspberry Pi is restarted.
<br>
<br>
<br>
 
===Tab Secondary display===
This option is obsolete and should not be used. Please use the "[[#Use_all_video_ports|Use all video ports]]" option on the "Video Output" tab instead.<br>
 
[[File:Device-settings-chapter-display3.jpg|800px]]
<br>
<br>
 
===Tab DSI display===
This is for DSI display connected to the Raspberry Pi.<br>
Compatible displays:
* Official Raspberry Pi 7" touch display  (first model ONLY!) [https://www.raspberrypi.com/products/raspberry-pi-touch-display/ https://www.raspberrypi.com/products/raspberry-pi-touch-display/]
* Waveshare DSI displays up to 4.3" (check display description, there should be a label "driverless")
 
<pre style="color:red">Official Raspberry Pi Touch Display 2 is not supported in the current kernel version used in Cosmostreamer!</pre>
<pre style="color:red">Waveshare DSI displays bigger than 4.3" are not supported because Waveshare made a crypto protection and no driver compatible with the current kernel version used in Cosmostreamer</pre>
 
[[File:Device-settings-chapter-display4.jpg|800px]]
<br>
 
====Output video on DSI display====
This option to enable/disable video output on the DSI display. This option is disabled by default, because another option ("[[#Use_all_video_ports|Use all video ports]]" in the tab "Video output" do the same)
<br>
 
====DSI display vertical flip====
This option is for rotating whole display screen (not only video) on 180 degrees. Need to reboot Rpi after this option change.
<pre>This option does not works by default, need to manually edit file config.txt on the microSD in /boot partition. Just add "#" into a start of string "dtoverlay=vc4-fkms-v3d"</pre>
<br>
 
====Ignore DSI display====
Raspberry Pi 4 support only two video output ports in any of these combinations:
* HDMI-0 and HDMI-1
* HDMI-0 and DSI
* HDMI-1 and DSI
<pre style="color:red">Not possible to use HDMI-0 and HDMI-1 and DSI!</pre>
But if you have DSI display connected to Raspberry Pi 4 and you want to use both HDMI ports - you could disable DSI display output, just enable this param.
<br>
 
===Tab SPI display===
Compatible SPI display models:
* Waveshare 2"
* Waveshare 3.5" revision A, B, and some other revisions.
 
These displays are not good: old TFT matrix, bad view angles, bad colors. Video output is software-based (not hardware), it's just a frame-to-frame copy of HDMI port content. This eats CPU a lot, but works up to 60Hz framerate.<br>
<br>
[[File:Device-settings-chapter-display5.jpg|800px]]
<br>
<br>
 
===Tab OSD===
This OSD (on-screen display) shows graphical overlay above the main video on HDMI contains some camera settings (ISO, shutter, EV, recording state, etc) and works only on Raspberry Pi models:
* Raspberry Pi 3B/B+
* Raspberry Pi Zero/ZeroW/Zero2W
<br>
This OSD is only for DJI Osmo, Pocket Osmo, Pocket2, Pocket3.<br>
 
<pre style="color:red">This is not DJI Goggles2/3/Integra/N3 OSD!!!</pre>
[[File:Device-settings-chapter-display6.jpg|800px]]
<br>
<br>
 
===Tab Touchscreen===
This page allows you to enable or disable touchscreen support. If a compatible touchscreen display is connected to the Raspberry Pi, it can be used but only for a few specific functions. You can control the camera gimbal by sliding your finger up/down or left/right on the touchscreen. Additionally, you can start or stop onboard recording with a double-tap on the left side of the screen, and start or stop RTMP streaming with a double-tap on the right side.
 
<pre style="color:red">There is no any GUI on the display for the using with a touchscreen!</pre>
[[File:Device-settings-chapter-display7.jpg|800px]]
<br>
<br>
<br>


==Video/Audio==
==Video/Audio==
===Tab Video===
Somtimes when we want to view the main video stream in web interface or CosmoViewerNG app remotely, via Internet, but the video bitrate is too big (for example, first DJI Pocket Osmo model - 30 mbit/s, DJI Goggles V1/V2 - 20-30 mbit/s, DJI FLy drones - 14-17 mbit/s, etc) - need to reduce this bitrate. Specially for this I made onboard transcoding.<br>
<br>
Raspberry Pi microcomputer decode the source video and then encode it again with the lower quality and lower bitrate. But GPU power (used for decoding/encoding) is limited, so transcoding does not works well in some cases. It works not good for the H264 video stream 1920x1080 at 50 or 60 fps and doesn't work for H265 streams at all.
<pre>If you need only use a transcoded video - disable video decoding for HDMI output, this allows transcoder to work better.</pre>
If real-time transcoding doesn't work well, it's possible to use an alternative workaround method - "Screen capture". In this case, the source video is displayed on HDMI as usual, while a separate application simultaneously captures the HDMI output and encodes it into a low-bitrate video stream.<br>
This way works independently on source video codec, so works universally, also it keeps all on-screen elements (splash image, logo, etc). But this method also has some limitations. Screen capture and encoding into H264 codec works better if HDMI port resolution is lower. So, for the best perfomance/quality ratio set HDMI mode (not the parameter in this section!) to 1280x720 or less.
<br><br>
[[File:Device-settings-chapter-video1.jpg|800px]]
<br><br>
===Tab Audio===
Audio Engine is the Cosmostreamer's subsystem for mixing audio streams from different sources and making the final audio stream available for HDMI output or for using in CosmoViewerNG app or web interface, or in restreams.<br>
Audio sources - background audio, audio from background video, main camera audio (for example, with DJI SDR camera type), USB audio capture (for example, DJI Mic or any USB microphone).<br>
<br>
[[File:Device-settings-chapter-video2.jpg|800px]]
<br>
====Enable Audio Engine====
Enable/Disable audio engine subsystem. Disabled by default to reduce CPU usage.
<br>
====Use audio capture====
Allows to use a USB audio capture (any USB microphone, DJI Mic, etc).
<br>
====Use auto gain if supported====
If USB audio capture has "auto gain" control - this allows it to be used.
<br>
====Audio capture volume====
Volume for USB audio capture device.
<br>
====Audio delay====
Not supported at current time (was broken some updates ago).<br>
<br>
<br>


Line 249: Line 477:


==Overlay camera==
==Overlay camera==
[[File:Device-settings-chapter-overlaycamera.jpg|800px]]
<br>
===Use Raspberry Pi camera as overlay camera===
A very old feature, but also may be useful.<br>
Allows to use a video from the native Raspberry Pi camera as a video overlay above the main video on HDMI display.<br>
Camera params - a standard params for the "raspivid" command.
<br>
===Use Gstreamer pipeline as overlay camera===
Allows to use a video from any custom Gstreamer pipeline. Main thing is output of the pipeline should be a H264 NAL units byte-stream.<br>
<br>
Example pipeline for using an external IP camera with IP 192.168.1.164 via RTSP protocol as overlay camera:<br>
<pre>rtspsrc location=rtsp://admin:12345678Aa@192.168.1.164/Streaming/Channels/101 do-timestamp=true ! rtph264depay</pre>
<br>
<br>


Line 273: Line 514:


==System==
==System==
===Tab Firmware===
This page is for the firmware update.<br>
Download a firmware update file (.csuf), choose this file by clicking button "Choose File" and click "Upload File" button.<br>
Latest Cosmostreamer's firmware update can be [https://cosmostreamer.com/apps/cosmostreamer-ng/download/cosmostreamer-ng.csuf downloaded here]<br><br>
<pre>In CosmoViewerNG app for Windows possible just click button "Update from server" and latest firmware will be downloaded and installed automatically. But only if PC with runned CosmoViewerNG application is connected to the Internet!</pre>
[[File:Device-settings-chapter-system1.jpg|800px]]
<br>
<br>
====Reset all settings====
This button is for resettings all Cosmostreamer's settings to the default.
<br>
====Restart server app====
This button is for restarting main Cosmostreamer application on the Cosmostreamer device. This is mostly for development process.
<br>
====Reboot device====
This button is for Cosmostreamer device reboot.<br>
<br>
===Tab Other===
[[File:Device-settings-chapter-system2.jpg|800px]]
<br><br>
====Mount file system in read-write mode at start====
By default, the microSD card is in read-only mode to reduce the risk of file system corruption.<br>
You could remount file system into read-write any time by the command via SSH:<br>
For root partition: <code>mount -o rw,remount /</code><br>
For /boot partition: <code>mount -o rw,remount /boot</code><br>
<br>
Or just enable this option. Root filesystem will be remounted in a read-write mode every time when Cosmostreamer powered on.
<br>
====Make preview images====
If this option enabled - Cosmostreamer will do a main HDMI display screenshot each 5 seconds and this image will be used as a preview icon in the CosmoViewerNG app for Windows.<br>
<pre style="color:red">This option may cause a HDMI display blinking if a lot of graphical overlays is enabled</pre>
[[File:Preview-image.jpg|800px]]
<br><br>
====Show battery alert image====
If this option is enabled (don't forget also to set timeout value in minutes) - a big red icon will be shown on the main display after this time since Cosmostreamer was powered on.<br>
I.e. if you know approximately how long your Cosmostreamer can run on battery power, enter that time in the settings — once it’s reached, you’ll get an on-screen warning.<br>
<br>
[[File:Battery-alert.jpg|800px]]
<br><br>
===Tab Authorization===
If this option enabled (don't forget to fill a "Username" and "Password" fields) - need to enter this when you trying to get access to Cosmostreamer's web interface.
<pre style="color:red">This protection does not work for access from CosmoViewerNG application!</pre>
[[File:Device-settings-chapter-system3.jpg|800px]]
<br><br>
===Tab Configs===
This for export (save from Cosmostreamer to local file on PC) and import (restoring from local file on PC) config files.<br>
There are two config files: a standard config.txt file for Raspberry Pi and cosmostreamer.conf - Cosmostreamer's config file.<br>
<br>
[[File:Device-settings-chapter-system4.jpg|800px]]
<br><br>

Latest revision as of 02:07, 24 June 2025

Cosmostreamer settings available in web interface, in CosmoViewerNG application for Windows and in CosmoViewerNG application for Mac.

Settings are the same, in this document I will use a web interface for the screenshots.

How to open Cosmostreamer device settings

Web interface

Click icon in the right bottom corner and choose "Device settings" item in the menu.

Device-settings-screenshot-web.png

CosmoViewerNG for Windows

Connect PC to the Cosmostreamer device, then click icon with gears in the left panel (second from the top).

Device-settings-screenshot-win.jpg

CosmoViewertNG for Mac

Connect Mac to the Cosmostreamer device, then click icon in the right bottom corner and choose "Device settings" item in the menu.

Device-settings-screenshot-mac.jpg

Settings Chapters


Info


Device-settings-chapter-info.jpg

Board model

Microcomputer model (Raspberry Pi model and revision)

Firmware version

Current version of Cosmostreamer

Device name

A human-readable name of the device, used in the device list in CosmoViewerNG app

Camera type

For historical reasons, all devices that work with the Cosmostreamer are referred to as a "Camera" - even if the device is not actually a camera, but, for example, a pair of DJI goggles, or DJI SDR receiver, or any other supported device. So let's say this is a "license type".

Allow auto detection

This option is shown only for certain "Camera types," such as DJI Goggles or DJI Fly drones. When enabled, Cosmostreamer attempts to automatically detect the connected camera type and switch to the appropriate "Camera type" making manual switching unnecessary.

Need to disable this option (if enabled) before changing or entering a new license key!

Demo: https://www.instagram.com/p/DGT5kAgtszA/

License


Device-settings-chapter-license.jpg

Camera type

Current "Camera type" choosen in chapter "Info".

Board ID

A hex-string, unique for each Raspberry Pi or any other microcontroller used for Cosmostreamer. Board ID never changes on the same Raspberry Pi after firmware update or any other manipulations.

QR code

Image contains Board ID and current firmware version in text form like this:

board_id=9127A1E6CEB16469F4D4F6563B138360CA78A1E2757E2376C39FC56824CB5BD3;app_type=23;ver=0.22.5;new=1

License key

Text string with the license key for current "Camera type" and Board ID. License keys stored independently for each "Camera type".

License key CAN'T be transfered from one Raspberry Pi to another!!!

"Install license key" button

Click on this button and entered key will be saved on microSD.

Multiple licenses archive uploading

May be used for uploading a .csuf file with two or more license keys inside.


Secondary camera

It's possible to use a two "Camera types" at the same time, but with some limitations and not for any type of the device. Only video will be available from this camera, no control, no telemetry.
For example, possible to use "DJI Goggles2/3/Integra/N3" and "DJI Goggles V1/V2" together. Or "DJI Goggles2/3/Integra/N3" and a "Webcam".

Not all combinations of main and secondary cameras have been tested!
Tested only on Raspberry Pi 4!

Demo: https://www.instagram.com/p/DGUHGiQomxX/

Device-settings-chapter-secondary-camera.jpg

Enable

Enable/disable secondary camera.

Secondary camera type

The same as a "Camera type" in chapter "Info", but here are not all types in this list.
At current time available options:

  • DJI Goggles V1/V2
  • DJI Goggles2/3/Integra/N3
  • RTMP Receiver
  • Webcam
  • Cosmostreamer Remote Client (license is not needed)
Before using in this list need to enter license for this "Camera type" as when it used as a main camera!

Show video on

Video port used for the secondary camera. HDMI-0, HDMI-1 or DSI.
Video may be full-screen on windowed (check next params).

Show ONLY when no main video active

As the name of this option suggests, video from the secondary camera will be shown only when the main camera is inactive.
Main use case - show video from a webcam when DJI Goggles2 is disconnected.

Show fullscreen

Show video from the secondary camera in a full-screen mode on the video port choosen in option "Show video on".
If this option disabled - video will be shown in a widow. Size and position of this window configurable in parameter "Show in window".

Send video to the main app if possible

If video stream from the secondary camera is in H264 or H265 codec - this video stream can be sent to the CosmoViewerNG application, it will look as a small window over the main video.

Send video to the web interface if possible

If video stream from the secondary camera is in H264 codec - this video stream can be sent to the web interface, it will look as a small window over the main video.

Show in window

When option "Show fullscreen" is disabled - video will be shown in a widow. This parameter is for window position and size.
For example, "50,60,640,400" - means 50 pixels offset from the left side of display border, 60 pixels offset from the top, 640 pixels is the width of the window and 400 pixels is height of the window.

Splash/Intro


Tab Splash screen

Splash screen - it's like a wallpaper. Any standard JPG or PNG image up to 1920x1080 pixels resolution. This Image will be shown on all connected displays when no active video from the main camera. On this settings page possible to upload a new splash screen image file.

Default splash screen file with Cosmostreamer logo (C/S) can be downloaded here

Device-settings-chapter-splash-splash.jpg

"Logo" is simply an additional image file (PNG with a transparent background). It is displayed in fullscreen mode on top of all other media including the splash screen, background video, or main camera video - so it is always visible. You can use it to overlay your own logo on the video.

Instead of implementing logo positioning, I chose a simpler approach — the logo image is displayed fullscreen, so you can place your small logo wherever you want using any image editor.
One additional use case - safe zones. You could use a pre-made PNG image with a black (or with a custom transparency) in needed zones.

Available parameters - just what video output use for showing a logo image.

Possible to use only two video ports for the logo!!!

Demo here: https://www.instagram.com/p/Cy0NVIqrCT6/

Device-settings-chapter-splash-logo.jpg

Tab Background video

When video from the main camera is not active (camera disconnected, etc) - background video will be played in the endless loop.
The main idea is that the video stream from the "background video" file follows the same path as the video from the main camera and is decoded by the same display application. However, Cosmostreamer uses two different display applications — one for H.264 video and one for H.265 video. That’s why there are two background videos in Cosmostreamer. The application automatically selects which one to use based on the codec of the most recently active video stream from the main camera.
You could upload a custom video file here. If uploaded video file encoded with H264 codec - it will be used when main stream in H264 codec (for example, with DJI Goggles2/3/Integra/N3 or DJI Goggles V1/V2). If video file encoded with H265 - this will be used when main video stream is in H265 (for example, with DJI Fly drones).

For correct work with Raspberry Pi, H264 encoded file should be encoded with these params:

  • Profile: main
  • Level 4.0 - 4.2
  • Constant bitrate (CBR)
  • Bitrate 1 - 7 mbit/s
  • Resolution - max 1920x1080
  • Frame rate - better to use 50 or 60 fps
  • File size: up to 100 Megabytes


For H265 files:

  • Resolution - max 1920x1080
  • Frame rate - better to use 50 or 60 fps
  • File size: up to 100 Megabytes


Default Cosmostreamer background video in H264 codec: https://cosmostreamer.com/apps/cosmostreamer-ng/download/cosmostreamer-intro-h264.mp4
Default Cosmostreamer background video in H265 codec: https://cosmostreamer.com/apps/cosmostreamer-ng/download/cosmostreamer-intro-h265.mp4


Device-settings-chapter-splash-bgvideo.jpg

Tab Background audio

Audio from MP3 file will be played in loop and will be mixed together with other audio streams.

I know, on this page written "when no live audio from capture" but this was in the firmware versions older than 0.22.2. In the newer firmware version all audio channels are mixed together.


Device-settings-chapter-splash-bgaudio.jpg

Ethernet

Only for Raspberry Pi models with Ethernet port (Raspberry Pi 3B/B+, Raspberry Pi 4B).

Ethernet port works by default, need just connect Ethernet cable one side to the Raspberry Pi and another side - to the network switch, router or directly into PC Ethernet port.
Settings on this page is just for static IP configuration on the Ethernet port.
By default, if no static IP enabled, Raspberry PI uses a DHCP to obtain the IP in the local network.
When Ethernet connection is used, web admin page can be opened using http://cosmostreamer.local host.
CosmoViewerNG app should automatically detect Cosmostreamer via Ethernet, no manual actions needed.

Device-settings-chapter-ethernet.jpg

Example values:
Static IP address: 192.168.123
Static mask: 255.255.255.0
Default gw (gateway): 192.168.1.1
DNS server: 192.168.1.1

Another values may be needed for your local network


Wi-Fi

Raspberry Pi microcomputer has internal Wi-Fi interface. This interface can be used as an access point (by default) and also may be used for connection to another Wi-Fi access points or routers.
Also USB Wi-Fi adapters can be used, so it's possible to use internal Wi-Fi as an access point and USB Wi-Fi adapter for local network or camera connection.

Not all USB Wi-Fi adapters are compatible!

For example, this dual-band USB Wi-Fi adapter works fine: https://www.pishop.ca/

Tab Access Point

By default, internal Wi-Fi on the Raspberry Pi configured in Access Point mode. This means you can connect your PC or smartphone to the Cosmostreamer's Wi-Fi access point.
Find Wi-Fi network "cosmostreamer" and connect to it using a default password "1234512345" (without a quotes).

Using a default Wi-Fi password is not secure, anyone (who knows the default password) can connect to your device in this case! Don't forget to change default password.

Also possible to use USB Wi-Fi adapter to use Access Point on it, need just connect compatible USB Wi-Fi adapter to the Raspberry Pi and choose "USB Wi-Fi" instead of "Internal Wi-Fi" in the first field.

Device-settings-chapter-wifi-ap.jpg

SSID

Wi-Fi network name for access point.

Password

Password for access point access.

Country

There are different channels available for different countried, especially for 5GHz mode.

Mode

Wi-Fi band 2.4GHz or 5GHz.

Raspberry Pi Zero/Zero2 Wi-Fi can work only in 2.4GHz band!

Channel

Wi-Fi channel. Use any channel from this list in 2.4GHz mode. And use 36 or 149 channel in 5GHz mode (as a most compatible).

Tab WLAN

This page is for configuring Wi-Fi interface for connection to any Wi-Fi access point or router.
Need to choose Wi-Fi interface (internal Wi-Fi or USB Wi-Fi adapter).

One interface can be used only for one purpose, either access point or Wlan connection! Not the both at the same time.

Subtab Main

You could fill SSID (Wi-Fi network name) manually, or click button "Scan networks" and you will get the list of available Wi-Fi networks. And enter the correct password for connection to this Wi-Fi network.

Device-settings-chapter-wifi-wlan1.jpg


Subtab Fallback

This is just a one more Wi-Fi local network. Cosmostreamer will try to connect to this network if main Wi-Fi network is not available.

Device-settings-chapter-wifi-wlan2.jpg

Subtab Static IP

Here are just a settings for a static IP on Wi-Fi interface.

Subtab Emergency AP

If this option enabled - Cosmostreamer will enable own Access Point (configured in tab "Access Point") if no connection to configured Wi-Fi network more than 60 seconds.

Tab Camera

This tab is for configuration a wireless connection to cameras like DJI Pocket3, DJI Action, etc.

Device-settings-chapter-wifi-camera.jpg

Tab System

This tab content is too little for a separate screenshot. It's just a country code for Wi-Fi connection. Leave this by default ("US").

Display

Tab Video output

Device-settings-chapter-display1.jpg

Decode and show video stream from connected camera


Use all video ports


Vertical flip


Horizontal flip


Display custom rotation


Keep aspect ratio


Letterbox format


Smooth video


Source video crop





Tab Main display

Main display is the only one port on Raspberry Pi models 3B/3B+, Zero/Zerow,Zero2W. And HDMI-0 port on Raspberry Pi 4 (nearest to USB-C port).
Also possible to use analog video out (CVBS, composite, etc) instead of HDMI.

Device-settings-chapter-display2.jpg

Current video mode

Current video mode of the main video output port.

Video output

HDMI (default) or CVBS (analog video out).

HDMI mode

By default, the main video port is configured as "default." This means the video output resolution will be set during Raspberry Pi startup based on connected HDMI display best resolution. If no display is connected, the resolution will default to 640x480, as it is the most universally supported. To always use a fixed video output resolution, set the mode manually.
Here you could choose any of standard HDMI modes.

Show all modes

If this option is not enabled, only the resolutions supported by the connected display will be available. If no display is connected, or if you want to test other resolutions, enable this option to see all standard video modes in the list.

NTSC

This option is for enabling NTSC mode, i.e. 59.94 instead of 60Hz, etc.

Show app type image on display

If this option is enabled you will see a small icon in the left top corner of the main video port. This icon indicates a currently used "camera type".
For example, when current type is "DJI Goggles2/3/Integra/N3" you will see this:

Apptype-icon.jpg

This option is useful when multiple licenses installed on the Cosmostreamer device and allow auto detection option is enabled.

Test button

Clicking this button will apply the selected resolution to the main display, but it will not be saved to the configuration file.

Save button

This button saves the selected video mode to the configuration file, but does not apply the resolution immediately. The new resolution will take effect after the Raspberry Pi is restarted.


Tab Secondary display

This option is obsolete and should not be used. Please use the "Use all video ports" option on the "Video Output" tab instead.

Device-settings-chapter-display3.jpg

Tab DSI display

This is for DSI display connected to the Raspberry Pi.
Compatible displays:

Official Raspberry Pi Touch Display 2 is not supported in the current kernel version used in Cosmostreamer!
Waveshare DSI displays bigger than 4.3" are not supported because Waveshare made a crypto protection and no driver compatible with the current kernel version used in Cosmostreamer

Device-settings-chapter-display4.jpg

Output video on DSI display

This option to enable/disable video output on the DSI display. This option is disabled by default, because another option ("Use all video ports" in the tab "Video output" do the same)

DSI display vertical flip

This option is for rotating whole display screen (not only video) on 180 degrees. Need to reboot Rpi after this option change.

This option does not works by default, need to manually edit file config.txt on the microSD in /boot partition. Just add "#" into a start of string "dtoverlay=vc4-fkms-v3d"


Ignore DSI display

Raspberry Pi 4 support only two video output ports in any of these combinations:

  • HDMI-0 and HDMI-1
  • HDMI-0 and DSI
  • HDMI-1 and DSI
Not possible to use HDMI-0 and HDMI-1 and DSI!

But if you have DSI display connected to Raspberry Pi 4 and you want to use both HDMI ports - you could disable DSI display output, just enable this param.

Tab SPI display

Compatible SPI display models:

  • Waveshare 2"
  • Waveshare 3.5" revision A, B, and some other revisions.

These displays are not good: old TFT matrix, bad view angles, bad colors. Video output is software-based (not hardware), it's just a frame-to-frame copy of HDMI port content. This eats CPU a lot, but works up to 60Hz framerate.

Device-settings-chapter-display5.jpg

Tab OSD

This OSD (on-screen display) shows graphical overlay above the main video on HDMI contains some camera settings (ISO, shutter, EV, recording state, etc) and works only on Raspberry Pi models:

  • Raspberry Pi 3B/B+
  • Raspberry Pi Zero/ZeroW/Zero2W


This OSD is only for DJI Osmo, Pocket Osmo, Pocket2, Pocket3.

This is not DJI Goggles2/3/Integra/N3 OSD!!!

Device-settings-chapter-display6.jpg

Tab Touchscreen

This page allows you to enable or disable touchscreen support. If a compatible touchscreen display is connected to the Raspberry Pi, it can be used but only for a few specific functions. You can control the camera gimbal by sliding your finger up/down or left/right on the touchscreen. Additionally, you can start or stop onboard recording with a double-tap on the left side of the screen, and start or stop RTMP streaming with a double-tap on the right side.

There is no any GUI on the display for the using with a touchscreen!

Device-settings-chapter-display7.jpg

Video/Audio

Tab Video

Somtimes when we want to view the main video stream in web interface or CosmoViewerNG app remotely, via Internet, but the video bitrate is too big (for example, first DJI Pocket Osmo model - 30 mbit/s, DJI Goggles V1/V2 - 20-30 mbit/s, DJI FLy drones - 14-17 mbit/s, etc) - need to reduce this bitrate. Specially for this I made onboard transcoding.

Raspberry Pi microcomputer decode the source video and then encode it again with the lower quality and lower bitrate. But GPU power (used for decoding/encoding) is limited, so transcoding does not works well in some cases. It works not good for the H264 video stream 1920x1080 at 50 or 60 fps and doesn't work for H265 streams at all.

If you need only use a transcoded video - disable video decoding for HDMI output, this allows transcoder to work better.

If real-time transcoding doesn't work well, it's possible to use an alternative workaround method - "Screen capture". In this case, the source video is displayed on HDMI as usual, while a separate application simultaneously captures the HDMI output and encodes it into a low-bitrate video stream.
This way works independently on source video codec, so works universally, also it keeps all on-screen elements (splash image, logo, etc). But this method also has some limitations. Screen capture and encoding into H264 codec works better if HDMI port resolution is lower. So, for the best perfomance/quality ratio set HDMI mode (not the parameter in this section!) to 1280x720 or less.

Device-settings-chapter-video1.jpg

Tab Audio

Audio Engine is the Cosmostreamer's subsystem for mixing audio streams from different sources and making the final audio stream available for HDMI output or for using in CosmoViewerNG app or web interface, or in restreams.
Audio sources - background audio, audio from background video, main camera audio (for example, with DJI SDR camera type), USB audio capture (for example, DJI Mic or any USB microphone).

Device-settings-chapter-video2.jpg

Enable Audio Engine

Enable/Disable audio engine subsystem. Disabled by default to reduce CPU usage.

Use audio capture

Allows to use a USB audio capture (any USB microphone, DJI Mic, etc).

Use auto gain if supported

If USB audio capture has "auto gain" control - this allows it to be used.

Audio capture volume

Volume for USB audio capture device.

Audio delay

Not supported at current time (was broken some updates ago).

Streaming


Recording


Overlay camera

Device-settings-chapter-overlaycamera.jpg

Use Raspberry Pi camera as overlay camera

A very old feature, but also may be useful.
Allows to use a video from the native Raspberry Pi camera as a video overlay above the main video on HDMI display.
Camera params - a standard params for the "raspivid" command.

Use Gstreamer pipeline as overlay camera

Allows to use a video from any custom Gstreamer pipeline. Main thing is output of the pipeline should be a H264 NAL units byte-stream.

Example pipeline for using an external IP camera with IP 192.168.1.164 via RTSP protocol as overlay camera:

rtspsrc location=rtsp://admin:12345678Aa@192.168.1.164/Streaming/Channels/101 do-timestamp=true ! rtph264depay


RC


Servo control


Controls


Gimbal


Auto movements


Zerotier


Wiral Lite


System

Tab Firmware

This page is for the firmware update.
Download a firmware update file (.csuf), choose this file by clicking button "Choose File" and click "Upload File" button.
Latest Cosmostreamer's firmware update can be downloaded here

In CosmoViewerNG app for Windows possible just click button "Update from server" and latest firmware will be downloaded and installed automatically. But only if PC with runned CosmoViewerNG application is connected to the Internet!

Device-settings-chapter-system1.jpg

Reset all settings

This button is for resettings all Cosmostreamer's settings to the default.

Restart server app

This button is for restarting main Cosmostreamer application on the Cosmostreamer device. This is mostly for development process.

Reboot device

This button is for Cosmostreamer device reboot.

Tab Other

Device-settings-chapter-system2.jpg

Mount file system in read-write mode at start

By default, the microSD card is in read-only mode to reduce the risk of file system corruption.

You could remount file system into read-write any time by the command via SSH:
For root partition: mount -o rw,remount /
For /boot partition: mount -o rw,remount /boot

Or just enable this option. Root filesystem will be remounted in a read-write mode every time when Cosmostreamer powered on.

Make preview images

If this option enabled - Cosmostreamer will do a main HDMI display screenshot each 5 seconds and this image will be used as a preview icon in the CosmoViewerNG app for Windows.

This option may cause a HDMI display blinking if a lot of graphical overlays is enabled

Preview-image.jpg

Show battery alert image

If this option is enabled (don't forget also to set timeout value in minutes) - a big red icon will be shown on the main display after this time since Cosmostreamer was powered on.
I.e. if you know approximately how long your Cosmostreamer can run on battery power, enter that time in the settings — once it’s reached, you’ll get an on-screen warning.

Battery-alert.jpg

Tab Authorization

If this option enabled (don't forget to fill a "Username" and "Password" fields) - need to enter this when you trying to get access to Cosmostreamer's web interface.

This protection does not work for access from CosmoViewerNG application!

Device-settings-chapter-system3.jpg

Tab Configs

This for export (save from Cosmostreamer to local file on PC) and import (restoring from local file on PC) config files.
There are two config files: a standard config.txt file for Raspberry Pi and cosmostreamer.conf - Cosmostreamer's config file.

Device-settings-chapter-system4.jpg