Cosmostreamer for DJI Osmo - Assemble instruction


You can download a ready image of Cosmostreamer and try to make your own box. But a license still have to buy, otherwise will not work connect to DJI Osmo.

 

Required list

  • Raspberry Pi 3
  • MicroSD card (4Gb min)
  • USB Wi-Fi adapter

Required list

  • Raspberry Pi 3
  • MicroSD card (4Gb min)
  • USB Wi-Fi adapter (supported list List is not full, other adapters can works too, but not guaranteed)

 

Basic assembling

1. Download ZIP-archive with microSD card image, here is direct link

2. Extract .img file from downloaded ZIP archive

3. Write .img file to microSD card. Use Win32DiskImager application, or any other, that can write images

3.1 If you already has license key - you can install it on microSD card (how to)

4. Insert microSD card into Raspberry Pi 3

5. Plug in USB Wi-Fi adapter into any USB port on Raspberry Pi 3.

6. If you have a monitor or TV with HDMI input - plug it to Raspberry Pi.

7. Ok, basic assembly is done. Now power on Raspberry Pi, it must start booting.

8. After boot ended HDMI will show something like this:

"Bad license key" message means license key wrong or absent. In the bottom left corner message contains Raspberry Pi serial number and Cosmostreamer application version.

Without correсt license key all features will work, except DJI Osmo connection

 

License key

For normal Cosmostreamer operation license key needed. It is a small string, those written in file /boot/license.txt on microSD

At the current time there is no automatic key retrieve system. So you need to send e-mail to cosmostreamer@gmail.com. Please, specify a serial key of you Raspberry Pi (see on HDMI on bottom-left corner) and your PayPal account in this e-mail. I will issue a bill for payment and after payment i will send you a license key for Cosmostreamer on your Raspberry Pi.

The license key is unique for each Raspberry Pi!

Options for installing a license key

  • Use a CosmoViewer application for Windows.
  • Insert microSD with written image into PC/laptop card reader. Operating system will detect a card. If your operating system is Windows - disk with label "boot" will be found. Just copy license.txt from e-mail answer on this disk.

 

Software update

When i fixing bugs or adding some features to Cosmostreamer application, i make a special file for update. You not needed to rewrite microSD card, you can just install update file. It is possible from CosmoViewer for Windows application, or from a web interface.

You need to download update file. Direct link: cosmostreamer.tar.gz. Change log and old versions here.

For update from Windows app:

1. Start a CosmoViewer for Windows

2. Right mouse click on window and select "Box settings" item in menu

3. Open tab "Info"

4. Click "Select" button near of "Firmware upgrade" label

5. Select downloaded file cosmostreamer.tar.gz

6. Click "Upload" button. Update file will be send to a Raspberry Pi, after this update begins. After finish, Raspberry Pi will automatically reboot.

For update from web interface:

1. Open web interface:

2. Open menu item "Info"

3. Click "select file" button. Select downloaded file cosmostreamer.tar.gz

6. Click "Upload" button. Update file will be send to a Raspberry Pi, after this update begins. After finish, Raspberry Pi will automatically reboot.

 

Config file

Cosmostreamer settings saved in file /boot/cosmostreamer.conf. It is a usual text file, which can be edited. You can insert microSD into card-reader and edit this file. Also settings can be changed from Cosmostreamer for Windows.

Config parameters description

