28 Broadcasting the Night
Astrophotography live streams are their own small genre: the stacked image climbing out of the noise while the numbers tick over beside it, and a chat asking what scope that is. Polaris has everything needed to be the source of one, and this chapter is about joining it up.
What makes it worth doing from Polaris rather than from OBS on a laptop is what is missing from the picture. The usual way to stream a session is to point capture software at a laptop screen, which means a laptop at the scope, awake, plugged in, all night. Polaris broadcasts from the host itself: the same small box already sitting on the tripod, already doing the capture. Nothing else has to be there.
28.1 What goes out
The host does not capture a screen. A headless box has no screen to capture, and even where there is one, a browser window scaled to 1280x720 puts the image in the middle of a lot of sidebar. Instead Polaris draws a frame of its own, laid out for someone watching on a phone:
- Along the top, a header: the title you give the broadcast, the rig’s name, and the equipment. Focal length and f-ratio, camera, mount, filter wheel, focuser, guide camera and guider, as far as they are configured. This is the answer to the question every astro chat asks, on screen from the first frame so nobody has to type it.
- On the right, an object card: a cutout of the target, its common name, its catalogue numbers, the facts (type, constellation, magnitude, apparent size) and a short description.
- Along the bottom, a banner: target, filter, exposure, gain, frames, total integration, SNR, guide RMS and sensor temperature.
- Everything else is the picture.
The split between the top strip and the bottom one is deliberate. The header is fixed for the session; the banner is what changes. Someone arriving in the middle reads the top once and the bottom continuously, and mixing the two would make the part that is actually updating harder to find.
Each of the three can be switched off, and the picture then has that much more room.
28.2 Where the picture comes from
Twice a second, Polaris asks for the best image available right now. If a video stream is running, that is the picture, which is what you want for planetary work. Otherwise it takes the last image the relay handled, which covers LIVE, the stack, PREVIEW and AUTORUN, and which the host keeps whether or not a browser is attached: you can close the tab and the broadcast carries on. Failing both, it redraws the last frame, so the picture holds steady between subs rather than going black.
Two things it deliberately never does. It never starts a camera stream of its own, because a stream holds the camera exclusively and would block every exposure for as long as the broadcast ran. And it never waits for an image. A two minute sub and a plate solve in the middle of it are ordinary, and a broadcast that stopped sending during those would stop every few minutes.
28.3 Setting up a destination
Go to Settings -> Network & security -> Live broadcast, pick your platform, and paste the ingest URL and the stream key that the platform gives you.
| Platform | Where to find them |
|---|---|
| YouTube | Studio, Go live, Stream settings |
| Twitch | Creator Dashboard, Settings, Stream |
| Live producer, Streaming software | |
| Live producer, on a professional account | |
| Custom | any RTMP or RTMPS server, including your own |
Choosing a platform only fills the URL field in; what you save is what is used. That matters for Twitch, which has regional ingest servers worth choosing between, and for Instagram, which issues a fresh URL and key for every session.
The commonest mistake is to paste the address of the studio page from the browser’s address bar instead of the ingest address. Polaris recognises that and refuses it with an explanation, rather than failing later with a connection error.
The stream key is treated as a credential, because it is one: anybody holding it can broadcast to your channel as you. It is stored in its own file on the host, readable only by the account Polaris runs as, and it is never sent back to a browser. The field shows only whether a key is set. Leave it untouched when you change something else and the stored key is kept; clear it to remove the key.
28.4 Quality, and what it costs
| Setting | Resolution | Bitrate | Per hour |
|---|---|---|---|
| Low | 854x480 | 1000 kbps | about 0.5 GB |
| Medium | 1280x720 | 2500 kbps | about 1.1 GB |
| High | 1920x1080 | 4500 kbps | about 2.0 GB |
The per-hour figure is both the upload and, if you are recording, the size on disk. Two things limit the sensible choice. The first is the link: broadcasting from a phone hotspot in the field shares that link with the browser session you are using to control the rig, and starving your own control session to feed the stream is a bad trade. Start at Low there. The second is the host, which the next section is about.
28.5 Recording, with or without an audience
Also record to a file keeps the same composed video as an MP4 under the capture folder. It works with a broadcast and it works without one, and recording alone is a perfectly good use of the feature: you get the timelapse of the night, with the card and the numbers already burned in, and nothing goes anywhere near the internet.
The file is written in fragments as it goes rather than being finalised at the end. A night-long recording on a box that can lose power is exactly the case where the usual arrangement fails badly: a plain MP4 holds its index in memory until the writer exits, so a power cut costs the whole file rather than the last few seconds.
28.6 The object descriptions
The description on the card comes from one of three places, tried in order. First the text Polaris ships, written for the Messier catalogue and the better known NGC, IC and Sharpless objects. Then, if you have left Look up descriptions online on and the host has a connection, a description fetched once from Wikipedia in your interface language and kept. Last, a sentence built from the catalogue facts, which is mechanical but always correct and never absent.
That last one is why the card is never blank, and why the online lookup can be treated as a bonus rather than a dependency. The broadcast goes on air with whatever is already on disk; if a lookup lands later, the card improves itself on the next frame. With no network at all, nothing waits and nothing fails. A fetched text carries a small credit line, which is not optional: it is published under a licence that requires attribution, and a broadcast is publishing.
28.7 A second camera in the corner
The question every astrophotography chat asks after “what scope is that” is “what does it look like out there”. A small frame in the bottom left corner answers it: an all sky camera, a camera pointed at the rig, or the guide frame.
Three sources, and the difference between them is what they cost.
The guide camera costs nothing. Polaris draws the frame the guide loop has already taken, so no exposure is spent and nothing competes for the camera. It needs the loop running, and it works with the built in guider only, because PHD2 draws its own window and hands Polaris no pixels. What it shows is a starfield at high magnification, which is interesting to an audience watching guiding work and not at all a view of the sky.
The auxiliary camera also costs nothing, for the same reason: it is the frame that camera’s own capture loop took. Polaris never asks either camera for an exposure of its own. It would have to queue behind that loop and behind your focus snaps on the same capture gate, and three parties taking turns on one camera is how a session stalls.
A camera at a web address is the one that answers the original question, because an all sky camera is usually an IP camera rather than an astronomy one. Two kinds of address work. A snapshot URL, the still image many such cameras serve, which Polaris fetches every few seconds. Or an rtsp:// stream, which is what most all sky and IP cameras actually offer, often with no snapshot at all or with the snapshot behind a login while the stream is open. For a stream Polaris has ffmpeg connect, take a single frame and disconnect, on the same few-second rhythm. Either way this costs nothing at the telescope: no driver, no equipment slot, no contention.
The stream is read over TCP rather than UDP on purpose. Over WiFi a UDP frame arrives torn often enough to be the normal case, and a torn frame is a corner full of grey blocks; one picture every few seconds is not worth the latency UDP would save. If your camera URL carries a password, as most do, it is removed before anything is written to the log.
Whichever you choose, give it a caption. Polaris has no way to know whether the camera is pointed at the sky, at the mount or at the dog.
The corner never delays a frame. It draws whatever picture is already in hand, and a source with nothing to show draws nothing rather than an empty box. When a snapshot camera stops answering, the last picture stays up and the reason appears under the buttons in Settings, where it is visible to you and not to the audience.
One honest cost: the corner is more pixels to encode, and unlike the main picture, which is unchanged between subs, it never stops moving. On a board encoding in software that shows up in the bitrate and in the dropped frame counter.
28.8 What the host has to be able to do
Encoding H.264 is real work, and it happens next to the capture loop all night.
Polaris needs ffmpeg, which the .deb recommends rather than requires, so it may not be there. The card says so plainly, lists every path it looked in, and offers to look again once you have run sudo apt install ffmpeg.
Given ffmpeg, Polaris chooses an encoder by trying them. This is worth a sentence because the obvious approach does not work: every ffmpeg build advertises every encoder it was compiled with, and that says nothing about whether the silicon behind one is present and usable. A machine can list Intel Quick Sync, be chosen for it, and then answer “could not open encoder” on the very first frame, which as a live broadcast means a restart loop that never settles. So each candidate is asked to encode a fifth of a second of black before it is trusted. It costs about a second when you press Start.
On ARM boards the order is the Rockchip encoder (Orange Pi 5, Radxa), then the kernel encoder most other boards expose, then software. On x86 it is Quick Sync, NVENC, VAAPI, then software. The status line tells you which was chosen and whether it is hardware.
It matters less than you would think. Measured on an Orange Pi 4 Pro broadcasting a real session: 1080p on software x264 costs about 3% of the CPU, and 480p is no cheaper in any way you can notice. This chapter used to warn that a board like that would not keep up, which was a guess, and the guess was wrong.
The reason is the frame rate into the encoder. Polaris feeds two frames a second and lets ffmpeg duplicate them up to the output rate, and a duplicated frame is almost free: nothing in it has changed, so it compresses to nearly nothing. What the board actually encodes is two new frames a second, which even a modest ARM core does without noticing.
So pick the quality your uplink can carry, not the one you think your board can encode. If something is wrong the dropped-frame counter in the status line is where it shows.
28.9 While it is running
An ON AIR chip sits on the activity bar on every tab, so you can work in FOCUS or LIVE and still know the broadcast is alive. It turns amber the moment the encoder has had to be restarted.
Restarts are expected. RTMP connections drop, and from a hotspot at a dark site that is an ordinary night rather than a fault. When the encoder exits while you still want a broadcast, Polaris starts it again with a backoff that tops out at thirty seconds, and counts the reconnect. A slowly climbing count is the uplink; a fast one with an error message beside it is worth reading.
Stop is a graceful stop. Polaris closes the encoder’s input and lets it finish, which is what puts the last fragment in the recording and gives the platform a clean disconnect, and only kills the process if it has not finished after ten seconds.
Nothing starts by itself. There is no scheduled broadcast and nothing resumes after the host restarts. A broadcast puts your sky, your equipment list and your session out under your own name, and it begins when you press the button and at no other moment.
28.10 Making it fit your screen
Three settings change how the frame is laid out, and all three came from the first operator to broadcast a whole session with it.
Picture chooses between showing the whole sensor and filling the frame. A broadcast frame is 16:9 and most sensors are not, so Fit leaves bars at the sides: a square sensor loses about a third of the width to black. Fill scales the picture until it covers the frame and crops what hangs over. Fit if the framing matters to the last pixel, Fill if you would rather use the screen.
Text size is a percentage, 100 being the size everything was designed at, and it moves the object card, the corner caption and both strips together. The strips are fixed-height bands, so their type stops growing before it would fall out of its own strip. How big it should be depends on whether people are watching on a phone or a television, which is why there is no right answer baked in.
Card uses the full height lets the object card run the whole column from the header to the banner instead of shrinking to its text. The description then gets as many lines as fit, so a long one stops being cut off with an ellipsis. Without it the panel is only as tall as its contents, which looks tidier on short entries.
28.11 Music, if you want it
Polaris ships no music, and that is deliberate rather than an omission. Nearly every library that advertises itself as royalty free licenses you to put a track into your video and forbids passing the file on, which is exactly what shipping one inside a .deb or an SD card image would be. Only CC0 and Creative Commons material could travel that way, and someone would still have to carry the attribution. So the field asks for your file.
Point Background music at either:
- a single file, which loops for the whole broadcast, or
- a folder, whose audio files play through and then start again. Tick Shuffle and the order is drawn fresh each time you press Start.
.mp3, .m4a, .aac, .flac, .ogg, .opus, .wav and .wma all work. Music volume is a percentage, and 50 is the default: there is nothing else in the mix, so this is simply how loud the broadcast is.
If the path is wrong, or the stick it was on came out, the broadcast does not stop. It loses the music, says so in the status line, and carries on silent. A night is worth more than a soundtrack.
The part that costs people their channel
You are responsible for the rights, and the trap is specific: free to download is not free to broadcast. A track can be royalty free, properly licensed, and still be registered in Content ID, and YouTube scans live audio as it goes out. Twitch is stricter again, because the licence has to cover the stream, the recording, the clips and the highlights separately, and it is usually the recording that gets taken down days later.
Public domain is not automatic cover either. Beethoven is out of copyright; the 1998 recording of an orchestra playing him is not.
The two categories that are genuinely safe to use are CC0 or public domain recordings, and Creative Commons tracks whose attribution you actually display. The Free Music Archive and ccMixter let you filter by licence. Whatever you pick, keep the licence page with the files: if a claim arrives, that is what settles it.
28.12 What it does not do
- No commentary. You can put your own music under the broadcast (above), but a voice track would mean a microphone on the host, which is a different feature. With no music chosen, a silent audio track goes out, because YouTube refuses a video-only stream.
- Instagram limits a session to about an hour. That is Instagram.
- Two frames a second reach the encoder. For deep sky that is generous, since the picture changes once per sub. For planetary, where the video stream is running far faster, the broadcast is a slideshow of it rather than the stream itself.
- Object types and constellation names stay in English, because they come from the catalogue. The rest of the card follows your interface language.