Difference between revisions of "Cosmostreamer settings"
(113 intermediate revisions by the same user not shown) | |||
Line 2: | Line 2: | ||
Settings are the same, in this document I will use a web interface for the screenshots. | Settings are the same, in this document I will use a web interface for the screenshots. | ||
<pre style="color:red">DANGER! A LOT OF LETTERS BELOW!</pre> | |||
=How to open Cosmostreamer device settings= | =How to open Cosmostreamer device settings= | ||
Line 170: | Line 172: | ||
* 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 273: | Line 279: | ||
==Display== | ==Display== | ||
===Tab Video output=== | |||
[[File:Device-settings-chapter-display1.jpg|800px]] | |||
<br> | |||
====Decode and show video stream from connected camera==== | |||
This option enables or disables the video decoding subsystem of Cosmostreamer.<br> | |||
For historical reasons, Cosmostreamer originally supported only H.264 video streams. As a result, all other options on this page work only with H.264 video (i.e., all camera types except DJI Fly drones). "Use all video ports" also works for both H264 and H265 video streams. | |||
<br> | |||
====Use all video ports==== | |||
When this option is enabled, Cosmostreamer will output video to all video displays connected to the Raspberry Pi (up to two displays). When this option is disabled - video will be only on the main display. | |||
<br> | |||
====Vertical flip==== | |||
Flip video vertically on all displays. | |||
<br> | |||
====Horizontal flip==== | |||
Flip video horizontally on all displays. | |||
<br> | |||
====Display custom rotation==== | |||
Rotate video only on the secondary display. | |||
<br> | |||
====Keep aspect ratio==== | |||
When this option is enabled, the video will be displayed with the correct aspect ratio. When disabled - video will be stretched to fill the screen. | |||
<br> | |||
====Letterbox format==== | |||
<pre>Only applies when the "Keep Aspect Ratio" option is enabled and the video's aspect ratio differs from the display's aspect ratio</pre> | |||
When this option is enabled - video will be scaled to fit the screen (may be a black borders on the sides of image).<br> | |||
When this option is disabled - video will be cropped to fit the screen without a black borders. | |||
<br> | |||
====Smooth video==== | |||
When this option is enabled, the video decoder will attempt to play the video smoothly at its native frame rate. However, if incoming H.264 packets are lost, synchronization may be disrupted, causing the video to appear slightly choppy. | |||
<pre style="color:red">This option may add the latency!</pre> | |||
<pre>Important: to get a really smooth video need to use an HDMI mode with the same frame rate as the video!</pre> | |||
I.e. if drone recording settings (and the live stream too) is 50 fps need to set HDMI mode also 50 fps. | |||
<br> | |||
====Source video crop==== | |||
This option allows to get source video cropped area. | |||
<pre>Field format: x,y,w,h | |||
Where: | |||
x - offset from the left side of the video. | |||
y - offset from the top | |||
width - width of the resulting frame | |||
height - height of the resulting frame | |||
</pre> | |||
<pre>Example: 50,50,1280,720</pre> | |||
<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> | ||
Line 283: | Line 459: | ||
<pre>If you need only use a transcoded video - disable video decoding for HDMI output, this allows transcoder to work better.</pre> | <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> | 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). | 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> | <br><br> | ||
[[File:Device-settings-chapter-video1.jpg|800px]] | [[File:Device-settings-chapter-video1.jpg|800px]] | ||
Line 289: | Line 465: | ||
===Tab Audio=== | ===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> | <br> | ||
[[File:Device-settings-chapter-video2.jpg|800px]] | [[File:Device-settings-chapter-video2.jpg|800px]] | ||
<br> | <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> | |||
====Destination==== | |||
What hardware port use for audio output. None, HDMI or analog mini-jack (TV-out). | |||
<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 299: | Line 499: | ||
==Recording== | ==Recording== | ||
This is for onboard recording, i.e. recording on the Raspberry Pi storage (internal microSD or USB flash drive).<br> | |||
Onboard recording may be started from the CosmoViwerNG app for Windows, from Bitfocus Companion for Streamdeck, from GPIO pins, from touchscreen. | |||
<br> | |||
===Tab Storage=== | |||
[[File:Device-settings-chapter-recording.jpg|800px]] | |||
<br> | |||
====Show icon on==== | |||
Where to show recording icon. Available options: | |||
* none - doesn't show icon | |||
* default - show the icon on the main display | |||
* DSI - show the icon on DSI display | |||
* HDMI-0 - show the icon on HDMI-0 display | |||
* HDMI-1 - show the icon on HDMI-1 display | |||
====Storage==== | |||
Where to save recordings. | |||
* Auto - select microSD or USB flash drive automatically, depends on free space. | |||
* MicroSD - save recordings on the Raspberry Pi microSD card. There is a special FAT32 partition for the recordings. This partition is available if plug microSD into PC card reader. | |||
* USB flash drive - any USB flash drive connected to the Raspberry Pi | |||
* DJI FPV Goggles MicroSD - when old DJI Goggles V1/V2 is connected to the Raspberry Pi, microSD card on these goggles is available as a storage on the Raspberry Pi and may be used for the recordings. | |||
====Split video==== | |||
Split recording on separate files with the selected duration. | |||
<br> | |||
====Experimental recording==== | |||
When this option is enabled, video recording into .ts file (MPEG-TS). This allows to record audio together with the video. When this option is disabled - video recording goes to .h264 file (raw H264 stream), video only, no audio. | |||
<br> | |||
====Convert video file==== | |||
When recording stopped - convert temporal .ts or .h264 files into one of final file formats, .mp4 (most common format) or .mk4 | |||
<br> | |||
====Make JPG thumbnails==== | |||
Make small .jpg files for the preview. Not used anywhere yet. | |||
<br> | |||
====Format storage partition on MicroSD==== | |||
Format partition with the recordings. May be used if the partition is corrupted. | |||
<br> | |||
<br> | |||
===Tab Buttons=== | |||
It is possible to connect a button to the GPIO pins on Raspberry Pi for control onboard recording.<br> | |||
Check GPIO numbers on the [[#Raspberry_Pi_GPIO_pinout|Raspberry Pi pinout scheme]] | |||
<br> | |||
<br> | |||
[[File:Device-settings-chapter-recording2.jpg|800px]] | |||
<br> | |||
====Use GPIO as trigger==== | |||
Recording will start and stay active when selected GPIO will be connected to the Gnd pin. When GPIO will be disconnected from the Gnd pin - recording will stop. | |||
<br> | |||
====Use GPIO as button==== | |||
Recording will start when selected GPIO will be connected and disconnected to the GPIO pin. Connect it to GPIO pin again to stop recording. | |||
<br> | |||
====Use GPIO as button for photo shot==== | |||
<pre>This is not for the onboard recording</pre> | |||
Connect selected GPIO pin to the Gnd pin and command "shot" will be sent to the main camera. I.e. if DJI Goggles3 with Avata2 is used as a main camera, this command will make a photo shot on the drone. | |||
<br> | <br> | ||
Line 313: | Line 576: | ||
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> | 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> | <br> | ||
Example pipeline for using an external IP camera with IP 192.168.1.164 as overlay camera:<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> | <pre>rtspsrc location=rtsp://admin:12345678Aa@192.168.1.164/Streaming/Channels/101 do-timestamp=true ! rtph264depay</pre> | ||
<br> | <br> | ||
Line 399: | Line 662: | ||
[[File:Device-settings-chapter-system4.jpg|800px]] | [[File:Device-settings-chapter-system4.jpg|800px]] | ||
<br><br> | <br><br> | ||
=Raspberry Pi GPIO pinout= | |||
[[File:Rpi-pinout.jpg|800px]] | |||
<br> |
Latest revision as of 05:49, 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.
DANGER! A LOT OF LETTERS BELOW!
How to open Cosmostreamer device settings
Web interface
Click icon in the right bottom corner and choose "Device settings" item in the menu.
CosmoViewerNG for Windows
Connect PC to the Cosmostreamer device, then click icon with gears in the left panel (second from the top).
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.
Settings Chapters
Info
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
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/
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
Tab Logo
"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/
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
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.
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.
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.
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.
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.
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.
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
Decode and show video stream from connected camera
This option enables or disables the video decoding subsystem of Cosmostreamer.
For historical reasons, Cosmostreamer originally supported only H.264 video streams. As a result, all other options on this page work only with H.264 video (i.e., all camera types except DJI Fly drones). "Use all video ports" also works for both H264 and H265 video streams.
Use all video ports
When this option is enabled, Cosmostreamer will output video to all video displays connected to the Raspberry Pi (up to two displays). When this option is disabled - video will be only on the main display.
Vertical flip
Flip video vertically on all displays.
Horizontal flip
Flip video horizontally on all displays.
Display custom rotation
Rotate video only on the secondary display.
Keep aspect ratio
When this option is enabled, the video will be displayed with the correct aspect ratio. When disabled - video will be stretched to fill the screen.
Letterbox format
Only applies when the "Keep Aspect Ratio" option is enabled and the video's aspect ratio differs from the display's aspect ratio
When this option is enabled - video will be scaled to fit the screen (may be a black borders on the sides of image).
When this option is disabled - video will be cropped to fit the screen without a black borders.
Smooth video
When this option is enabled, the video decoder will attempt to play the video smoothly at its native frame rate. However, if incoming H.264 packets are lost, synchronization may be disrupted, causing the video to appear slightly choppy.
This option may add the latency!
Important: to get a really smooth video need to use an HDMI mode with the same frame rate as the video!
I.e. if drone recording settings (and the live stream too) is 50 fps need to set HDMI mode also 50 fps.
Source video crop
This option allows to get source video cropped area.
Field format: x,y,w,h Where: x - offset from the left side of the video. y - offset from the top width - width of the resulting frame height - height of the resulting frame
Example: 50,50,1280,720
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.
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:
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.
Tab DSI display
This is for DSI display connected to the Raspberry Pi.
Compatible displays:
- Official Raspberry Pi 7" touch display (first model ONLY!) 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")
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
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.
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!!!
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!
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.
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).
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).
Destination
What hardware port use for audio output. None, HDMI or analog mini-jack (TV-out).
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
This is for onboard recording, i.e. recording on the Raspberry Pi storage (internal microSD or USB flash drive).
Onboard recording may be started from the CosmoViwerNG app for Windows, from Bitfocus Companion for Streamdeck, from GPIO pins, from touchscreen.
Tab Storage
Show icon on
Where to show recording icon. Available options:
- none - doesn't show icon
- default - show the icon on the main display
- DSI - show the icon on DSI display
- HDMI-0 - show the icon on HDMI-0 display
- HDMI-1 - show the icon on HDMI-1 display
Storage
Where to save recordings.
- Auto - select microSD or USB flash drive automatically, depends on free space.
- MicroSD - save recordings on the Raspberry Pi microSD card. There is a special FAT32 partition for the recordings. This partition is available if plug microSD into PC card reader.
- USB flash drive - any USB flash drive connected to the Raspberry Pi
- DJI FPV Goggles MicroSD - when old DJI Goggles V1/V2 is connected to the Raspberry Pi, microSD card on these goggles is available as a storage on the Raspberry Pi and may be used for the recordings.
Split video
Split recording on separate files with the selected duration.
Experimental recording
When this option is enabled, video recording into .ts file (MPEG-TS). This allows to record audio together with the video. When this option is disabled - video recording goes to .h264 file (raw H264 stream), video only, no audio.
Convert video file
When recording stopped - convert temporal .ts or .h264 files into one of final file formats, .mp4 (most common format) or .mk4
Make JPG thumbnails
Make small .jpg files for the preview. Not used anywhere yet.
Format storage partition on MicroSD
Format partition with the recordings. May be used if the partition is corrupted.
Tab Buttons
It is possible to connect a button to the GPIO pins on Raspberry Pi for control onboard recording.
Check GPIO numbers on the Raspberry Pi pinout scheme
Use GPIO as trigger
Recording will start and stay active when selected GPIO will be connected to the Gnd pin. When GPIO will be disconnected from the Gnd pin - recording will stop.
Use GPIO as button
Recording will start when selected GPIO will be connected and disconnected to the GPIO pin. Connect it to GPIO pin again to stop recording.
Use GPIO as button for photo shot
This is not for the onboard recording
Connect selected GPIO pin to the Gnd pin and command "shot" will be sent to the main camera. I.e. if DJI Goggles3 with Avata2 is used as a main camera, this command will make a photo shot on the drone.
Overlay camera
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!
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
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
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.
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!
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.