Parameter Description
camera_model=X3 Camera model
X3 or X5. If your DJI Osmo connected, but no HDMI video output - set X5 here
hdmi_enabled=1 Use HDMI output or TV-out
1 - show video and info via HDMI
0 - show video and info via TV-out
udp_enabled=0 Turn on/off video restreaming to clients via UDP. Clients list set in "udp_clients" parameter
1 - send video via UDP
0 - do not send
rtmp_enabled=0 Turn on/off video restreaming via RTMP. RTMP url set in "rtmp_url" parameter
1 - send video via RTMP
0 - do not send
mpegts_enabled=0 Turn on/off video restreaming as MPEG-TS (via UDP). Clients list set in "mpegts_clients" parameter
1 - send video
0 - do not send
tcp_enabled=0 Turn on/off incoming clients connections via TCP for MPEG-TS restreaming. TCP port set in "tcp_port" parameter
1 - receive incoming connection
0 - do not receive
rtsp_enabled=0 Turn on/off incoming connections for RTSP. Port is fixed, 554
1 - receive incoming connections
0 - do not receive
dvbt_enabled=0 Turn on/off video restreaming via DVB-T transmitter. Additional hardware needed.
1 - send video
0 - do not send
video_bitrate=3000000 Video bitrate. DJI Osmo always send video with fixed bitrate, for lower bitrate video will be transcoded with Raspberry Pi hardware capabilities. If this parameter = 3000000 (by default) - transcoding not used.
audio_enabled=0 Use audio capture. Additional hardware needed (USB audio card)
audio_bitrate=128000 Audio bitrate.
audio_volume=100 Audio level. From 0 to 100%
audio_autogain=0 0 - turn off audio auto gain
1 - turn off audio auto gain
rc_input_enabled=0 0 - do not use RC receiver
1 - use RC receiver
rc_input_speed_pan=100 Pan speed for RC receiver. From 0% to 100%.
rc_input_speed_tilt=100 Tilt speed for RC receiver. From 0% to 100%.
rtmp_url="rtmp://" RTMP URL. For example, "rtmp://a.rtmp.youtube.com/live2/sdfj-qwer-aasw-ffdd"
tcp_port=5555 TCP port for incoming clients connections for MPEG-TS video.
mpegts_clients=192.168.1.10:3001 Clients list for MPEG-TS UPD restreaming. You can set some clients, separated by comma. For example, 192.168.1.10:3001,192.168.1.11:3001
udp_clients=192.168.1.10:3000 Clients list for raw H264 restreaming via UDP. You can set some clients, separated by comma. For example, 192.168.1.10:3000,192.168.1.11:3000
ap_enabled=1 For internal Raspberry Pi 3's Wi-Fi.
1 - Raspberry Pi as a Wi-Fi access point
0 - Raspberry Pi as Wi-Fi client
ap_ssid="Cosmostreamer" For internal Raspberry Pi 3's Wi-Fi.
Only when ap_enabled=1
Network SSID for Wi-Fi access point
ap_psk="1234512345" For internal Raspberry Pi 3's Wi-Fi.
Only when ap_enabled=1
Password for Wi-Fi access point
ap_channel=13 For internal Raspberry Pi 3's Wi-Fi.
Only when ap_enabled=1
Channel number for access point
wifi_ssid="wifi-ssid" For internal Raspberry Pi 3's Wi-Fi.
Only when ap_enabled=0
Wi-Fi network name (SSID) for connecting to
wifi_psk="wifi-pass" For internal Raspberry Pi 3's Wi-Fi.
Only when ap_enabled=0
Wi-Fi network password for connecting to
camera_ssid="OSMO" DJI Osmo Wi-Fi SSID
camera_psk="12341234" DJI Osmo Wi-Fi password
display_enabled=0 1 - use OLED display and buttons
0 - do not use
osd_enabled=1 1 - show OSD on HDMI out
0 - do not show
hud_enabled=1 1 - show HUD on HDMI out
0 - do not show
osd_borders=30 Set the height of top and bottom black borders below telemetry on HDMI
osd_top_offset=20 Set the vertical top offset 20 pixels for top-sided text labels on HDMI
osd_bottom_offset=20 Set the vertical bottom offset 20 pixels for bottom-sided text labels on HDMI

 

OLED display and buttons connection

Optional

 

RC receiver connection (PCM)

Optional

All channels are connected with the example for Turnigy 9X. Mode 2. Model type: Acro

Channels set-up

channel 1 - PAN
channel 3 - TILT
channel 4 - ZOOM (if supported)
channel 5 - (AUX-CH "GEAR") - RECORD
channel 6 - (AUX-CH "HOV THRO") - EV compensation
channel 7 - (AUX-CH "THRO HOLD") - MENU (labeled as CENTER on image)
channel 8 - (AUX-CH "HOV PIT") - MANUAL FOCUS (if supported)

Need to enable auxillary channels in Turnigy settings. Enter menu, part "AUX-CH" and set values:

For another remote control system - read it's manual, how to set-up auxillary channels.

Don't forget to enable RC in Cosmostreamer settings. Menu -> "Inputs" -> "RC input enabled". After transmitter is powered on HDMI will show "RC calibrating" message. Near will be axis values shown. It was made for easy config. Check channels with my scheme.

Channels calibrating is at first transmitter power on. Need to move left and right stick up-down, left-right to minimal and maximal position. And rotate EV and FOCUS to min max position. After this calibrating is over. Move pan/tilt stick to down-left position and quckly release. All message for RC will be hidden. Normal working mode is on.

 

RC receiver connection (S-bus)

Optional

Not supported yet

 

DJI Go switch connection

Optional

Used for a temporary disabling Cosmosteamer connection to Osmo (the same as "Disable" button at the left top corner of Windows application). You can connect your mobile device to a Wi-Fi network Cosmostreamer (default pass is 1234512345), run DJI Go on this device, then turn on this switch. DJI Go will be automatically connected to Osmo :-) I.e. Cosmostreamer box will acts like a bridge between mobile device and DJI Osmo. To return back Cosmostreamer normal working mode - turn off this swith.